[PATCH 1 of 2 V2] test: add an extra base changeset in test-obsolete.t

Pierre-Yves David pierre-yves.david at ens-lyon.org
Sun Dec 6 22:10:10 UTC 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1449389524 28800
#      Sun Dec 06 00:12:04 2015 -0800
# Node ID 179e1f468d683a1b9e7e8df76af0690b454c4025
# Parent  60c4a2378aed69e37859b18dd799d72a209e118c
# EXP-Topic fixknown
# Available At http://hg.netv6.net/marmoute-wip/mercurial/
#              hg pull http://hg.netv6.net/marmoute-wip/mercurial/ -r 179e1f468d68
test: add an extra base changeset in test-obsolete.t

A fix to issue4982 (not fixed in this patch) will reinforce the filtering
during discovery. This will makes two of our test repository to appear
unrelated (because all commons content is properly hidden). To avoid this, we
introduce an extra base changeset that will not get obsoleted. This affect
various tests output so we put this addition in its own changeset.

diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
--- a/tests/test-obsolete.t
+++ b/tests/test-obsolete.t
@@ -710,33 +710,40 @@ Test incoming/outcoming with changesets 
 
 This test issue 3805
 
   $ hg init repo-issue3805
   $ cd repo-issue3805
+  $ echo "base" > base
+  $ hg ci -Am "base"
+  adding base
   $ echo "foo" > foo
   $ hg ci -Am "A"
   adding foo
   $ hg clone . ../other-issue3805
   updating to branch default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ echo "bar" >> foo
   $ hg ci --amend
   $ cd ../other-issue3805
   $ hg log -G
-  @  0:193e9254ce7e (draft) [tip ] A
+  @  1:29f0c6921ddd (draft) [tip ] A
+  |
+  o  0:d20a80d4def3 (draft) [ ] base
   
   $ hg log -G -R ../repo-issue3805
-  @  2:3816541e5485 (draft) [tip ] A
+  @  3:323a9c3ddd91 (draft) [tip ] A
+  |
+  o  0:d20a80d4def3 (draft) [ ] base
   
   $ hg incoming
   comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
   searching for changes
-  2:3816541e5485 (draft) [tip ] A
+  3:323a9c3ddd91 (draft) [tip ] A
   $ hg incoming --bundle ../issue3805.hg
   comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
   searching for changes
-  2:3816541e5485 (draft) [tip ] A
+  3:323a9c3ddd91 (draft) [tip ] A
   $ hg outgoing
   comparing with $TESTTMP/tmpe/repo-issue3805 (glob)
   searching for changes
   no changes found
   [1]
@@ -747,11 +754,11 @@ This test issue 3805
   $ cat hg.pid >> $DAEMON_PIDS
 
   $ hg incoming http://localhost:$HGPORT
   comparing with http://localhost:$HGPORT/
   searching for changes
-  1:3816541e5485 (draft) [tip ] A
+  2:323a9c3ddd91 (draft) [tip ] A
   $ hg outgoing http://localhost:$HGPORT
   comparing with http://localhost:$HGPORT/
   searching for changes
   no changes found
   [1]
@@ -765,44 +772,46 @@ This test issue 3814
 (nothing to push but locally hidden changeset)
 
   $ cd ..
   $ hg init repo-issue3814
   $ cd repo-issue3805
-  $ hg push -r 3816541e5485 ../repo-issue3814
+  $ hg push -r 323a9c3ddd91 ../repo-issue3814
   pushing to ../repo-issue3814
   searching for changes
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 1 changes to 1 files
+  added 2 changesets with 2 changes to 2 files
   2 new obsolescence markers
   $ hg out ../repo-issue3814
   comparing with ../repo-issue3814
   searching for changes
   no changes found
   [1]
 
 Test that a local tag blocks a changeset from being hidden
 
-  $ hg tag -l visible -r 0 --hidden
+  $ hg tag -l visible -r 1 --hidden
   $ hg log -G
-  @  2:3816541e5485 (draft) [tip ] A
-  
-  x  0:193e9254ce7e (draft) [visible ] A
+  @  3:323a9c3ddd91 (draft) [tip ] A
+  |
+  | x  1:29f0c6921ddd (draft) [visible ] A
+  |/
+  o  0:d20a80d4def3 (draft) [ ] base
   
 Test that removing a local tag does not cause some commands to fail
 
   $ hg tag -l -r tip tiptag
   $ hg tags
-  tiptag                             2:3816541e5485
-  tip                                2:3816541e5485
-  visible                            0:193e9254ce7e
+  tiptag                             3:323a9c3ddd91
+  tip                                3:323a9c3ddd91
+  visible                            1:29f0c6921ddd
   $ hg --config extensions.strip= strip -r tip --no-backup
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg tags
-  visible                            0:193e9254ce7e
-  tip                                0:193e9254ce7e
+  visible                            1:29f0c6921ddd
+  tip                                1:29f0c6921ddd
 
 Test bundle overlay onto hidden revision
 
   $ cd ..
   $ hg init repo-bundleoverlay


More information about the Mercurial-devel mailing list