##// END OF EJS Templates
revset: populate wdir() by its hash or revision number...
Yuya Nishihara -
r42449:6bc1245c default
parent child Browse files
Show More
@@ -123,8 +123,7 b' def stringset(repo, subset, x, order):'
123 123 if not x:
124 124 raise error.ParseError(_("empty string is not a valid revision"))
125 125 x = scmutil.intrev(scmutil.revsymbol(repo, x))
126 if (x in subset
127 or x == node.nullrev and isinstance(subset, fullreposet)):
126 if x in subset or x in _virtualrevs and isinstance(subset, fullreposet):
128 127 return baseset([x])
129 128 return baseset()
130 129
@@ -2265,7 +2264,7 b' def _orderedlist(repo, subset, x):'
2265 2264 if r in seen:
2266 2265 continue
2267 2266 if (r in subset
2268 or r == node.nullrev and isinstance(subset, fullreposet)):
2267 or r in _virtualrevs and isinstance(subset, fullreposet)):
2269 2268 ls.append(r)
2270 2269 seen.add(r)
2271 2270 return baseset(ls)
@@ -1956,25 +1956,26 b' For tests consistency'
1956 1956 2147483647
1957 1957
1958 1958 Test working-directory integer revision and node id
1959 (BUG: '0:wdir()' is still needed to populate wdir revision)
1960 1959
1961 $ hg debugrevspec '0:wdir() & 2147483647'
1960 $ hg debugrevspec '2147483647'
1962 1961 2147483647
1963 $ hg debugrevspec '0:wdir() & rev(2147483647)'
1962 $ hg debugrevspec 'rev(2147483647)'
1963 2147483647
1964 $ hg debugrevspec 'ffffffffffffffffffffffffffffffffffffffff'
1964 1965 2147483647
1965 $ hg debugrevspec '0:wdir() & ffffffffffffffffffffffffffffffffffffffff'
1966 $ hg debugrevspec 'ffffffffffff'
1966 1967 2147483647
1967 $ hg debugrevspec '0:wdir() & ffffffffffff'
1968 $ hg debugrevspec 'id(ffffffffffffffffffffffffffffffffffffffff)'
1968 1969 2147483647
1969 $ hg debugrevspec '0:wdir() & id(ffffffffffffffffffffffffffffffffffffffff)'
1970 $ hg debugrevspec 'id(ffffffffffff)'
1970 1971 2147483647
1971 $ hg debugrevspec '0:wdir() & id(ffffffffffff)'
1972 $ hg debugrevspec 'ffffffffffff+000000000000'
1972 1973 2147483647
1974 -1
1973 1975
1974 1976 $ cd ..
1975 1977
1976 1978 Test short 'ff...' hash collision
1977 (BUG: '0:wdir()' is still needed to populate wdir revision)
1978 1979
1979 1980 $ hg init wdir-hashcollision
1980 1981 $ cd wdir-hashcollision
@@ -2000,21 +2001,21 b" Test short 'ff...' hash collision"
2000 2001 $ hg debugobsolete fffbae3886c8fbb2114296380d276fd37715d571
2001 2002 obsoleted 1 changesets
2002 2003
2003 $ hg debugrevspec '0:wdir() & fff'
2004 $ hg debugrevspec 'fff'
2004 2005 abort: 00changelog.i@fff: ambiguous identifier!
2005 2006 [255]
2006 $ hg debugrevspec '0:wdir() & ffff'
2007 $ hg debugrevspec 'ffff'
2007 2008 abort: 00changelog.i@ffff: ambiguous identifier!
2008 2009 [255]
2009 $ hg debugrevspec '0:wdir() & fffb'
2010 $ hg debugrevspec 'fffb'
2010 2011 abort: 00changelog.i@fffb: ambiguous identifier!
2011 2012 [255]
2012 2013 BROKEN should be '2' (node lookup uses unfiltered repo)
2013 $ hg debugrevspec '0:wdir() & id(fffb)'
2014 $ hg debugrevspec 'id(fffb)'
2014 2015 BROKEN should be '2' (node lookup uses unfiltered repo)
2015 $ hg debugrevspec '0:wdir() & ffff8'
2016 $ hg debugrevspec 'ffff8'
2016 2017 4
2017 $ hg debugrevspec '0:wdir() & fffff'
2018 $ hg debugrevspec 'fffff'
2018 2019 2147483647
2019 2020
2020 2021 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now