##// END OF EJS Templates
localrepo: don't allow lookup of working directory revision...
Martin von Zweigbergk -
r42248:fcd7a91d default
parent child Browse files
Show More
@@ -1564,7 +1564,10 b' class localrepository(object):'
1564 pass
1564 pass
1565
1565
1566 def lookup(self, key):
1566 def lookup(self, key):
1567 return scmutil.revsymbol(self, key).node()
1567 node = scmutil.revsymbol(self, key).node()
1568 if node is None:
1569 raise error.RepoLookupError(_("unknown revision '%s'") % key)
1570 return node
1568
1571
1569 def lookupbranch(self, key):
1572 def lookupbranch(self, key):
1570 if self.branchmap().hasbranch(key):
1573 if self.branchmap().hasbranch(key):
@@ -218,11 +218,10 b' manifest -r tip'
218 $ hg ci -Aqm 'the working copy is called ffffffffffff'
218 $ hg ci -Aqm 'the working copy is called ffffffffffff'
219
219
220 $ cd ..
220 $ cd ..
221 BROKEN: crashes when the "ffffffffffff" is encountered
222 $ hg convert commit-references new-commit-references -q \
221 $ hg convert commit-references new-commit-references -q \
223 > --config convert.hg.sourcename=yes 2>&1 | grep TypeError
222 > --config convert.hg.sourcename=yes
224 TypeError: b2a_hex() argument 1 must be string or buffer, not None
225 $ cd new-commit-references
223 $ cd new-commit-references
226 $ hg log -T '{node|short} {desc}\n'
224 $ hg log -T '{node|short} {desc}\n'
225 fe295c9e6bc6 the working copy is called ffffffffffff
227 642508659503 the previous commit was c2491f685436
226 642508659503 the previous commit was c2491f685436
228 c2491f685436 initial
227 c2491f685436 initial
@@ -76,10 +76,9 b' not are encoded like a node:'
76 [255]
76 [255]
77
77
78 Test pull of working copy revision
78 Test pull of working copy revision
79 BROKEN: should give a better error message
80 $ hg pull -r 'ffffffffffff'
79 $ hg pull -r 'ffffffffffff'
81 pulling from http://foo@localhost:$HGPORT/
80 pulling from http://foo@localhost:$HGPORT/
82 abort: b2a_hex() argument 1 must be string or buffer, not None!
81 abort: unknown revision 'ffffffffffff'!
83 [255]
82 [255]
84
83
85 Issue622: hg init && hg pull -u URL doesn't checkout default branch
84 Issue622: hg init && hg pull -u URL doesn't checkout default branch
General Comments 0
You need to be logged in to leave comments. Login now