Comments
Patch
@@ -116,5 +116,11 @@ roots((0:tip)::)
(children(ancestor(tip~5, tip)) and ::(tip~5))::
# those two `roots(...)` inputs are close to what phase movement use.
roots((tip~100::) - (tip~100::tip))
roots((0::) - (0::tip))
+
+# Testing the behavior of "head()" in various situations
+head()
+head() - public()
+draft() and head()
+head() and author("mpm")
@@ -1105,12 +1105,13 @@ def head(repo, subset, x):
Changeset is a named branch head.
"""
# i18n: "head" is a keyword
getargs(x, 0, 0, _("head takes no arguments"))
hs = set()
+ cl = repo.changelog
for b, ls in repo.branchmap().iteritems():
- hs.update(repo[h].rev() for h in ls)
+ hs.update(cl.rev(h) for h in ls)
# XXX using a set to feed the baseset is wrong. Sets are not ordered.
# This does not break because of other fullreposet misbehavior.
# XXX We should not be using '.filter' here, but combines subset with '&'
# XXX We should combine with subset first: 'subset & baseset(...)'. This is
# necessary to ensure we preserve the order in subset.