D6385: tests: fix share test to actually share the repo

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu May 16 02:28:43 EDT 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  "repo2" is clearly meant to be a share from "repo1" but without
  sharing bookmarks. However, `hg unshare` was called in the repo, so it
  had become completely unrelated and thus not testing what it was
  supposed to test.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-share-bookmarks.t

CHANGE DETAILS

diff --git a/tests/test-share-bookmarks.t b/tests/test-share-bookmarks.t
--- a/tests/test-share-bookmarks.t
+++ b/tests/test-share-bookmarks.t
@@ -21,21 +21,6 @@
   updating working directory
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
-unshare it
-
-  $ cd repo2
-  $ hg unshare
-
-check that a change does not propagate
-
-  $ echo b >> b
-  $ hg commit -m'change in unshared'
-  $ cd ../repo1
-  $ hg id -r tip
-  c2e0ac586386 tip
-
-  $ cd ..
-
 test sharing bookmarks
 
   $ hg share -B repo1 repo3
@@ -48,7 +33,7 @@
   $ cd ../repo2
   $ hg book bm2
   $ hg bookmarks
-   * bm2                       3:0e6e70d1d5f1
+   * bm2                       2:c2e0ac586386
   $ cd ../repo3
   $ hg bookmarks
      bm1                       2:c2e0ac586386
@@ -69,7 +54,7 @@
 transaction requires locking store of source repository.
 
 Therefore, this test scenario ignores checking visibility of
-.hg/bookmakrs.pending in repo2, which shares repo1 without bookmarks.
+.hg/bookmarks.pending in repo2, which shares repo1 without bookmarks.
 
   $ cat > $TESTTMP/checkbookmarks.sh <<EOF
   > echo "@repo1"
@@ -88,7 +73,7 @@
      bm3                       2:c2e0ac586386
    * bmX                       2:c2e0ac586386
   @repo2
-   * bm2                       3:0e6e70d1d5f1
+   * bm2                       2:c2e0ac586386
   @repo3
      bm1                       2:c2e0ac586386
    * bm3                       2:c2e0ac586386
@@ -109,7 +94,7 @@
    * bm1                       2:c2e0ac586386
      bm3                       2:c2e0ac586386
   @repo2
-   * bm2                       3:0e6e70d1d5f1
+   * bm2                       2:c2e0ac586386
   @repo3
      bm1                       2:c2e0ac586386
      bm3                       2:c2e0ac586386



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list