D3060: tests: disallow using simple store repo with bundlerepo

2018-04-04 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG45a4799174a1: tests: disallow using simple store repo with 
bundlerepo (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3060?vs=7635=7648

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  
1   5 25ecb8cb8618  
+
+#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 +
   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@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 <> $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()
+
+@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
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3060: tests: disallow using simple store repo with bundlerepo

2018-04-04 Thread indygreg (Gregory Szorc)
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=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  
1   5 25ecb8cb8618  
+
+#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 +
   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@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 <> $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()
+
+@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
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D3060: tests: disallow using simple store repo with bundlerepo

2018-04-03 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  bundlerepo is... going to be difficult to port to an alternate
  store because it assumes revlogs for storage and essentially
  overlays the contents of a bundle onto a fake revlog-like
  primitive. It will be a good test case for our eventual new
  storage interface.
  
  Refactoring bundlerepo to make it work with non-revlog storage is
  going to be a bit of work. So for now, let's refuse to use the
  simple store repo when a bundlerepo is in play.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3060

AFFECTED FILES
  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  
1   5 25ecb8cb8618  
+
+#if no-reposimplestore
   $ 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 +
   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 no-reposimplestore
   $ hg log -G --template '{rev}  {desc|firstline}  {author}' -R 
bundle://.hg/shelved/default.hg -r 'bundle()'
   o  4  changes to: commit stuff  shelve@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 no-reposimplestore
   $ 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
@@ -128,6 +128,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 no-reposimplestore
   $ hg incoming .hg/strip-backup/*-backup.hg
   comparing with .hg/strip-backup/*-backup.hg (glob)
   changeset:   0:* (glob)
@@ -150,6 +152,8 @@
   date:Thu Jan 01 00:00:00 1970 +
   summary: modify inside
   
+#endif
+
   $ hg unbundle .hg/strip-backup/*-backup.hg
   adding changesets
   adding manifests
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 no-reposimplestore
+
   $ cat <> $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 no-reposimplestore
+
 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)



To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel