annotate tests/test-rebase-rename.t @ 21488:feb8ad2d57ee

run-tests: merge MercurialTest into Test Now that we execute all tests via unittest, the MercurialTest wrapper is not necessary. This patches moves the logic from MercurialTest into Test and makes Test a child of unittest.TestCase.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Apr 2014 17:04:42 -0700
parents aa9385f983fa
children 2ba6c9b4e0eb
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 ..