##// END OF EJS Templates
repair._bundle: fix traceback for bad config value...
Eric Sumner -
r23939:33d1b81c stable
parent child Browse files
Show More
@@ -17,6 +17,12 b' def _bundle(repo, bases, heads, node, su'
17 repo.ui.config('experimental', 'strip-bundle2-version'))
17 repo.ui.config('experimental', 'strip-bundle2-version'))
18 if usebundle2:
18 if usebundle2:
19 cgversion = repo.ui.config('experimental', 'strip-bundle2-version')
19 cgversion = repo.ui.config('experimental', 'strip-bundle2-version')
20 if cgversion not in changegroup.packermap:
21 repo.ui.warn(_('unknown strip-bundle2-version value %r; ' +
22 'should be one of %r\n') %
23 (cgversion, sorted(changegroup.packermap.keys()),))
24 cgversion = '01'
25 usebundle2 = False
20 else:
26 else:
21 cgversion = '01'
27 cgversion = '01'
22
28
@@ -197,6 +197,16 b''
197 date: Thu Jan 01 00:00:00 1970 +0000
197 date: Thu Jan 01 00:00:00 1970 +0000
198 summary: c
198 summary: c
199
199
200 $ hg --config experimental.bundle2-exp=True --config experimental.strip-bundle2-version=INVALID strip 4
201 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
202 unknown strip-bundle2-version value 'INVALID'; should be one of ['01', '02']
203 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob)
204 $ hg debugbundle .hg/strip-backup/*
205 264128213d290d868c54642d13aeaa3675551a78
206 $ restore
207
208 $ hg up -C 4
209 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
200 $ hg --config experimental.bundle2-exp=True --config experimental.strip-bundle2-version=02 --traceback strip 4
210 $ hg --config experimental.bundle2-exp=True --config experimental.strip-bundle2-version=02 --traceback strip 4
201 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
211 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
202 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob)
212 saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob)
General Comments 0
You need to be logged in to leave comments. Login now