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