equal
deleted
inserted
replaced
1 $ cat >> $HGRCPATH <<EOF |
|
2 > [extensions] |
|
3 > graphlog= |
|
4 > rebase= |
|
5 > |
|
6 > [alias] |
|
7 > tglog = log -G --template "{rev}: '{desc}' {branches}\n" |
|
8 > EOF |
|
9 |
|
10 |
|
11 $ hg init a |
|
12 $ cd a |
|
13 |
|
14 $ echo c1 > c1 |
|
15 $ hg ci -Am c1 |
|
16 adding c1 |
|
17 |
|
18 $ echo c2 > c2 |
|
19 $ hg ci -Am c2 |
|
20 adding c2 |
|
21 |
|
22 $ echo l1 > l1 |
|
23 $ hg ci -Am l1 |
|
24 adding l1 |
|
25 |
|
26 $ echo l2 > l2 |
|
27 $ hg ci -Am l2 |
|
28 adding l2 |
|
29 |
|
30 $ hg up -q -C 1 |
|
31 |
|
32 $ hg branch 'notdefault' |
|
33 marked working directory as branch notdefault |
|
34 |
|
35 $ echo r1 > r1 |
|
36 $ hg ci -Am r1 |
|
37 adding r1 |
|
38 |
|
39 $ hg tglog |
|
40 @ 4: 'r1' notdefault |
|
41 | |
|
42 | o 3: 'l2' |
|
43 | | |
|
44 | o 2: 'l1' |
|
45 |/ |
|
46 o 1: 'c2' |
|
47 | |
|
48 o 0: 'c1' |
|
49 |
|
50 |
|
51 Rebase a branch while preserving the branch name: |
|
52 |
|
53 $ hg up -q -C 3 |
|
54 |
|
55 $ hg rebase -b 4 -d 3 --keepbranches |
|
56 saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob) |
|
57 |
|
58 $ hg tglog |
|
59 @ 4: 'r1' notdefault |
|
60 | |
|
61 o 3: 'l2' |
|
62 | |
|
63 o 2: 'l1' |
|
64 | |
|
65 o 1: 'c2' |
|
66 | |
|
67 o 0: 'c1' |
|
68 |
|
69 $ hg branch |
|
70 notdefault |
|
71 |
|