Patchwork [1,of,5,V2] pullreport: add a test to show misreporting of visible changeset

login
register
mail settings
Submitter Boris Feld
Date Sept. 28, 2018, 5:49 p.m.
Message ID <78ef4cda114aabd21835.1538156947@localhost.localdomain>
Download mbox | patch
Permalink /patch/35172/
State Accepted
Headers show

Comments

Boris Feld - Sept. 28, 2018, 5:49 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@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.
Yuya Nishihara - Sept. 29, 2018, 1:34 a.m.
On Fri, 28 Sep 2018 19:49:07 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld@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

Queued these, thanks.

Patch

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)