##// 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 b' def ancestor(repo, subset, x):'
319 319 for r in reviter:
320 320 anc = anc.ancestor(repo[r])
321 321
322 if anc.rev() in subset:
323 return baseset([anc.rev()])
322 r = scmutil.intrev(anc)
323 if r in subset:
324 return baseset([r])
324 325 return baseset()
325 326
326 327 def _ancestors(repo, subset, x, followfirst=False, startdepth=None,
@@ -1813,6 +1813,16 b' Test working-directory revision'
1813 1813 6
1814 1814 7
1815 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 1826 $ hg debugrevspec 'wdir()~0'
1817 1827 2147483647
1818 1828 $ hg debugrevspec 'p1(wdir())'
General Comments 0
You need to be logged in to leave comments. Login now