Page MenuHomePhabricator

Provide an alternate, more general "closeable" flag for commits
ClosedPublic

Authored by epriestley on Jan 16 2014, 10:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 6:52 PM
Unknown Object (File)
Thu, Dec 19, 5:09 PM
Unknown Object (File)
Wed, Dec 11, 10:56 PM
Unknown Object (File)
Wed, Dec 11, 10:38 PM
Unknown Object (File)
Wed, Dec 11, 1:11 AM
Unknown Object (File)
Sat, Dec 7, 7:46 PM
Unknown Object (File)
Fri, Nov 29, 12:58 AM
Unknown Object (File)
Tue, Nov 26, 2:44 PM
Subscribers

Details

Summary

Ref T4327. This provides a more general RefCursor-based way to identify closeable commits, and moves away from the messy seenOnBranches stuff. Basically:

  • When a closeable ref (like the branch "master") is updated, query the VCS for all commits which are ancestors of the new ref, but not ancestors of the existing closeable heads we previously knew about. This is basically all the commits which have been merged or moved onto the closeable ref.
  • Take these commits and set the "closeable" flag on the ones which don't have it yet, then queue new tasks to reprocess them.

I haven't removed the old stuff yet, but will do that shortly.

Test Plan
  • Ran bin/repository discover and bin/repository refs on a bunch of different VCSes and VCS states. The effects seemed correct (e.g., new commits were marked as closeable).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley updated this revision to Unknown Object (????).Jan 16 2014, 10:40 PM
  • Fix missing comment.
  • Don't close if a repository has no cursors. Particularly, this saves us from churning installs which freshly deploy this code.