Show More
@@ -731,12 +731,13 b' def getrepofeatures():' | |||||
731 | """ |
|
731 | """ | |
732 | # Default list provided by core. |
|
732 | # Default list provided by core. | |
733 | features = { |
|
733 | features = { | |
|
734 | 'bundlerepo', | |||
734 | 'revlogstore', |
|
735 | 'revlogstore', | |
735 | } |
|
736 | } | |
736 |
|
737 | |||
737 | # Features that imply other features. |
|
738 | # Features that imply other features. | |
738 | implies = { |
|
739 | implies = { | |
739 | 'simplestore': ['-revlogstore'], |
|
740 | 'simplestore': ['-revlogstore', '-bundlerepo'], | |
740 | } |
|
741 | } | |
741 |
|
742 | |||
742 | for override in os.environ.get('HGREPOFEATURES', '').split(' '): |
|
743 | for override in os.environ.get('HGREPOFEATURES', '').split(' '): | |
@@ -765,3 +766,7 b' def has_reporevlogstore():' | |||||
765 | @check('reposimplestore', 'repository using simple storage extension') |
|
766 | @check('reposimplestore', 'repository using simple storage extension') | |
766 | def has_reposimplestore(): |
|
767 | def has_reposimplestore(): | |
767 | return 'simplestore' in getrepofeatures() |
|
768 | return 'simplestore' in getrepofeatures() | |
|
769 | ||||
|
770 | @check('repobundlerepo', 'whether we can open bundle files as repos') | |||
|
771 | def has_repobundlerepo(): | |||
|
772 | return 'bundlerepo' in getrepofeatures() |
@@ -24,6 +24,7 b' from mercurial.thirdparty import (' | |||||
24 | ) |
|
24 | ) | |
25 | from mercurial import ( |
|
25 | from mercurial import ( | |
26 | ancestor, |
|
26 | ancestor, | |
|
27 | bundlerepo, | |||
27 | error, |
|
28 | error, | |
28 | filelog, |
|
29 | filelog, | |
29 | mdiff, |
|
30 | mdiff, | |
@@ -587,6 +588,9 b' def reposetup(ui, repo):' | |||||
587 | if not repo.local(): |
|
588 | if not repo.local(): | |
588 | return |
|
589 | return | |
589 |
|
590 | |||
|
591 | if isinstance(repo, bundlerepo.bundlerepository): | |||
|
592 | raise error.Abort(_('cannot use simple store with bundlerepo')) | |||
|
593 | ||||
590 | class simplestorerepo(repo.__class__): |
|
594 | class simplestorerepo(repo.__class__): | |
591 | def file(self, f): |
|
595 | def file(self, f): | |
592 | return filestorage(self.svfs, f) |
|
596 | return filestorage(self.svfs, f) |
@@ -1,3 +1,5 b'' | |||||
|
1 | #require repobundlerepo | |||
|
2 | ||||
1 | Source bundle was generated with the following script: |
|
3 | Source bundle was generated with the following script: | |
2 |
|
4 | |||
3 | # hg init |
|
5 | # hg init |
@@ -1,3 +1,5 b'' | |||||
|
1 | #require repobundlerepo | |||
|
2 | ||||
1 | $ cat <<EOF >> $HGRCPATH |
|
3 | $ cat <<EOF >> $HGRCPATH | |
2 | > [extensions] |
|
4 | > [extensions] | |
3 | > mq= |
|
5 | > mq= |
@@ -130,6 +130,8 b' Also verify we can apply the bundle with' | |||||
130 | $ hg strip 0 |
|
130 | $ hg strip 0 | |
131 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
131 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
132 | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob) |
|
132 | saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob) | |
|
133 | ||||
|
134 | #if repobundlerepo | |||
133 | $ hg incoming .hg/strip-backup/*-backup.hg |
|
135 | $ hg incoming .hg/strip-backup/*-backup.hg | |
134 | comparing with .hg/strip-backup/*-backup.hg (glob) |
|
136 | comparing with .hg/strip-backup/*-backup.hg (glob) | |
135 | changeset: 0:* (glob) |
|
137 | changeset: 0:* (glob) | |
@@ -161,3 +163,4 b' Also verify we can apply the bundle with' | |||||
161 | added 3 changesets with 2 changes to 1 files (+1 heads) |
|
163 | added 3 changesets with 2 changes to 1 files (+1 heads) | |
162 | new changesets *:* (glob) |
|
164 | new changesets *:* (glob) | |
163 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
165 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
|
166 | #endif |
@@ -1244,6 +1244,7 b' Test bundle overlay onto hidden revision' | |||||
1244 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1244 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1245 |
|
1245 | |||
1246 |
|
1246 | |||
|
1247 | #if repobundlerepo | |||
1247 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg |
|
1248 | $ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg | |
1248 | comparing with ../repo-bundleoverlay |
|
1249 | comparing with ../repo-bundleoverlay | |
1249 | searching for changes |
|
1250 | searching for changes | |
@@ -1256,6 +1257,7 b' Test bundle overlay onto hidden revision' | |||||
1256 | |/ |
|
1257 | |/ | |
1257 | o 0:4b34ecfb0d56 (draft) [ ] A |
|
1258 | o 0:4b34ecfb0d56 (draft) [ ] A | |
1258 |
|
1259 | |||
|
1260 | #endif | |||
1259 |
|
1261 | |||
1260 | #if serve |
|
1262 | #if serve | |
1261 |
|
1263 |
@@ -771,10 +771,12 b' unshelve and conflicts with tracked and ' | |||||
771 | $ hg shelve |
|
771 | $ hg shelve | |
772 | shelved as default |
|
772 | shelved as default | |
773 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
773 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
774 | #if repobundlerepo | |||
774 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' |
|
775 | $ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()' | |
775 | o 4 changes to: commit stuff shelve@localhost |
|
776 | o 4 changes to: commit stuff shelve@localhost | |
776 | | |
|
777 | | | |
777 | ~ |
|
778 | ~ | |
|
779 | #endif | |||
778 | $ hg log -G --template '{rev} {desc|firstline} {author}' |
|
780 | $ hg log -G --template '{rev} {desc|firstline} {author}' | |
779 | @ 3 commit stuff test |
|
781 | @ 3 commit stuff test | |
780 | | |
|
782 | | |
@@ -325,6 +325,8 b' Stripping and recovering changes should ' | |||||
325 | rev linkrev nodeid p1 p2 |
|
325 | rev linkrev nodeid p1 p2 | |
326 | 0 4 064927a0648a 000000000000 000000000000 |
|
326 | 0 4 064927a0648a 000000000000 000000000000 | |
327 | 1 5 25ecb8cb8618 000000000000 000000000000 |
|
327 | 1 5 25ecb8cb8618 000000000000 000000000000 | |
|
328 | ||||
|
329 | #if repobundlerepo | |||
328 | $ hg incoming .hg/strip-backup/* |
|
330 | $ hg incoming .hg/strip-backup/* | |
329 | comparing with .hg/strip-backup/*-backup.hg (glob) |
|
331 | comparing with .hg/strip-backup/*-backup.hg (glob) | |
330 | searching for changes |
|
332 | searching for changes | |
@@ -334,6 +336,8 b' Stripping and recovering changes should ' | |||||
334 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
336 | date: Thu Jan 01 00:00:00 1970 +0000 | |
335 | summary: modify dir1/a |
|
337 | summary: modify dir1/a | |
336 |
|
338 | |||
|
339 | #endif | |||
|
340 | ||||
337 | $ hg unbundle .hg/strip-backup/* |
|
341 | $ hg unbundle .hg/strip-backup/* | |
338 | adding changesets |
|
342 | adding changesets | |
339 | adding manifests |
|
343 | adding manifests |
General Comments 0
You need to be logged in to leave comments.
Login now