Show More
@@ -28,7 +28,7 b' import url as urlmod' | |||||
28 | 'bundle2': '02', #legacy |
|
28 | 'bundle2': '02', #legacy | |
29 | } |
|
29 | } | |
30 |
|
30 | |||
31 | def parsebundlespec(repo, spec, strict=True): |
|
31 | def parsebundlespec(repo, spec, strict=True, externalnames=False): | |
32 | """Parse a bundle string specification into parts. |
|
32 | """Parse a bundle string specification into parts. | |
33 |
|
33 | |||
34 | Bundle specifications denote a well-defined bundle/exchange format. |
|
34 | Bundle specifications denote a well-defined bundle/exchange format. | |
@@ -46,6 +46,9 b' def parsebundlespec(repo, spec, strict=T' | |||||
46 | If ``strict`` is True (the default) <compression> is required. Otherwise, |
|
46 | If ``strict`` is True (the default) <compression> is required. Otherwise, | |
47 | it is optional. |
|
47 | it is optional. | |
48 |
|
48 | |||
|
49 | If ``externalnames`` is False (the default), the human-centric names will | |||
|
50 | be converted to their internal representation. | |||
|
51 | ||||
49 | Returns a 2-tuple of (compression, version). Compression will be ``None`` |
|
52 | Returns a 2-tuple of (compression, version). Compression will be ``None`` | |
50 | if not in strict mode and a compression isn't defined. |
|
53 | if not in strict mode and a compression isn't defined. | |
51 |
|
54 | |||
@@ -90,8 +93,9 b' def parsebundlespec(repo, spec, strict=T' | |||||
90 | raise error.UnsupportedBundleSpecification( |
|
93 | raise error.UnsupportedBundleSpecification( | |
91 | _('%s is not a recognized bundle specification') % spec) |
|
94 | _('%s is not a recognized bundle specification') % spec) | |
92 |
|
95 | |||
93 | compression = _bundlespeccompressions[compression] |
|
96 | if not externalnames: | |
94 |
|
|
97 | compression = _bundlespeccompressions[compression] | |
|
98 | version = _bundlespeccgversions[version] | |||
95 | return compression, version |
|
99 | return compression, version | |
96 |
|
100 | |||
97 | def readbundle(ui, fh, fname, vfs=None): |
|
101 | def readbundle(ui, fh, fname, vfs=None): |
General Comments 0
You need to be logged in to leave comments.
Login now