##// END OF EJS Templates
narrow: add capabilities for local repos, not just remote peers...
Charles Chamberlain -
r47664:63100115 default
parent child Browse files
Show More
@@ -73,6 +73,7 b' from . import ('
73 txnutil,
73 txnutil,
74 util,
74 util,
75 vfs as vfsmod,
75 vfs as vfsmod,
76 wireprototypes,
76 )
77 )
77
78
78 from .interfaces import (
79 from .interfaces import (
@@ -1495,6 +1496,8 b' class localrepository(object):'
1495 bundle2.getrepocaps(self, role=b'client')
1496 bundle2.getrepocaps(self, role=b'client')
1496 )
1497 )
1497 caps.add(b'bundle2=' + urlreq.quote(capsblob))
1498 caps.add(b'bundle2=' + urlreq.quote(capsblob))
1499 if self.ui.configbool(b'experimental', b'narrow'):
1500 caps.add(wireprototypes.NARROWCAP)
1498 return caps
1501 return caps
1499
1502
1500 # Don't cache auditor/nofsauditor, or you'll end up with reference cycle:
1503 # Don't cache auditor/nofsauditor, or you'll end up with reference cycle:
@@ -64,15 +64,17 b' narrow clone a file, f10'
64
64
65 $ cd ..
65 $ cd ..
66
66
67 BUG: local-to-local narrow clones should work, but don't.
67 local-to-local narrow clones work
68
68
69 $ hg clone --narrow master narrow-via-localpeer --noupdate --include "dir/src/f10"
69 $ hg clone --narrow master narrow-via-localpeer --noupdate --include "dir/src/f10"
70 requesting all changes
70 requesting all changes
71 abort: server does not support narrow clones
71 adding changesets
72 [255]
72 adding manifests
73 adding file changes
74 added 3 changesets with 1 changes to 1 files
75 new changesets 5d21aaea77f8:26ce255d5b5d
73 $ hg tracked -R narrow-via-localpeer
76 $ hg tracked -R narrow-via-localpeer
74 abort: repository narrow-via-localpeer not found
77 I path:dir/src/f10
75 [255]
76 $ rm -Rf narrow-via-localpeer
78 $ rm -Rf narrow-via-localpeer
77
79
78 narrow clone with a newline should fail
80 narrow clone with a newline should fail
@@ -61,7 +61,7 b" Error if '.' or '..' are in the director"
61 [255]
61 [255]
62
62
63 Names with '.' in them are OK.
63 Names with '.' in them are OK.
64 $ hg clone --narrow ssh://user@dummy/master should-work --include a/.b/c
64 $ hg clone --narrow ./master should-work --include a/.b/c
65 requesting all changes
65 requesting all changes
66 adding changesets
66 adding changesets
67 adding manifests
67 adding manifests
General Comments 0
You need to be logged in to leave comments. Login now