tests/test-rename-dir-merge.t
author Martin Geisler <mg@lazybytes.net>
Tue, 19 Apr 2011 12:04:44 +0200
changeset 13956 ffb5c09ba822
parent 12114 0a6b2e21bc86
child 15447 9910f60a37ee
permissions -rw-r--r--
tests: remove redundant mkdir There are still many tests that check that a bare 'hg init' initializes the current directory.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 12114
diff changeset
     1
  $ hg init t
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     2
  $ cd t
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     3
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     4
  $ mkdir a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     5
  $ echo foo > a/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     6
  $ echo bar > a/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     7
  $ hg ci -Am "0"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     8
  adding a/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
     9
  adding a/b
3733
9e67fecbfd16 merge: handle directory renames
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    11
  $ hg co -C 0
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    12
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    13
  $ hg mv a b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    14
  moving a/a to b/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    15
  moving a/b to b/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    16
  $ hg ci -m "1 mv a/ b/"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    17
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    18
  $ hg co -C 0
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    19
  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    20
  $ echo baz > a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    21
  $ echo quux > a/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    22
  $ hg add a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    23
  $ hg ci -m "2 add a/c"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    24
  created new head
3733
9e67fecbfd16 merge: handle directory renames
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    25
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    26
  $ hg merge --debug 1
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    27
    searching for copies back to rev 1
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    28
    unmatched files in local:
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    29
     a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    30
     a/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    31
    unmatched files in other:
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    32
     b/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    33
     b/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    34
    all copies found (* = to merge, ! = divergent):
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    35
     b/a -> a/a 
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    36
     b/b -> a/b 
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    37
    checking for directory renames
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    38
    dir a/ -> b/
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    39
    file a/c -> b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    40
    file a/d -> b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    41
  resolving manifests
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    42
   overwrite None partial False
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    43
   ancestor f9b20c0d4c51 local ce36d17b18fb+ remote 397f8b00a740
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    44
   a/d: remote renamed directory to b/d -> d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    45
   a/c: remote renamed directory to b/c -> d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    46
   a/b: other deleted -> r
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    47
   a/a: other deleted -> r
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    48
   b/a: remote created -> g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    49
   b/b: remote created -> g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    50
  updating: a/a 1/6 files (16.67%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    51
  removing a/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    52
  updating: a/b 2/6 files (33.33%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    53
  removing a/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    54
  updating: a/c 3/6 files (50.00%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    55
  moving a/c to b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    56
  updating: a/d 4/6 files (66.67%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    57
  moving a/d to b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    58
  updating: b/a 5/6 files (83.33%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    59
  getting b/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    60
  updating: b/b 6/6 files (100.00%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    61
  getting b/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    62
  4 files updated, 0 files merged, 2 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    63
  (branch merge, don't forget to commit)
3733
9e67fecbfd16 merge: handle directory renames
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    64
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    65
  $ echo a/* b/*
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    66
  a/* b/a b/b b/c b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    67
  $ hg st -C
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    68
  M b/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    69
  M b/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    70
  A b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    71
    a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    72
  R a/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    73
  R a/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    74
  R a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    75
  ? b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    76
  $ hg ci -m "3 merge 2+1"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    77
  $ hg debugrename b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    78
  b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88
3733
9e67fecbfd16 merge: handle directory renames
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    79
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    80
  $ hg co -C 1
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    81
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    82
  $ hg merge --debug 2
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    83
    searching for copies back to rev 1
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    84
    unmatched files in local:
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    85
     b/a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    86
     b/b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    87
     b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    88
    unmatched files in other:
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    89
     a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    90
    all copies found (* = to merge, ! = divergent):
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    91
     b/a -> a/a 
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    92
     b/b -> a/b 
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    93
    checking for directory renames
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    94
    dir a/ -> b/
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    95
    file a/c -> b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    96
  resolving manifests
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    97
   overwrite None partial False
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    98
   ancestor f9b20c0d4c51 local 397f8b00a740+ remote ce36d17b18fb
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
    99
   None: local renamed directory to b/c -> d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   100
  updating:None 1/1 files (100.00%)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   101
  getting a/c to b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   102
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   103
  (branch merge, don't forget to commit)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   104
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   105
  $ echo a/* b/*
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   106
  a/* b/a b/b b/c b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   107
  $ hg st -C
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   108
  A b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   109
    a/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   110
  ? b/d
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   111
  $ hg ci -m "4 merge 1+2"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   112
  created new head
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   113
  $ hg debugrename b/c
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   114
  b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   115
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   116
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   117
Second scenario with two repos:
3733
9e67fecbfd16 merge: handle directory renames
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   118
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   119
  $ cd ..
13956
ffb5c09ba822 tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents: 12114
diff changeset
   120
  $ hg init r1
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   121
  $ cd r1
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   122
  $ mkdir a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   123
  $ echo foo > a/f
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   124
  $ hg add a
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   125
  adding a/f
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   126
  $ hg ci -m "a/f == foo"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   127
  $ cd ..
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   128
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   129
  $ hg clone r1 r2
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   130
  updating to branch default
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   131
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   132
  $ cd r2
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   133
  $ hg mv a b
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   134
  moving a/f to b/f
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   135
  $ echo foo1 > b/f
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   136
  $ hg ci -m" a -> b, b/f == foo1"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   137
  $ cd ..
3733
9e67fecbfd16 merge: handle directory renames
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
   138
12114
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   139
  $ cd r1
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   140
  $ mkdir a/aa
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   141
  $ echo bar > a/aa/g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   142
  $ hg add a/aa
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   143
  adding a/aa/g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   144
  $ hg ci -m "a/aa/g"
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   145
  $ hg pull ../r2
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   146
  pulling from ../r2
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   147
  searching for changes
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   148
  adding changesets
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   149
  adding manifests
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   150
  adding file changes
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   151
  added 1 changesets with 1 changes to 1 files (+1 heads)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   152
  (run 'hg heads' to see heads, 'hg merge' to merge)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   153
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   154
  $ hg merge
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   155
  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   156
  (branch merge, don't forget to commit)
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   157
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   158
  $ hg st -C
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   159
  M b/f
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   160
  A b/aa/g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   161
    a/aa/g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   162
  R a/aa/g
0a6b2e21bc86 tests: merge the two test-rename-dir-merge* into one
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 8167
diff changeset
   163
  R a/f