D3060: tests: disallow using simple store repo with bundlerepo
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Apr 4 14:45:51 EDT 2018
indygreg updated this revision to Diff 7635.
indygreg edited the summary of this revision.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D3060?vs=7603&id=7635
REVISION DETAIL
https://phab.mercurial-scm.org/D3060
AFFECTED FILES
tests/hghave.py
tests/simplestorerepo.py
tests/test-manifest.t
tests/test-mq-pull-from-bundle.t
tests/test-narrow-strip.t
tests/test-obsolete.t
tests/test-shelve.t
tests/test-treemanifest.t
CHANGE DETAILS
diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -325,6 +325,8 @@
rev linkrev nodeid p1 p2
0 4 064927a0648a 000000000000 000000000000
1 5 25ecb8cb8618 000000000000 000000000000
+
+#if repobundlerepo
$ hg incoming .hg/strip-backup/*
comparing with .hg/strip-backup/*-backup.hg (glob)
searching for changes
@@ -334,6 +336,8 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: modify dir1/a
+#endif
+
$ hg unbundle .hg/strip-backup/*
adding changesets
adding manifests
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -771,10 +771,12 @@
$ hg shelve
shelved as default
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+#if repobundlerepo
$ hg log -G --template '{rev} {desc|firstline} {author}' -R bundle://.hg/shelved/default.hg -r 'bundle()'
o 4 changes to: commit stuff shelve at localhost
|
~
+#endif
$ hg log -G --template '{rev} {desc|firstline} {author}'
@ 3 commit stuff test
|
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -1244,6 +1244,7 @@
o 0:4b34ecfb0d56 (draft) [ ] A
+#if repobundlerepo
$ hg incoming ../repo-bundleoverlay --bundle ../bundleoverlay.hg
comparing with ../repo-bundleoverlay
searching for changes
@@ -1256,6 +1257,7 @@
|/
o 0:4b34ecfb0d56 (draft) [ ] A
+#endif
#if serve
diff --git a/tests/test-narrow-strip.t b/tests/test-narrow-strip.t
--- a/tests/test-narrow-strip.t
+++ b/tests/test-narrow-strip.t
@@ -130,6 +130,8 @@
$ hg strip 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
saved backup bundle to $TESTTMP/narrow/.hg/strip-backup/*-backup.hg (glob)
+
+#if repobundlerepo
$ hg incoming .hg/strip-backup/*-backup.hg
comparing with .hg/strip-backup/*-backup.hg (glob)
changeset: 0:* (glob)
@@ -161,3 +163,4 @@
added 3 changesets with 2 changes to 1 files (+1 heads)
new changesets *:* (glob)
(run 'hg heads' to see heads, 'hg merge' to merge)
+#endif
diff --git a/tests/test-mq-pull-from-bundle.t b/tests/test-mq-pull-from-bundle.t
--- a/tests/test-mq-pull-from-bundle.t
+++ b/tests/test-mq-pull-from-bundle.t
@@ -1,3 +1,5 @@
+#require repobundlerepo
+
$ cat <<EOF >> $HGRCPATH
> [extensions]
> mq=
diff --git a/tests/test-manifest.t b/tests/test-manifest.t
--- a/tests/test-manifest.t
+++ b/tests/test-manifest.t
@@ -1,3 +1,5 @@
+#require repobundlerepo
+
Source bundle was generated with the following script:
# hg init
diff --git a/tests/simplestorerepo.py b/tests/simplestorerepo.py
--- a/tests/simplestorerepo.py
+++ b/tests/simplestorerepo.py
@@ -24,6 +24,7 @@
)
from mercurial import (
ancestor,
+ bundlerepo,
error,
filelog,
mdiff,
@@ -587,6 +588,9 @@
if not repo.local():
return
+ if isinstance(repo, bundlerepo.bundlerepository):
+ raise error.Abort(_('cannot use simple store with bundlerepo'))
+
class simplestorerepo(repo.__class__):
def file(self, f):
return filestorage(self.svfs, f)
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -731,12 +731,13 @@
"""
# Default list provided by core.
features = {
+ 'bundlerepo',
'revlogstore',
}
# Features that imply other features.
implies = {
- 'simplestore': ['-revlogstore'],
+ 'simplestore': ['-revlogstore', '-bundlerepo'],
}
for override in os.environ.get('HGREPOFEATURES', '').split(' '):
@@ -765,3 +766,7 @@
@check('reposimplestore', 'repository using simple storage extension')
def has_reposimplestore():
return 'simplestore' in getrepofeatures()
+
+ at check('repobundlerepo', 'whether we can open bundle files as repos')
+def has_repobundlerepo():
+ return 'bundlerepo' in getrepofeatures()
To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list