annotate tests/test-rebase-rename.t @ 21863:f9c91c638378

progress: use 'encoding.colwidth' to get column width of items correctly Before this patch, 'progress' extension applies 'len' on byte sequence to get column width of it, but it causes incorrect result, when length of byte sequence and columns in display are different from each other in multi-byte characters. This patch uses 'encoding.colwidth' to get column width of items in output line correctly, even if it contains multi-byte characters.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 06 Jul 2014 02:56:41 +0900
parents 2ba6c9b4e0eb
children 328afbad6e57
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
1 $ cat >> $HGRCPATH <<EOF
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
2 > [extensions]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
3 > rebase=
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
4 >
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
5 > [alias]
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
6 > tlog = log --template "{rev}: '{desc}' {branches}\n"
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
7 > tglog = tlog --graph
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
8 > EOF
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
9
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
10
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
11 $ hg init a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
12 $ cd a
11198
b345b1cc124f rebase: use helpers.sh in tests
Matt Mackall <mpm@selenic.com>
parents: 7954
diff changeset
13
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
14 $ mkdir d
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
15 $ echo a > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
16 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
17 adding a
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
18
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
19 $ echo b > d/b
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
20 $ hg ci -Am B
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
21 adding d/b
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
22
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
23 $ hg mv d d-renamed
19133
101b80eb7364 tests: check path separator in moves
Brendan Cully <brendan@kublai.com>
parents: 18739
diff changeset
24 moving d/b to d-renamed/b (glob)
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
25 $ hg ci -m 'rename B'
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
26
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
27 $ hg up -q -C 1
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
28
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
29 $ hg mv a a-renamed
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
30 $ echo x > d/x
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
31 $ hg add d/x
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
32
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
33 $ hg ci -m 'rename A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
34 created new head
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
35
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
36 $ hg tglog
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
37 @ 3: 'rename A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
38 |
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
39 | o 2: 'rename B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
40 |/
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
41 o 1: 'B'
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
42 |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
43 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
44
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
45
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
46 Rename is tracked:
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
47
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
48 $ hg tlog -p --git -r tip
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
49 3: 'rename A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
50 diff --git a/a b/a-renamed
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
51 rename from a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
52 rename to a-renamed
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
53 diff --git a/d/x b/d/x
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
54 new file mode 100644
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
55 --- /dev/null
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
56 +++ b/d/x
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
57 @@ -0,0 +1,1 @@
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
58 +x
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
59
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
60 Rebase the revision containing the rename:
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
61
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
62 $ hg rebase -s 3 -d 2
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
63 saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
64
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
65 $ hg tglog
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
66 @ 3: 'rename A'
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
67 |
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
68 o 2: 'rename B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
69 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
70 o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
71 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
72 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
73
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
74
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
75 Rename is not lost:
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
76
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
77 $ hg tlog -p --git -r tip
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
78 3: 'rename A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
79 diff --git a/a b/a-renamed
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
80 rename from a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
81 rename to a-renamed
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
82 diff --git a/d-renamed/x b/d-renamed/x
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
83 new file mode 100644
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
84 --- /dev/null
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
85 +++ b/d-renamed/x
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
86 @@ -0,0 +1,1 @@
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
87 +x
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
88
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
89
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
90 Rebased revision does not contain information about b (issue3739)
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
91
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
92 $ hg log -r 3 --debug
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
93 changeset: 3:032a9b75e83bff1dcfb6cbfa4ef50a704bf1b569
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
94 tag: tip
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
95 phase: draft
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
96 parent: 2:220d0626d185f372d9d8f69d9c73b0811d7725f7
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
97 parent: -1:0000000000000000000000000000000000000000
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
98 manifest: 3:035d66b27a1b06b2d12b46d41a39adb7a200c370
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
99 user: test
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
100 date: Thu Jan 01 00:00:00 1970 +0000
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
101 files+: a-renamed d-renamed/x
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
102 files-: a
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
103 extra: branch=default
18739
5b7175377bab setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents: 18136
diff changeset
104 extra: rebase_source=73a3ee40125d6f0f347082e5831ceccb3f005f8a
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
105 description:
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
106 rename A
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
107
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
108
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
109
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
110 $ cd ..
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
111
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
112
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
113 $ hg init b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
114 $ cd b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
115
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
116 $ echo a > a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
117 $ hg ci -Am A
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
118 adding a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
119
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
120 $ echo b > b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
121 $ hg ci -Am B
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
122 adding b
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
123
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
124 $ hg cp b b-copied
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
125 $ hg ci -Am 'copy B'
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
126
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
127 $ hg up -q -C 1
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
128
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
129 $ hg cp a a-copied
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
130 $ hg ci -m 'copy A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
131 created new head
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
132
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
133 $ hg tglog
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
134 @ 3: 'copy A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
135 |
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
136 | o 2: 'copy B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
137 |/
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
138 o 1: 'B'
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
139 |
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
140 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
141
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
142 Copy is tracked:
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
143
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
144 $ hg tlog -p --git -r tip
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
145 3: 'copy A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
146 diff --git a/a b/a-copied
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
147 copy from a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
148 copy to a-copied
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
149
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
150 Rebase the revision containing the copy:
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
151
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
152 $ hg rebase -s 3 -d 2
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12608
diff changeset
153 saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
154
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
155 $ hg tglog
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
156 @ 3: 'copy A'
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
157 |
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
158 o 2: 'copy B'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
159 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
160 o 1: 'B'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
161 |
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
162 o 0: 'A'
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
163
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
164
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
165 Copy is not lost:
7954
b969611064ae rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff changeset
166
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
167 $ hg tlog -p --git -r tip
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
168 3: 'copy A'
12608
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
169 diff --git a/a b/a-copied
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
170 copy from a
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
171 copy to a-copied
16b854cb80f1 tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents: 11208
diff changeset
172
18136
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
173
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
174 Rebased revision does not contain information about b (issue3739)
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
175
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
176 $ hg log -r 3 --debug
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
177 changeset: 3:98f6e6dbf45ab54079c2237fbd11066a5c41a11d
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
178 tag: tip
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
179 phase: draft
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
180 parent: 2:39e588434882ff77d01229d169cdc77f29e8855e
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
181 parent: -1:0000000000000000000000000000000000000000
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
182 manifest: 3:2232f329d66fffe3930d43479ae624f66322b04d
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
183 user: test
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
184 date: Thu Jan 01 00:00:00 1970 +0000
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
185 files+: a-copied
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
186 extra: branch=default
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
187 extra: rebase_source=0a8162ff18a8900df8df8ef7ac0046955205613e
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
188 description:
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
189 copy A
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
190
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
191
f23dea2b296e copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents: 16913
diff changeset
192
13778
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
193 $ cd ..
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
194
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
195
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
196 Test rebase across repeating renames:
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
197
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
198 $ hg init repo
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
199
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
200 $ cd repo
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
201
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
202 $ echo testing > file1.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
203 $ hg add file1.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
204 $ hg ci -m "Adding file1"
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
205
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
206 $ hg rename file1.txt file2.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
207 $ hg ci -m "Rename file1 to file2"
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
208
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
209 $ echo Unrelated change > unrelated.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
210 $ hg add unrelated.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
211 $ hg ci -m "Unrelated change"
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
212
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
213 $ hg rename file2.txt file1.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
214 $ hg ci -m "Rename file2 back to file1"
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
215
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
216 $ hg update -r -2
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
217 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
218
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
219 $ echo Another unrelated change >> unrelated.txt
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
220 $ hg ci -m "Another unrelated change"
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
221 created new head
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
222
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
223 $ hg tglog
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
224 @ 4: 'Another unrelated change'
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
225 |
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
226 | o 3: 'Rename file2 back to file1'
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
227 |/
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
228 o 2: 'Unrelated change'
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
229 |
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
230 o 1: 'Rename file1 to file2'
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
231 |
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
232 o 0: 'Adding file1'
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
233
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
234
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
235 $ hg rebase -s 4 -d 3
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
236 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/*-backup.hg (glob)
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
237
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
238 $ hg diff --stat -c .
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
239 unrelated.txt | 1 +
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
240 1 files changed, 1 insertions(+), 0 deletions(-)
46c3043253fb rebase: don't mark file as removed if missing in parent's manifest (issue2725)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents: 12640
diff changeset
241
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 13778
diff changeset
242 $ cd ..
21826
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
243
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
244 Verify that copies get preserved (issue4192).
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
245 $ hg init copy-gets-preserved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
246 $ cd copy-gets-preserved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
247
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
248 $ echo a > a
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
249 $ hg add a
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
250 $ hg commit --message "File a created"
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
251 $ hg copy a b
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
252 $ echo b > b
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
253 $ hg commit --message "File b created as copy of a and modified"
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
254 $ hg copy b c
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
255 $ echo c > c
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
256 $ hg commit --message "File c created as copy of b and modified"
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
257 $ hg copy c d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
258 $ echo d > d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
259 $ hg commit --message "File d created as copy of c and modified"
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
260
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
261 Note that there are four entries in the log for d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
262 $ hg tglog --follow d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
263 @ 3: 'File d created as copy of c and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
264 |
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
265 o 2: 'File c created as copy of b and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
266 |
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
267 o 1: 'File b created as copy of a and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
268 |
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
269 o 0: 'File a created'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
270
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
271 Update back to before we performed copies, and inject an unrelated change.
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
272 $ hg update 0
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
273 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
274
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
275 $ echo unrelated > unrelated
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
276 $ hg add unrelated
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
277 $ hg commit --message "Unrelated file created"
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
278 created new head
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
279 $ hg update 4
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
280 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
281
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
282 Rebase the copies on top of the unrelated change.
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
283 $ hg rebase --source 1 --dest 4
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
284 saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/*.hg (glob)
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
285 $ hg update 4
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
286 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
287
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
288 There should still be four entries in the log for d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
289 $ hg tglog --follow d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
290 @ 4: 'File d created as copy of c and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
291 |
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
292 o 3: 'File c created as copy of b and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
293 |
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
294 o 2: 'File b created as copy of a and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
295 |
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
296 o 0: 'File a created'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
297
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
298 Same steps as above, but with --collapse on rebase to make sure the
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
299 copy records collapse correctly.
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
300 $ hg co 1
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
301 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
302 $ echo more >> unrelated
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
303 $ hg ci -m 'unrelated commit is unrelated'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
304 created new head
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
305 $ hg rebase -s 2 --dest 5 --collapse
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
306 merging b and c to c
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
307 merging c and d to d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
308 saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/*.hg (glob)
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
309 $ hg co tip
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
310 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
311
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
312 This should show both revision 3 and 0 since 'd' was transitively a
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
313 copy of 'a'.
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
314
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
315 $ hg tglog --follow d
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
316 @ 3: 'Collapsed revision
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
317 | * File b created as copy of a and modified
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
318 | * File c created as copy of b and modified
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
319 | * File d created as copy of c and modified'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
320 o 0: 'File a created'
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
321
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
322
2ba6c9b4e0eb rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
323 $ cd ..