Page MenuHomePhabricator

Merge `diffusion.commitbranchesquery` into `diffusion.branchquery`
ClosedPublic

Authored by epriestley on Jan 17 2014, 11:17 PM.
Tags
None
Referenced Files
F14086823: D8003.id18103.diff
Sat, Nov 23, 4:54 PM
F14086822: D8003.id18109.diff
Sat, Nov 23, 4:54 PM
F14086288: D8003.diff
Sat, Nov 23, 2:31 PM
Unknown Object (File)
Tue, Nov 19, 9:20 PM
Unknown Object (File)
Sun, Nov 17, 3:38 PM
Unknown Object (File)
Fri, Nov 15, 4:50 PM
Unknown Object (File)
Tue, Nov 12, 8:20 AM
Unknown Object (File)
Fri, Nov 8, 7:06 AM
Subscribers

Details

Summary

Ref T4327. This is general cleanup since I was in this area of the code. Primarily, the Mercurial implementation here was completely broken and wrong:

  • It returned only one branch, but a commit can be present on many branches.
  • It did not account for multiple branch heads.
  • It returned a result implying the branch head pointed at the queried commit, which is no consistent or accurate.

Simplify the amount of API we're dealing with by collapsing this method into the very similar diffusion.branchquery method.

Test Plan

Looked at mercurial and git repositories and commits, branch information seemed correct.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley updated this revision to Unknown Object (????).Jan 17 2014, 11:17 PM
  • Since 0 is a valid commit in Mercurial, use strlen() to test for $contains.