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)
Thu, Nov 21, 10:35 AM
Unknown Object (File)
Sun, Nov 17, 7:39 AM
Unknown Object (File)
Wed, Nov 6, 12:36 AM
Unknown Object (File)
Wed, Nov 6, 12:36 AM
Unknown Object (File)
Wed, Nov 6, 12:36 AM
Unknown Object (File)
Wed, Nov 6, 12:36 AM
Unknown Object (File)
Tue, Nov 5, 11:06 AM
Unknown Object (File)
Mon, Nov 4, 10:53 AM
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.