tests/test-issue1175.t
author Patrick Mezard <patrick@mezard.eu>
Mon, 18 Jun 2012 18:19:28 +0200
changeset 17103 5146de7bce96
parent 12757 62c8f7691bc3
child 18648 76b69cccb07a
child 18739 5b7175377bab
permissions -rw-r--r--
convert: keep branch switching merges with ancestors (issue3340) When running convert with a filemap, merge parents which are ancestors of other parents are ignored. This is hardly a problem when parents belong to the same branch, but the result could be confusing when named branches are involved. With: -o-a1-a2-a3... <- A \ \ b1-b2-b3...-m- <- B If all b* revisions are discarded, it is useful to preserve 'm' even if it is empty after filtering to record the branch switch. This patch makes filemap preserve "ancestor parents" if there is no "non-ancestor parent" on the same branch than the merge revision. Remarks: - I am not completely convinced by the reasons given above and those detailed by Matt in this thread: http://selenic.com/pipermail/mercurial-devel/2012-May/040627.html The properties we try to preserve are not clearly defined. That said, I know this patch already helped someone on IRC and the tests output look reasonable. - This is a new version of the original "convert: filemap must preserve fast-forward merges" patch. It has exactly the same output for 2 parents merges, the additional complexity is here to handle more than two parents.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12195
diff changeset
     1
http://mercurial.selenic.com/bts/issue1175
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     2
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     3
  $ hg init
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     4
  $ touch a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     5
  $ hg ci -Am0
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     6
  adding a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     7
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     8
  $ hg mv a a1
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
     9
  $ hg ci -m1
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    10
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    11
  $ hg co 0
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    12
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    13
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    14
  $ hg mv a a2
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    15
  $ hg up
12757
62c8f7691bc3 merge: make 'diverging renames' diagnostic a more helpful note.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12328
diff changeset
    16
  note: possible conflict - a was renamed multiple times to:
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    17
   a2
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    18
   a1
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    19
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    20
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    21
  $ hg ci -m2
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    22
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    23
  $ touch a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    24
  $ hg ci -Am3
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    25
  adding a
6875
0d714a48ab53 add a fix for issue 1175
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    26
12195
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    27
  $ hg mv a b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    28
  $ hg ci -Am4 a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    29
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    30
  $ hg ci --debug --traceback -Am5 b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    31
  b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    32
   b: searching for copy revision for a
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    33
   b: copy a:b80de5d138758541c5f05265ad144ab9fa86d1db
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    34
  committed changeset 5:89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    35
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    36
  $ hg verify
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    37
  checking changesets
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    38
  checking manifests
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    39
  crosschecking files in changesets and manifests
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    40
  checking files
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    41
  4 files, 6 changesets, 4 total revisions
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    42
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    43
  $ hg export --git tip
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    44
  # HG changeset patch
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    45
  # User test
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    46
  # Date 0 0
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    47
  # Node ID 89e8e4be0de296fa3d6dd7825ccc44d7dc0f1f3b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    48
  # Parent  7fc86ba705e717a721dbc361bf8c9bc05a18ca2f
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    49
  5
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    50
  
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    51
  diff --git a/b b/b
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    52
  new file mode 100644
ee41be2bbf5a tests: unify test-issue*
Adrian Buehlmann <adrian@cadifra.com>
parents: 6875
diff changeset
    53