changeset 39896:642cbc228bad

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.
author Boris Feld <boris.feld@octobus.net>
date Thu, 27 Sep 2018 18:06:13 +0200
parents 1a184b727aff
children a477679f6323
files tests/test-obsolete-distributed.t
diffstat 1 files changed, 52 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-obsolete-distributed.t	Wed Sep 26 10:38:37 2018 -0700
+++ b/tests/test-obsolete-distributed.t	Thu Sep 27 18:06:13 2018 +0200
@@ -487,3 +487,55 @@
   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)