author | Martin von Zweigbergk <martinvonz@google.com> |
Thu, 01 Feb 2018 10:10:01 -0800 | |
changeset 35879 | 6c1d3779c052 |
parent 35393 | 4441705b7111 |
child 44146 | 45ec64d93b3a |
permissions | -rw-r--r-- |
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] |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
6 |
> tlog = log --template "{rev}: {node|short} '{desc}' {branches}\n" |
12608
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 |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35385
diff
changeset
|
24 |
moving d/b to d-renamed/b |
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 |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
37 |
@ 3: 73a3ee40125d 'rename A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
38 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
39 |
| o 2: 220d0626d185 'rename B' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
40 |
|/ |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
41 |
o 1: 3ab5da9a5c01 'B' |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
42 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
43 |
o 0: 1994f17a630e 'A' |
12608
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 |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
49 |
3: 73a3ee40125d '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 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
63 |
rebasing 3:73a3ee40125d "rename A" (tip) |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35385
diff
changeset
|
64 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/73a3ee40125d-1d78ebcf-rebase.hg |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
65 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
66 |
$ hg tglog |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
67 |
@ 3: 032a9b75e83b 'rename A' |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
68 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
69 |
o 2: 220d0626d185 'rename B' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
70 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
71 |
o 1: 3ab5da9a5c01 'B' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
72 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
73 |
o 0: 1994f17a630e 'A' |
12608
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 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
76 |
Rename is not lost: |
7954
b969611064ae
rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
77 |
|
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
78 |
$ hg tlog -p --git -r tip |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
79 |
3: 032a9b75e83b 'rename A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
80 |
diff --git a/a b/a-renamed |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
81 |
rename from a |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
82 |
rename to a-renamed |
18739
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
83 |
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
|
84 |
new file mode 100644 |
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
85 |
--- /dev/null |
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
86 |
+++ b/d-renamed/x |
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
87 |
@@ -0,0 +1,1 @@ |
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
88 |
+x |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
89 |
|
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
90 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
91 |
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
|
92 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
93 |
$ hg log -r 3 --debug |
18739
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
94 |
changeset: 3:032a9b75e83bff1dcfb6cbfa4ef50a704bf1b569 |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
95 |
tag: tip |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
96 |
phase: draft |
18739
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
97 |
parent: 2:220d0626d185f372d9d8f69d9c73b0811d7725f7 |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
98 |
parent: -1:0000000000000000000000000000000000000000 |
18739
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
99 |
manifest: 3:035d66b27a1b06b2d12b46d41a39adb7a200c370 |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
100 |
user: test |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
101 |
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
|
102 |
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
|
103 |
files-: a |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
104 |
extra: branch=default |
18739
5b7175377bab
setparents: drop copies from dropped p2 (issue3843)
Matt Mackall <mpm@selenic.com>
parents:
18136
diff
changeset
|
105 |
extra: rebase_source=73a3ee40125d6f0f347082e5831ceccb3f005f8a |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
106 |
description: |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
107 |
rename A |
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 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
110 |
|
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
111 |
$ cd .. |
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 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
114 |
$ hg init b |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
115 |
$ cd b |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
116 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
117 |
$ echo a > a |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
118 |
$ hg ci -Am A |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
119 |
adding a |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
120 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
121 |
$ echo b > b |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
122 |
$ hg ci -Am B |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
123 |
adding b |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
124 |
|
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
125 |
$ hg cp b b-copied |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
126 |
$ hg ci -Am 'copy B' |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
127 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
128 |
$ hg up -q -C 1 |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
129 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
130 |
$ hg cp a a-copied |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
131 |
$ hg ci -m 'copy A' |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
132 |
created new head |
7954
b969611064ae
rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
133 |
|
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
134 |
$ hg tglog |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
135 |
@ 3: 0a8162ff18a8 'copy A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
136 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
137 |
| o 2: 39e588434882 'copy B' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
138 |
|/ |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
139 |
o 1: 6c81ed0049f8 'B' |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
140 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
141 |
o 0: 1994f17a630e 'A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
142 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
143 |
Copy is tracked: |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
144 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
145 |
$ hg tlog -p --git -r tip |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
146 |
3: 0a8162ff18a8 'copy A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
147 |
diff --git a/a b/a-copied |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
148 |
copy from a |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
149 |
copy to a-copied |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
150 |
|
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
151 |
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
|
152 |
|
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
153 |
$ hg rebase -s 3 -d 2 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
154 |
rebasing 3:0a8162ff18a8 "copy A" (tip) |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35385
diff
changeset
|
155 |
saved backup bundle to $TESTTMP/b/.hg/strip-backup/0a8162ff18a8-dd06302a-rebase.hg |
7954
b969611064ae
rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
156 |
|
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
157 |
$ hg tglog |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
158 |
@ 3: 98f6e6dbf45a 'copy A' |
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
159 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
160 |
o 2: 39e588434882 'copy B' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
161 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
162 |
o 1: 6c81ed0049f8 'B' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
163 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
164 |
o 0: 1994f17a630e 'A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
165 |
|
18136
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
166 |
|
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
167 |
Copy is not lost: |
7954
b969611064ae
rebase: don't lose rename/copy data (Issue1423)
Stefano Tortarolo <stefano.tortarolo@gmail.com>
parents:
diff
changeset
|
168 |
|
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
169 |
$ hg tlog -p --git -r tip |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
170 |
3: 98f6e6dbf45a 'copy A' |
12608
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
171 |
diff --git a/a b/a-copied |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
172 |
copy from a |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
173 |
copy to a-copied |
16b854cb80f1
tests: unify test-rebase*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11208
diff
changeset
|
174 |
|
18136
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 |
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
|
177 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
178 |
$ hg log -r 3 --debug |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
179 |
changeset: 3:98f6e6dbf45ab54079c2237fbd11066a5c41a11d |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
180 |
tag: tip |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
181 |
phase: draft |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
182 |
parent: 2:39e588434882ff77d01229d169cdc77f29e8855e |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
183 |
parent: -1:0000000000000000000000000000000000000000 |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
184 |
manifest: 3:2232f329d66fffe3930d43479ae624f66322b04d |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
185 |
user: test |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
186 |
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
|
187 |
files+: a-copied |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
188 |
extra: branch=default |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
189 |
extra: rebase_source=0a8162ff18a8900df8df8ef7ac0046955205613e |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
190 |
description: |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
191 |
copy A |
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
192 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
193 |
|
f23dea2b296e
copies: do not track backward copies, only renames (issue3739)
Siddharth Agarwal <sid0@fb.com>
parents:
16913
diff
changeset
|
194 |
|
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
|
195 |
$ 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
|
196 |
|
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 |
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
|
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 |
$ 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
|
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 |
$ 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
|
203 |
|
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 |
$ 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
|
205 |
$ 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
|
206 |
$ 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
|
207 |
|
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 |
$ 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
|
209 |
$ 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
|
210 |
|
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 |
$ 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
|
212 |
$ 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
|
213 |
$ 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
|
214 |
|
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 |
$ 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
|
216 |
$ 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
|
217 |
|
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 |
$ 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
|
219 |
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
|
220 |
|
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 |
$ 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
|
222 |
$ 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
|
223 |
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
|
224 |
|
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 |
$ hg tglog |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
226 |
@ 4: b918d683b091 'Another unrelated change' |
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
|
227 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
228 |
| o 3: 1ac17e43d8aa 'Rename file2 back to file1' |
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
|
229 |
|/ |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
230 |
o 2: 480101d66d8d 'Unrelated change' |
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
|
231 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
232 |
o 1: be44c61debd2 'Rename file1 to file2' |
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
|
233 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
234 |
o 0: 8ce9a346991d 'Adding file1' |
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
|
235 |
|
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 |
|
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 |
$ hg rebase -s 4 -d 3 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
238 |
rebasing 4:b918d683b091 "Another unrelated change" (tip) |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35385
diff
changeset
|
239 |
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/b918d683b091-3024bc57-rebase.hg |
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
|
240 |
|
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 |
$ 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
|
242 |
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
|
243 |
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
|
244 |
|
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
13778
diff
changeset
|
245 |
$ cd .. |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
246 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
247 |
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
|
248 |
$ 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
|
249 |
$ 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
|
250 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
251 |
$ echo a > a |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
252 |
$ hg add a |
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 a created" |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
254 |
$ 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
|
255 |
$ echo b > b |
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 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
|
257 |
$ 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
|
258 |
$ echo c > c |
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 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
|
260 |
$ 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
|
261 |
$ echo d > d |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
262 |
$ 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
|
263 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
264 |
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
|
265 |
$ hg tglog --follow d |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
266 |
@ 3: 421b7e82bb85 'File d created as copy of c and modified' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
267 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
268 |
o 2: 327f772bc074 'File c created as copy of b and modified' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
269 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
270 |
o 1: 79d255d24ad2 'File b created as copy of a and modified' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
271 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
272 |
o 0: b220cd6d2326 'File a created' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
273 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
274 |
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
|
275 |
$ hg update 0 |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
276 |
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
|
277 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
278 |
$ echo unrelated > unrelated |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
279 |
$ hg add unrelated |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
280 |
$ 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
|
281 |
created new head |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
282 |
$ hg update 4 |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
283 |
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
|
284 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
285 |
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
|
286 |
$ hg rebase --source 1 --dest 4 |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
287 |
rebasing 1:79d255d24ad2 "File b created as copy of a and modified" |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
288 |
rebasing 2:327f772bc074 "File c created as copy of b and modified" |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
289 |
rebasing 3:421b7e82bb85 "File d created as copy of c and modified" |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35385
diff
changeset
|
290 |
saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/79d255d24ad2-a2265555-rebase.hg |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
291 |
$ hg update 4 |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
292 |
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
|
293 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
294 |
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
|
295 |
$ hg tglog --follow d |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
296 |
@ 4: dbb9ba033561 'File d created as copy of c and modified' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
297 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
298 |
o 3: af74b229bc02 'File c created as copy of b and modified' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
299 |
| |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
300 |
o 2: 68bf06433839 'File b created as copy of a and modified' |
28627
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
26811
diff
changeset
|
301 |
: |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
302 |
o 0: b220cd6d2326 'File a created' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
303 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
304 |
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
|
305 |
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
|
306 |
$ hg co 1 |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
307 |
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
|
308 |
$ echo more >> unrelated |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
309 |
$ 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
|
310 |
created new head |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
311 |
$ hg rebase -s 2 --dest 5 --collapse |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
312 |
rebasing 2:68bf06433839 "File b created as copy of a and modified" |
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
313 |
rebasing 3:af74b229bc02 "File c created as copy of b and modified" |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
314 |
merging b and c to c |
23517
4f18e80d9c30
rebase: show more useful status information while rebasing
Mads Kiilerich <madski@unity3d.com>
parents:
23516
diff
changeset
|
315 |
rebasing 4:dbb9ba033561 "File d created as copy of c and modified" |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
316 |
merging c and d to d |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
35385
diff
changeset
|
317 |
saved backup bundle to $TESTTMP/copy-gets-preserved/.hg/strip-backup/68bf06433839-dde37595-rebase.hg |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
318 |
$ hg co tip |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
319 |
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
|
320 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
321 |
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
|
322 |
copy of 'a'. |
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
323 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
324 |
$ hg tglog --follow d |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
325 |
@ 3: 5a46b94210e5 'Collapsed revision |
28627
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
26811
diff
changeset
|
326 |
: * File b created as copy of a and modified |
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
26811
diff
changeset
|
327 |
: * File c created as copy of b and modified |
d7af9b4ae7dd
graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents:
26811
diff
changeset
|
328 |
: * File d created as copy of c and modified' |
35385
469b06b4c3ca
tests: add commit hashes to log commands in rebase tests
Phil Cohen <phillco@fb.com>
parents:
33332
diff
changeset
|
329 |
o 0: b220cd6d2326 'File a created' |
21826
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
330 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
331 |
|
2ba6c9b4e0eb
rebase: fix bug that caused transitive copy records to disappear (issue4192)
Augie Fackler <raf@durin42.com>
parents:
20117
diff
changeset
|
332 |
$ cd .. |