##// END OF EJS Templates
remotefilelog: correctly reject wdir filenodes...
Augie Fackler -
r42264:864f9f63 default
parent child Browse files
Show More
@@ -10,7 +10,12 b' from __future__ import absolute_import'
10 import collections
10 import collections
11 import os
11 import os
12
12
13 from mercurial.node import bin, nullid
13 from mercurial.node import (
14 bin,
15 nullid,
16 wdirfilenodeids,
17 wdirid,
18 )
14 from mercurial.i18n import _
19 from mercurial.i18n import _
15 from mercurial import (
20 from mercurial import (
16 ancestor,
21 ancestor,
@@ -306,6 +311,8 b' class remotefilelog(object):'
306 if len(node) != 20:
311 if len(node) != 20:
307 raise error.LookupError(node, self.filename,
312 raise error.LookupError(node, self.filename,
308 _('invalid revision input'))
313 _('invalid revision input'))
314 if node == wdirid or node in wdirfilenodeids:
315 raise error.WdirUnsupported
309
316
310 store = self.repo.contentstore
317 store = self.repo.contentstore
311 rawtext = store.get(self.filename, node)
318 rawtext = store.get(self.filename, node)
@@ -35,11 +35,6 b' Test grepping the working directory.'
35
35
36 $ hg grep --all-files x
36 $ hg grep --all-files x
37 x:x
37 x:x
38 BROKEN: modifications in the wdir tries to fetch from the server.
39 $ echo foo >> x
38 $ echo foo >> x
40 $ hg grep --all-files x
39 $ hg grep --all-files x
41 remote: abort: working directory revision cannot be specified
40 x:x
42 1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
43 abort: error downloading file contents:
44 'connection closed early'
45 [255]
General Comments 0
You need to be logged in to leave comments. Login now