comparison tests/test-rebase-rename.t @ 12608:16b854cb80f1

tests: unify test-rebase*
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 01 Oct 2010 16:10:06 +0200
parents tests/test-rebase-rename@2313dc4d9817
children 6cc4b14fb76b
comparison
equal deleted inserted replaced
12607:1393a81b3bdc 12608:16b854cb80f1
1 $ cat >> $HGRCPATH <<EOF
2 > [extensions]
3 > graphlog=
4 > rebase=
5 >
6 > [alias]
7 > tlog = log --template "{rev}: '{desc}' {branches}\n"
8 > tglog = tlog --graph
9 > EOF
10
11
12 $ hg init a
13 $ cd a
14
15 $ echo a > a
16 $ hg ci -Am A
17 adding a
18
19 $ echo b > b
20 $ hg ci -Am B
21 adding b
22
23 $ hg up -q -C 0
24
25 $ hg mv a a-renamed
26
27 $ hg ci -m 'rename A'
28 created new head
29
30 $ hg tglog
31 @ 2: 'rename A'
32 |
33 | o 1: 'B'
34 |/
35 o 0: 'A'
36
37
38 Rename is tracked:
39
40 $ hg tlog -p --git -r tip
41 2: 'rename A'
42 diff --git a/a b/a-renamed
43 rename from a
44 rename to a-renamed
45
46 Rebase the revision containing the rename:
47
48 $ hg rebase -s 2 -d 1
49 saved backup bundle to */.hg/strip-backup/*-backup.hg (glob)
50
51 $ hg tglog
52 @ 2: 'rename A'
53 |
54 o 1: 'B'
55 |
56 o 0: 'A'
57
58
59 Rename is not lost:
60
61 $ hg tlog -p --git -r tip
62 2: 'rename A'
63 diff --git a/a b/a-renamed
64 rename from a
65 rename to a-renamed
66
67 $ cd ..
68
69
70 $ hg init b
71 $ cd b
72
73 $ echo a > a
74 $ hg ci -Am A
75 adding a
76
77 $ echo b > b
78 $ hg ci -Am B
79 adding b
80
81 $ hg up -q -C 0
82
83 $ hg cp a a-copied
84 $ hg ci -m 'copy A'
85 created new head
86
87 $ hg tglog
88 @ 2: 'copy A'
89 |
90 | o 1: 'B'
91 |/
92 o 0: 'A'
93
94 Copy is tracked:
95
96 $ hg tlog -p --git -r tip
97 2: 'copy A'
98 diff --git a/a b/a-copied
99 copy from a
100 copy to a-copied
101
102 Rebase the revision containing the copy:
103
104 $ hg rebase -s 2 -d 1
105 saved backup bundle to */.hg/strip-backup/*-backup.hg (glob)
106
107 $ hg tglog
108 @ 2: 'copy A'
109 |
110 o 1: 'B'
111 |
112 o 0: 'A'
113
114 Copy is not lost:
115
116 $ hg tlog -p --git -r tip
117 2: 'copy A'
118 diff --git a/a b/a-copied
119 copy from a
120 copy to a-copied
121