Show More
@@ -293,7 +293,7 b' def _widen(ui, repo, remote, commoninc, ' | |||||
293 | else: |
|
293 | else: | |
294 | known = [] |
|
294 | known = [] | |
295 | if ellipsesremote: |
|
295 | if ellipsesremote: | |
296 |
known = [ |
|
296 | known = [ctx.node() for ctx in | |
297 | repo.set('::%ln', common) |
|
297 | repo.set('::%ln', common) | |
298 | if ctx.node() != node.nullid] |
|
298 | if ctx.node() != node.nullid] | |
299 | with remote.commandexecutor() as e: |
|
299 | with remote.commandexecutor() as e: |
@@ -13,7 +13,6 b' from mercurial import (' | |||||
13 | extensions, |
|
13 | extensions, | |
14 | hg, |
|
14 | hg, | |
15 | narrowspec, |
|
15 | narrowspec, | |
16 | node as nodemod, |
|
|||
17 | pycompat, |
|
16 | pycompat, | |
18 | wireprototypes, |
|
17 | wireprototypes, | |
19 | wireprotov1peer, |
|
18 | wireprotov1peer, | |
@@ -61,10 +60,13 b' def narrow_widen(repo, proto, oldinclude' | |||||
61 |
|
60 | |||
62 | preferuncompressed = False |
|
61 | preferuncompressed = False | |
63 | try: |
|
62 | try: | |
64 | oldincludes = wireprototypes.decodelist(oldincludes) |
|
63 | def splitpaths(data): | |
65 | newincludes = wireprototypes.decodelist(newincludes) |
|
64 | # work around ''.split(',') => [''] | |
66 | oldexcludes = wireprototypes.decodelist(oldexcludes) |
|
65 | return data.split(b',') if data else [] | |
67 | newexcludes = wireprototypes.decodelist(newexcludes) |
|
66 | oldincludes = splitpaths(oldincludes) | |
|
67 | newincludes = splitpaths(newincludes) | |||
|
68 | oldexcludes = splitpaths(oldexcludes) | |||
|
69 | newexcludes = splitpaths(newexcludes) | |||
68 | # validate the patterns |
|
70 | # validate the patterns | |
69 | narrowspec.validatepatterns(set(oldincludes)) |
|
71 | narrowspec.validatepatterns(set(oldincludes)) | |
70 | narrowspec.validatepatterns(set(newincludes)) |
|
72 | narrowspec.validatepatterns(set(newincludes)) | |
@@ -73,7 +75,6 b' def narrow_widen(repo, proto, oldinclude' | |||||
73 |
|
75 | |||
74 | common = wireprototypes.decodelist(commonheads) |
|
76 | common = wireprototypes.decodelist(commonheads) | |
75 | known = wireprototypes.decodelist(known) |
|
77 | known = wireprototypes.decodelist(known) | |
76 | known = {nodemod.bin(n) for n in known} |
|
|||
77 | if ellipses == '0': |
|
78 | if ellipses == '0': | |
78 | ellipses = False |
|
79 | ellipses = False | |
79 | else: |
|
80 | else: | |
@@ -106,10 +107,12 b' def narrow_widen(repo, proto, oldinclude' | |||||
106 | prefer_uncompressed=preferuncompressed) |
|
107 | prefer_uncompressed=preferuncompressed) | |
107 |
|
108 | |||
108 | def peernarrowwiden(remote, **kwargs): |
|
109 | def peernarrowwiden(remote, **kwargs): | |
109 | for ch in (r'oldincludes', r'newincludes', r'oldexcludes', r'newexcludes', |
|
110 | for ch in (r'commonheads', r'known'): | |
110 | r'commonheads', r'known'): |
|
|||
111 | kwargs[ch] = wireprototypes.encodelist(kwargs[ch]) |
|
111 | kwargs[ch] = wireprototypes.encodelist(kwargs[ch]) | |
112 |
|
112 | |||
|
113 | for ch in (r'oldincludes', r'newincludes', r'oldexcludes', r'newexcludes'): | |||
|
114 | kwargs[ch] = b','.join(kwargs[ch]) | |||
|
115 | ||||
113 | kwargs[r'ellipses'] = '%i' % bool(kwargs[r'ellipses']) |
|
116 | kwargs[r'ellipses'] = '%i' % bool(kwargs[r'ellipses']) | |
114 | f = remote._callcompressable('narrow_widen', **kwargs) |
|
117 | f = remote._callcompressable('narrow_widen', **kwargs) | |
115 | return bundle2.getunbundler(remote.ui, f) |
|
118 | return bundle2.getunbundler(remote.ui, f) |
@@ -22,5 +22,9 b'' | |||||
22 | you can override it by setting `$HGTEST_SHELL` or by passing it to |
|
22 | you can override it by setting `$HGTEST_SHELL` or by passing it to | |
23 | `run-tests.py --shell <shell>`. |
|
23 | `run-tests.py --shell <shell>`. | |
24 |
|
24 | |||
|
25 | * The (experimental) narrow extension's wire protocol changed. If | |||
|
26 | you're using it, you'll need to make sure to upgrade server and | |||
|
27 | client at the same time. | |||
|
28 | ||||
25 | == Internal API Changes == |
|
29 | == Internal API Changes == | |
26 |
|
30 |
General Comments 0
You need to be logged in to leave comments.
Login now