##// END OF EJS Templates
errors: raise InputError if an ambiguous revision id prefix is used...
Martin von Zweigbergk -
r46731:be3d8178 default
parent child Browse files
Show More
@@ -2691,7 +2691,15 b' subscriptrelations = {'
2691
2691
2692
2692
2693 def lookupfn(repo):
2693 def lookupfn(repo):
2694 return lambda symbol: scmutil.isrevsymbol(repo, symbol)
2694 def fn(symbol):
2695 try:
2696 return scmutil.isrevsymbol(repo, symbol)
2697 except error.AmbiguousPrefixLookupError:
2698 raise error.InputError(
2699 b'ambiguous revision identifier: %s' % symbol
2700 )
2701
2702 return fn
2695
2703
2696
2704
2697 def match(ui, spec, lookup=None):
2705 def match(ui, spec, lookup=None):
@@ -1798,7 +1798,7 b' def extdatasource(repo, source):'
1798 k = encoding.tolocal(k)
1798 k = encoding.tolocal(k)
1799 try:
1799 try:
1800 data[revsingle(repo, k).rev()] = encoding.tolocal(v)
1800 data[revsingle(repo, k).rev()] = encoding.tolocal(v)
1801 except (error.LookupError, error.RepoLookupError):
1801 except (error.LookupError, error.RepoLookupError, error.InputError):
1802 pass # we ignore data for nodes that don't exist locally
1802 pass # we ignore data for nodes that don't exist locally
1803 finally:
1803 finally:
1804 if proc:
1804 if proc:
@@ -36,8 +36,8 b' 9 was unambiguous and still is'
36 1:9
36 1:9
37 7 was ambiguous and still is
37 7 was ambiguous and still is
38 $ hg l -r 7
38 $ hg l -r 7
39 abort: 00changelog.i@7: ambiguous identifier
39 abort: ambiguous revision identifier: 7
40 [255]
40 [10]
41 7b is no longer ambiguous
41 7b is no longer ambiguous
42 $ hg l -r 7b
42 $ hg l -r 7b
43 3:7b
43 3:7b
@@ -1873,8 +1873,8 b' Test hexadecimal revision'
1873 3
1873 3
1874 $ hg log --template '{rev}\n' -r 'id(x)'
1874 $ hg log --template '{rev}\n' -r 'id(x)'
1875 $ hg log --template '{rev}\n' -r 'x'
1875 $ hg log --template '{rev}\n' -r 'x'
1876 abort: 00changelog.i@: ambiguous identifier
1876 abort: ambiguous revision identifier: x
1877 [255]
1877 [10]
1878 $ log 'id(23268)'
1878 $ log 'id(23268)'
1879 4
1879 4
1880 $ log 'id(2785f51eece)'
1880 $ log 'id(2785f51eece)'
@@ -2040,14 +2040,14 b" Test short 'ff...' hash collision"
2040 obsoleted 1 changesets
2040 obsoleted 1 changesets
2041
2041
2042 $ hg debugrevspec 'fff'
2042 $ hg debugrevspec 'fff'
2043 abort: 00changelog.i@fff: ambiguous identifier
2043 abort: ambiguous revision identifier: fff
2044 [255]
2044 [10]
2045 $ hg debugrevspec 'ffff'
2045 $ hg debugrevspec 'ffff'
2046 abort: 00changelog.i@ffff: ambiguous identifier
2046 abort: ambiguous revision identifier: ffff
2047 [255]
2047 [10]
2048 $ hg debugrevspec 'fffb'
2048 $ hg debugrevspec 'fffb'
2049 abort: 00changelog.i@fffb: ambiguous identifier
2049 abort: ambiguous revision identifier: fffb
2050 [255]
2050 [10]
2051 BROKEN should be '2' (node lookup uses unfiltered repo)
2051 BROKEN should be '2' (node lookup uses unfiltered repo)
2052 $ hg debugrevspec 'id(fffb)'
2052 $ hg debugrevspec 'id(fffb)'
2053 BROKEN should be '2' (node lookup uses unfiltered repo)
2053 BROKEN should be '2' (node lookup uses unfiltered repo)
General Comments 0
You need to be logged in to leave comments. Login now