##// END OF EJS Templates
revset: add partial support for ancestor(wdir())...
Yuya Nishihara -
r38541:54d7aaa2 default
parent child Browse files
Show More
@@ -319,8 +319,9 def ancestor(repo, subset, x):
319 for r in reviter:
319 for r in reviter:
320 anc = anc.ancestor(repo[r])
320 anc = anc.ancestor(repo[r])
321
321
322 if anc.rev() in subset:
322 r = scmutil.intrev(anc)
323 return baseset([anc.rev()])
323 if r in subset:
324 return baseset([r])
324 return baseset()
325 return baseset()
325
326
326 def _ancestors(repo, subset, x, followfirst=False, startdepth=None,
327 def _ancestors(repo, subset, x, followfirst=False, startdepth=None,
@@ -1813,6 +1813,16 Test working-directory revision
1813 6
1813 6
1814 7
1814 7
1815 2147483647
1815 2147483647
1816 $ hg debugrevspec '0:wdir() & ancestor(wdir())'
1817 2147483647
1818 $ hg debugrevspec '0:wdir() & ancestor(.:wdir())'
1819 4
1820 $ hg debugrevspec '0:wdir() & ancestor(wdir(), wdir())'
1821 2147483647
1822 $ hg debugrevspec '0:wdir() & ancestor(wdir(), tip)'
1823 4
1824 $ hg debugrevspec 'null:wdir() & ancestor(wdir(), null)'
1825 -1
1816 $ hg debugrevspec 'wdir()~0'
1826 $ hg debugrevspec 'wdir()~0'
1817 2147483647
1827 2147483647
1818 $ hg debugrevspec 'p1(wdir())'
1828 $ hg debugrevspec 'p1(wdir())'
General Comments 0
You need to be logged in to leave comments. Login now