Show More
@@ -112,12 +112,12 b' class shelvedfile(object):' | |||||
112 | return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root, |
|
112 | return bundlerepo.bundlerepository(self.repo.baseui, self.repo.root, | |
113 | self.vfs.join(self.fname)) |
|
113 | self.vfs.join(self.fname)) | |
114 | def writebundle(self, bases, node): |
|
114 | def writebundle(self, bases, node): | |
115 | btype = 'HG10BZ' |
|
115 | cgversion = changegroup.safeversion(self.repo) | |
116 | cgversion = '01' |
|
116 | if cgversion == '01': | |
117 | compression = None |
|
117 | btype = 'HG10BZ' | |
118 | if 'generaldelta' in self.repo.requirements: |
|
118 | compression = None | |
|
119 | else: | |||
119 | btype = 'HG20' |
|
120 | btype = 'HG20' | |
120 | cgversion = '02' |
|
|||
121 | compression = 'BZ' |
|
121 | compression = 'BZ' | |
122 |
|
122 | |||
123 | cg = changegroup.changegroupsubset(self.repo, bases, [node], 'shelve', |
|
123 | cg = changegroup.changegroupsubset(self.repo, bases, [node], 'shelve', |
@@ -963,7 +963,8 b' def supportedversions(repo):' | |||||
963 |
|
963 | |||
964 | def safeversion(repo): |
|
964 | def safeversion(repo): | |
965 | # Finds the smallest version that it's safe to assume clients of the repo |
|
965 | # Finds the smallest version that it's safe to assume clients of the repo | |
966 | # will support. |
|
966 | # will support. For example, all hg versions that support generaldelta also | |
|
967 | # support changegroup 02. | |||
967 | versions = supportedversions(repo) |
|
968 | versions = supportedversions(repo) | |
968 | if 'generaldelta' in repo.requirements: |
|
969 | if 'generaldelta' in repo.requirements: | |
969 | versions.discard('01') |
|
970 | versions.discard('01') |
@@ -296,6 +296,22 b' Stripping and recovering changes should ' | |||||
296 | $ hg st --change tip |
|
296 | $ hg st --change tip | |
297 | M dir1/a |
|
297 | M dir1/a | |
298 |
|
298 | |||
|
299 | Shelving and unshelving should work | |||
|
300 | ||||
|
301 | $ echo foo >> dir1/a | |||
|
302 | $ hg --config extensions.shelve= shelve | |||
|
303 | shelved as default | |||
|
304 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
305 | $ hg --config extensions.shelve= unshelve | |||
|
306 | unshelving change 'default' | |||
|
307 | $ hg diff --nodates | |||
|
308 | diff -r 708a273da119 dir1/a | |||
|
309 | --- a/dir1/a | |||
|
310 | +++ b/dir1/a | |||
|
311 | @@ -1,1 +1,2 @@ | |||
|
312 | 1 | |||
|
313 | +foo | |||
|
314 | ||||
299 | Create deeper repo with tree manifests. |
|
315 | Create deeper repo with tree manifests. | |
300 |
|
316 | |||
301 | $ cd .. |
|
317 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now