[PATCH 1 of 5 V2] pullreport: add a test to show misreporting of visible changeset
Boris Feld
boris.feld at octobus.net
Fri Sep 28 17:49:07 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1538064373 -7200
# Thu Sep 27 18:06:13 2018 +0200
# Node ID 78ef4cda114aabd21835d7bc08b0a7c04040d80f
# Parent 4e3e9163c676af92f765683958dbdc68b9dc16bd
# EXP-Topic obsolete-duplicates
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 78ef4cda114a
pullreport: add a test to show misreporting of visible changeset
The current code ignores all obsolete changesets including the visible one. We
add a test showing this behavior before fixing the behavior.
diff --git a/tests/test-obsolete-distributed.t b/tests/test-obsolete-distributed.t
--- a/tests/test-obsolete-distributed.t
+++ b/tests/test-obsolete-distributed.t
@@ -487,3 +487,55 @@ decision is made in that case, so receiv
ef908e42ce65ef57f970d799acaddde26f58a4cc 5ffb9e311b35f6ab6f76f667ca5d6e595645481b 0 (Thu Jan 01 00:00:00 1970 +0000) {'ef1': '4', 'operation': 'rebase', 'user': 'bob'}
$ cd ..
+
+Test pull report consistency
+============================
+
+obsolete but visible should be reported
+---------------------------------------
+
+Setup
+
+ $ hg init repo-a
+ $ cat << EOF >> repo-a/.hg/hgrc
+ > [ui]
+ > username=test
+ > EOF
+ $ cd repo-a
+ $ hg debugbuilddag ..
+ $ hg debugobsolete `getid tip`
+ obsoleted 1 changesets
+ $ cd ../
+ $ hg clone --pull repo-a repo-b
+ requesting all changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 0 changes to 0 files
+ new changesets 1ea73414a91b (1 drafts)
+ updating to branch default
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg -R repo-a up tip --hidden
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ updated to hidden changeset 66f7d451a68b
+ (hidden revision '66f7d451a68b' is pruned)
+ $ hg -R repo-a branch foo
+ marked working directory as branch foo
+ (branches are permanent and global, did you want a bookmark?)
+ $ hg -R repo-a commit -m foo
+ 1 new orphan changesets
+
+Actual test
+(BROKEN)
+
+ $ hg -R repo-b pull
+ pulling from $TESTTMP/distributed-chain-building/distributed-chain-building/repo-a
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 2 changesets with 0 changes to 0 files
+ 1 new obsolescence markers
+ 1 new orphan changesets
+ new changesets 95d586532b49 (1 drafts)
+ (run 'hg update' to get a working copy)
More information about the Mercurial-devel
mailing list