tests/test-copies-unrelated.t
author Augie Fackler <augie@google.com>
Mon, 09 Sep 2019 17:26:17 -0400
changeset 42918 f059d6ffcdf0
parent 42595 819712deac69
child 43140 12b8a2ef8d04
permissions -rw-r--r--
merge with stable
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
     1
#testcases filelog compatibility changeset
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     2
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     3
  $ cat >> $HGRCPATH << EOF
41931
fc4b7a46fda1 copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41930
diff changeset
     4
  > [extensions]
fc4b7a46fda1 copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 41930
diff changeset
     5
  > rebase=
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     6
  > [alias]
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     7
  > l = log -G -T '{rev} {desc}\n{files}\n'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     8
  > EOF
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     9
41756
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    10
#if compatibility
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    11
  $ cat >> $HGRCPATH << EOF
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    12
  > [experimental]
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    13
  > copies.read-from = compatibility
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    14
  > EOF
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    15
#endif
49ad315b39ee copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents: 41755
diff changeset
    16
42142
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    17
#if changeset
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    18
  $ cat >> $HGRCPATH << EOF
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    19
  > [experimental]
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    20
  > copies.read-from = changeset-only
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    21
  > copies.write-to = changeset-only
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    22
  > EOF
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    23
#endif
5382d8f8530b changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents: 41932
diff changeset
    24
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    25
  $ REPONUM=0
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    26
  $ newrepo() {
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    27
  >     cd $TESTTMP
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    28
  >     REPONUM=`expr $REPONUM + 1`
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    29
  >     hg init repo-$REPONUM
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    30
  >     cd repo-$REPONUM
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    31
  > }
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    32
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    33
Copy a file, then delete destination, then copy again. This does not create a new filelog entry.
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    34
  $ newrepo
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    35
  $ echo x > x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    36
  $ hg ci -Aqm 'add x'
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    37
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    38
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    39
  $ hg co -q 0
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    40
  $ hg cp x y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    41
  $ hg ci -qm 'copy x to y'
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    42
  $ hg rm y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    43
  $ hg ci -m 'remove y'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    44
  $ hg cp -f x y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    45
  $ hg ci -m 'copy x onto y (again)'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    46
  $ hg l
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    47
  @  4 copy x onto y (again)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    48
  |  y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    49
  o  3 remove y
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    50
  |  y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    51
  o  2 copy x to y
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    52
  |  y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    53
  | o  1 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    54
  |/   x
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    55
  o  0 add x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    56
     x
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    57
  $ hg debugp1copies -r 4
41755
a4358f7345b4 context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents: 41754
diff changeset
    58
  x -> y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    59
  $ hg debugpathcopies 0 4
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    60
  x -> y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    61
  $ hg graft -r 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    62
  grafting 1:* "modify x" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    63
  merging y and x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    64
  $ hg co -qC 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    65
  $ hg graft -r 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    66
  grafting 4:* "copy x onto y (again)" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    67
  merging x and y to y
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    68
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    69
Copy x to y, then remove y, then add back y. With copy metadata in the
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    70
changeset, this could easily end up reporting y as copied from x (if we don't
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    71
unmark it as a copy when it's removed). Despite x and y not being related, we
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    72
want grafts to propagate across the rename.
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    73
  $ newrepo
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    74
  $ echo x > x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    75
  $ hg ci -Aqm 'add x'
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    76
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    77
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    78
  $ hg co -q 0
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    79
  $ hg mv x y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    80
  $ hg ci -qm 'rename x to y'
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    81
  $ hg rm y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    82
  $ hg ci -qm 'remove y'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    83
  $ echo x > y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    84
  $ hg ci -Aqm 'add back y'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    85
  $ hg l
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    86
  @  4 add back y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    87
  |  y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    88
  o  3 remove y
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    89
  |  y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    90
  o  2 rename x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    91
  |  x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    92
  | o  1 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    93
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    94
  o  0 add x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    95
     x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    96
  $ hg debugpathcopies 0 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    97
BROKEN: This should succeed and merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    98
  $ hg graft -r 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
    99
  grafting 1:* "modify x" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   100
  file 'x' was deleted in local [local] but was modified in other [graft].
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   101
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   102
  What do you want to do? u
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   103
  abort: unresolved conflicts, can't continue
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   104
  (use 'hg resolve' and 'hg graft --continue')
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   105
  [255]
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   106
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   107
Add x, remove it, then add it back, then rename x to y. Similar to the case
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   108
above, but here the break in history is before the rename.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   109
  $ newrepo
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   110
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   111
  $ hg ci -Aqm 'add x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   112
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   113
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   114
  $ hg co -q 0
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   115
  $ hg rm x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   116
  $ hg ci -qm 'remove x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   117
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   118
  $ hg ci -Aqm 'add x again'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   119
  $ hg mv x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   120
  $ hg ci -m 'rename x to y'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   121
  $ hg l
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   122
  @  4 rename x to y
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   123
  |  x y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   124
  o  3 add x again
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   125
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   126
  o  2 remove x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   127
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   128
  | o  1 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   129
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   130
  o  0 add x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   131
     x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   132
  $ hg debugpathcopies 0 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   133
  x -> y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   134
  $ hg graft -r 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   135
  grafting 1:* "modify x" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   136
  merging y and x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   137
  $ hg co -qC 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   138
  $ hg graft -r 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   139
  grafting 4:* "rename x to y" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   140
  merging x and y to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   141
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   142
Add x, modify it, remove it, then add it back, then rename x to y. Similar to
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   143
the case above, but here the re-added file's nodeid is different from before
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   144
the break.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   145
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   146
  $ newrepo
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   147
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   148
  $ hg ci -Aqm 'add x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   149
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   150
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   151
  $ echo x3 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   152
  $ hg ci -qm 'modify x again'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   153
  $ hg co -q 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   154
  $ hg rm x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   155
  $ hg ci -qm 'remove x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   156
# Same content to avoid conflicts
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   157
  $ hg revert -r 1 x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   158
  $ hg ci -Aqm 'add x again'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   159
  $ hg mv x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   160
  $ hg ci -m 'rename x to y'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   161
  $ hg l
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   162
  @  5 rename x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   163
  |  x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   164
  o  4 add x again
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   165
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   166
  o  3 remove x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   167
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   168
  | o  2 modify x again
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   169
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   170
  o  1 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   171
  |  x
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   172
  o  0 add x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   173
     x
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   174
  $ hg debugpathcopies 0 5
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   175
  x -> y (no-filelog !)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   176
#if no-filelog
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   177
  $ hg graft -r 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   178
  grafting 2:* "modify x again" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   179
  merging y and x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   180
#else
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   181
BROKEN: This should succeed and merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   182
  $ hg graft -r 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   183
  grafting 2:* "modify x again" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   184
  file 'x' was deleted in local [local] but was modified in other [graft].
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   185
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   186
  What do you want to do? u
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   187
  abort: unresolved conflicts, can't continue
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   188
  (use 'hg resolve' and 'hg graft --continue')
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   189
  [255]
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   190
#endif
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   191
  $ hg co -qC 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   192
BROKEN: This should succeed and merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   193
  $ hg graft -r 5
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   194
  grafting 5:* "rename x to y"* (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   195
  file 'x' was deleted in other [graft] but was modified in local [local].
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   196
  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   197
  What do you want to do? u
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   198
  abort: unresolved conflicts, can't continue
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   199
  (use 'hg resolve' and 'hg graft --continue')
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   200
  [255]
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   201
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   202
Add x, remove it, then add it back, rename x to y from the first commit.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   203
Similar to the case above, but here the break in history is parallel to the
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   204
rename.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   205
  $ newrepo
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   206
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   207
  $ hg ci -Aqm 'add x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   208
  $ hg rm x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   209
  $ hg ci -qm 'remove x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   210
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   211
  $ hg ci -Aqm 'add x again'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   212
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   213
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   214
  $ hg co -q 0
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   215
  $ hg mv x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   216
  $ hg ci -qm 'rename x to y'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   217
  $ hg l
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   218
  @  4 rename x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   219
  |  x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   220
  | o  3 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   221
  | |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   222
  | o  2 add x again
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   223
  | |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   224
  | o  1 remove x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   225
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   226
  o  0 add x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   227
     x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   228
  $ hg debugpathcopies 2 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   229
  x -> y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   230
  $ hg graft -r 3
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   231
  grafting 3:* "modify x" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   232
  merging y and x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   233
  $ hg co -qC 3
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   234
  $ hg graft -r 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   235
  grafting 4:* "rename x to y" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   236
  merging x and y to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   237
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   238
Add x, remove it, then add it back, rename x to y from the first commit.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   239
Similar to the case above, but here the re-added file's nodeid is different
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   240
from the base.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   241
  $ newrepo
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   242
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   243
  $ hg ci -Aqm 'add x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   244
  $ hg rm x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   245
  $ hg ci -qm 'remove x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   246
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   247
  $ hg ci -Aqm 'add x again with different content'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   248
  $ hg co -q 0
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   249
  $ hg mv x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   250
  $ hg ci -qm 'rename x to y'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   251
  $ hg l
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   252
  @  3 rename x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   253
  |  x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   254
  | o  2 add x again with different content
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   255
  | |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   256
  | o  1 remove x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   257
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   258
  o  0 add x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   259
     x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   260
  $ hg debugpathcopies 2 3
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   261
  x -> y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   262
BROKEN: This should merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   263
  $ hg graft -r 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   264
  grafting 2:* "add x again with different content" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   265
  $ hg co -qC 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   266
BROKEN: This should succeed and merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   267
  $ hg graft -r 3
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   268
  grafting 3:* "rename x to y" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   269
  file 'x' was deleted in other [graft] but was modified in local [local].
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   270
  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   271
  What do you want to do? u
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   272
  abort: unresolved conflicts, can't continue
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   273
  (use 'hg resolve' and 'hg graft --continue')
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   274
  [255]
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   275
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   276
Add x on two branches, then rename x to y on one side. Similar to the case
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   277
above, but here the break in history is via the base commit.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   278
  $ newrepo
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   279
  $ echo a > a
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   280
  $ hg ci -Aqm 'base'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   281
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   282
  $ hg ci -Aqm 'add x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   283
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   284
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   285
  $ hg co -q 0
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   286
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   287
  $ hg ci -Aqm 'add x again'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   288
  $ hg mv x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   289
  $ hg ci -qm 'rename x to y'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   290
  $ hg l
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   291
  @  4 rename x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   292
  |  x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   293
  o  3 add x again
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   294
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   295
  | o  2 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   296
  | |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   297
  | o  1 add x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   298
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   299
  o  0 base
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   300
     a
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   301
  $ hg debugpathcopies 1 4
42595
819712deac69 copies: follow copies across merge base without source file (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42594
diff changeset
   302
  x -> y
42594
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   303
  $ hg graft -r 2
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   304
  grafting 2:* "modify x" (glob)
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   305
  merging y and x to y
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   306
  $ hg co -qC 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   307
  $ hg graft -r 4
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   308
  grafting 4:* "rename x to y"* (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   309
  merging x and y to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   310
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   311
Add x on two branches, with same content but different history, then rename x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   312
to y on one side. Similar to the case above, here the file's nodeid is
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   313
different between the branches.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   314
  $ newrepo
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   315
  $ echo a > a
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   316
  $ hg ci -Aqm 'base'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   317
  $ echo x > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   318
  $ hg ci -Aqm 'add x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   319
  $ echo x2 > x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   320
  $ hg ci -m 'modify x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   321
  $ hg co -q 0
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   322
  $ touch x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   323
  $ hg ci -Aqm 'add empty x'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   324
# Same content to avoid conflicts
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   325
  $ hg revert -r 1 x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   326
  $ hg ci -m 'modify x to match commit 1'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   327
  $ hg mv x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   328
  $ hg ci -qm 'rename x to y'
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   329
  $ hg l
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   330
  @  5 rename x to y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   331
  |  x y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   332
  o  4 modify x to match commit 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   333
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   334
  o  3 add empty x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   335
  |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   336
  | o  2 modify x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   337
  | |  x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   338
  | o  1 add x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   339
  |/   x
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   340
  o  0 base
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   341
     a
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   342
  $ hg debugpathcopies 1 5
42594
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   343
  x -> y (no-filelog !)
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   344
#if filelog
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   345
BROKEN: This should succeed and merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   346
  $ hg graft -r 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   347
  grafting 2:* "modify x" (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   348
  file 'x' was deleted in local [local] but was modified in other [graft].
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   349
  You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   350
  What do you want to do? u
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   351
  abort: unresolved conflicts, can't continue
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   352
  (use 'hg resolve' and 'hg graft --continue')
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   353
  [255]
42594
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   354
#else
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   355
  $ hg graft -r 2
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   356
  grafting 2:* "modify x" (glob)
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   357
  merging y and x to y
d013099c551b copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents: 42590
diff changeset
   358
#endif
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   359
  $ hg co -qC 2
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   360
BROKEN: This should succeed and merge the changes from x into y
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   361
  $ hg graft -r 5
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   362
  grafting 5:* "rename x to y"* (glob)
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   363
  file 'x' was deleted in other [graft] but was modified in local [local].
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   364
  You can use (c)hanged version, (d)elete, or leave (u)nresolved.
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   365
  What do you want to do? u
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   366
  abort: unresolved conflicts, can't continue
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   367
  (use 'hg resolve' and 'hg graft --continue')
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   368
  [255]
41751
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   369
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   370
Copies via null revision (there shouldn't be any)
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   371
  $ newrepo
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   372
  $ echo x > x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   373
  $ hg ci -Aqm 'add x'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   374
  $ hg cp x y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   375
  $ hg ci -m 'copy x to y'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   376
  $ hg co -q null
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   377
  $ echo x > x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   378
  $ hg ci -Aqm 'add x (again)'
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   379
  $ hg l
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   380
  @  2 add x (again)
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   381
     x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   382
  o  1 copy x to y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   383
  |  y
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   384
  o  0 add x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   385
     x
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   386
  $ hg debugpathcopies 1 2
4ec0ce0fb929 tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   387
  $ hg debugpathcopies 2 1
42590
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   388
  $ hg graft -r 1
ab416b5d9b91 tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents: 42589
diff changeset
   389
  grafting 1:* "copy x to y" (glob)