##// END OF EJS Templates
revset: fix merge() to fall back to changectx API if wdir specified...
Yuya Nishihara -
r42634:43c8f721 default
parent child Browse files
Show More
@@ -1362,8 +1362,12 b' def merge(repo, subset, x):'
1362 1362 getargs(x, 0, 0, _("merge takes no arguments"))
1363 1363 cl = repo.changelog
1364 1364 nullrev = node.nullrev
1365 return subset.filter(lambda r: cl.parentrevs(r)[1] != nullrev,
1366 condrepr='<merge>')
1365 def ismerge(r):
1366 try:
1367 return cl.parentrevs(r)[1] != nullrev
1368 except error.WdirUnsupported:
1369 return bool(repo[r].p2())
1370 return subset.filter(ismerge, condrepr='<merge>')
1367 1371
1368 1372 @predicate('branchpoint()', safe=True)
1369 1373 def branchpoint(repo, subset, x):
@@ -2076,6 +2076,17 b" itself isn't returned unless it is expli"
2076 2076 $ log 'parents(merge())'
2077 2077 4
2078 2078 5
2079
2080 $ hg merge 7
2081 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2082 (branch merge, don't forget to commit)
2083 $ log '0:wdir() & merge()'
2084 6
2085 2147483647
2086 $ hg update -qC .
2087 $ log '0:wdir() & merge()'
2088 6
2089
2079 2090 $ log 'p1(branchpoint())'
2080 2091 0
2081 2092 2
General Comments 0
You need to be logged in to leave comments. Login now