annotate tests/test-branch-change.t @ 49487:e8481625c582

rust: add Debug constraint to Matcher trait This makes sure we can easily debug which Matcher we're looking at when using trait objects, and is just generally useful. Effort to make the debugging output nicer has been kept to a minimum, please feel free to improve.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 11 Jul 2022 11:59:13 +0200
parents f8f2ecdde4b5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
1 Testing changing branch on commits
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
2 ==================================
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
3
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
4 Setup
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
5
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
6 $ cat >> $HGRCPATH << EOF
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
7 > [alias]
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
8 > glog = log -G -T "{rev}:{node|short} {desc}\n{branch} ({bookmarks})"
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
9 > [experimental]
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
10 > evolution = createmarkers
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
11 > [extensions]
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
12 > rebase=
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
13 > EOF
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
14
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
15 $ hg init repo
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
16 $ cd repo
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
17 $ for ch in a b c d e; do echo foo >> $ch; hg ci -Aqm "Added "$ch; done
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
18 $ hg glog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
19 @ 4:aa98ab95a928 Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
20 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
21 o 3:62615734edd5 Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
22 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
23 o 2:28ad74487de9 Added c
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
24 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
25 o 1:29becc82797a Added b
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
26 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
27 o 0:18d04c59bb5d Added a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
28 default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
29
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
30 $ hg branches
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
31 default 4:aa98ab95a928
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
32
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
33 Try without passing a new branch name
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
34
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
35 $ hg branch -r .
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
36 abort: no branch name specified for the revisions
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44401
diff changeset
37 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
38
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
39 Setting an invalid branch name
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
40
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
41 $ hg branch -r . a:b
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
42 abort: ':' cannot be used in a name
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
43 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
44 $ hg branch -r . tip
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
45 abort: the name 'tip' is reserved
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
46 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
47 $ hg branch -r . 1234
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
48 abort: cannot use an integer as a name
45845
f96fa4de5055 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com>
parents: 45840
diff changeset
49 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
50
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
51 Change on non-linear set of commits
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
52
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
53 $ hg branch -r 2 -r 4 foo
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
54 abort: cannot change branch of non-linear revisions
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44401
diff changeset
55 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
56
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
57 Change in middle of the stack (linear commits)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
58
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
59 $ hg branch -r 1::3 foo
47070
d90f6237b3aa rewriteutil: say how many commits would become orphan if commit is rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47069
diff changeset
60 abort: cannot change branch of changeset, as that will orphan 1 descendants
47018
7a90fddb13b0 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com>
parents: 45906
diff changeset
61 (see 'hg help evolution.instability')
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45845
diff changeset
62 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
63
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
64 Change with dirty working directory
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
65
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
66 $ echo bar > a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
67 $ hg branch -r . foo
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
68 abort: uncommitted changes
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
69 [20]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
70
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
71 $ hg revert --all
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
72 reverting a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
73
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
74 Change on empty revision set
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
75
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
76 $ hg branch -r 'draft() - all()' foo
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
77 abort: empty revision set
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44401
diff changeset
78 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
79
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
80 Changing branch on linear set of commits from head
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
81
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
82 Without obsmarkers
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
83
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
84 $ hg branch -r 3:4 foo --config experimental.evolution=!
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
85 changed branch on 2 changesets
35771
ebb75443969a test-branch-change: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35746
diff changeset
86 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/62615734edd5-e86bd13a-branch-change.hg
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
87 $ hg glog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
88 @ 4:3938acfb5c0f Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
89 | foo ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
90 o 3:9435da006bdc Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
91 | foo ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
92 o 2:28ad74487de9 Added c
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
93 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
94 o 1:29becc82797a Added b
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
95 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
96 o 0:18d04c59bb5d Added a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
97 default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
98
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
99 $ hg branches
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
100 foo 4:3938acfb5c0f
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
101 default 2:28ad74487de9 (inactive)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
102
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
103 With obsmarkers
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
104
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
105 $ hg branch -r 3::4 bar
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
106 changed branch on 2 changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
107 $ hg glog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
108 @ 6:7c1991464886 Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
109 | bar ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
110 o 5:1ea05e93925f Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
111 | bar ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
112 o 2:28ad74487de9 Added c
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
113 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
114 o 1:29becc82797a Added b
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
115 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
116 o 0:18d04c59bb5d Added a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
117 default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
118
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
119 $ hg branches
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
120 bar 6:7c1991464886
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
121 default 2:28ad74487de9 (inactive)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
122
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
123 Change branch name to an existing branch
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
124
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
125 $ hg branch -r . default
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
126 abort: a branch of the same name already exists
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44401
diff changeset
127 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
128
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
129 Changing on a branch head which is not topological head
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
130
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
131 $ hg branch -r 2 stable
47070
d90f6237b3aa rewriteutil: say how many commits would become orphan if commit is rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47069
diff changeset
132 abort: cannot change branch of changeset, as that will orphan 2 descendants
47018
7a90fddb13b0 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com>
parents: 45906
diff changeset
133 (see 'hg help evolution.instability')
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45845
diff changeset
134 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
135
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
136 Enabling the allowunstable config and trying to change branch on a branch head
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
137 which is not a topological head
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
138
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
139 $ echo "[experimental]" >> .hg/hgrc
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
140 $ echo "evolution.allowunstable=yes" >> .hg/hgrc
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
141 $ hg branch -r 2 foo
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
142 changed branch on 1 changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
143 2 new orphan changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
144
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
145 Changing branch of an obsoleted changeset
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
146
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
147 $ hg branch -r 4 foobar
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
148 abort: hidden revision '4' was rewritten as: 7c1991464886
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
149 (use --hidden to access hidden revisions)
48116
5ced12cfa41b errors: raise InputError on bad revset to revrange() iff provided by the user
Martin von Zweigbergk <martinvonz@google.com>
parents: 47271
diff changeset
150 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
151
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
152 $ hg branch -r 4 --hidden foobar
47020
ba6881c6a178 rewriteutil: check for divergence
Martin von Zweigbergk <martinvonz@google.com>
parents: 47018
diff changeset
153 abort: cannot change branch of 3938acfb5c0f, as that creates content-divergence with 7c1991464886
47271
055f7b9f2307 rewriteutil: add pointer to help text when rewrite would cause divergence
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
154 (add --verbose for details or see 'hg help evolution.instability')
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44401
diff changeset
155 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
156
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
157 Make sure bookmark movement is correct
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
158
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
159 $ hg bookmark b1
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
160 $ hg glog -r '.^::'
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
161 @ 6:7c1991464886 Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
162 | bar (b1)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
163 * 5:1ea05e93925f Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
164 | bar ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
165 ~
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
166
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
167 $ hg branch -r '(.^)::' wat --debug
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
168 changing branch of '1ea05e93925f806d875a2163f9b76764be644636' from 'bar' to 'wat'
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
169 committing files:
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
170 d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
171 committing manifest
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
172 committing changelog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
173 new node id is 343660ccab7400da637bd6a211d07f413536d718
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
174 changing branch of '7c19914648869f5b02fc7fed31ddee9783fdd680' from 'bar' to 'wat'
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
175 committing files:
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
176 e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
177 committing manifest
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
178 committing changelog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
179 new node id is de1404b45a69f8cc6437d7679033ee33e9efb4ba
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
180 moving bookmarks ['b1'] from 7c19914648869f5b02fc7fed31ddee9783fdd680 to de1404b45a69f8cc6437d7679033ee33e9efb4ba
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
181 resolving manifests
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
182 branchmerge: False, force: False, partial: False
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
183 ancestor: 7c1991464886, local: 7c1991464886+, remote: de1404b45a69
35771
ebb75443969a test-branch-change: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 35746
diff changeset
184 starting 4 threads for background file closing (?)
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
185 changed branch on 2 changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
186 updating the branch cache
42602
c7d236b55a3e py3: fix formatting of branchmap log messages with repo.filtername=None
Martin von Zweigbergk <martinvonz@google.com>
parents: 40666
diff changeset
187 invalid branch cache (served): tip differs
48687
f8f2ecdde4b5 branchmap: skip obsolete revisions while computing heads
Anton Shestakov <av6@dwimlabs.net>
parents: 48116
diff changeset
188 invalid branch cache (served.hidden): tip differs
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
189
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
190 $ hg glog -r '(.^)::'
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
191 @ 9:de1404b45a69 Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
192 | wat (b1)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
193 * 8:343660ccab74 Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
194 | wat ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
195 ~
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
196
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
197 Make sure phase handling is correct
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
198
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
199 $ echo foo >> bar
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
200 $ hg ci -Aqm "added bar" --secret
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
201 1 new orphan changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
202 $ hg glog -r .
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
203 @ 10:8ad1294c1660 added bar
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
204 | wat (b1)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
205 ~
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
206 $ hg branch -r . secret
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
207 changed branch on 1 changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
208 $ hg phase -r .
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
209 11: secret
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
210
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
211 $ hg branches
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
212 secret 11:38a9b2d53f98
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
213 foo 7:8a4729a5e2b8
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
214 wat 9:de1404b45a69 (inactive)
48687
f8f2ecdde4b5 branchmap: skip obsolete revisions while computing heads
Anton Shestakov <av6@dwimlabs.net>
parents: 48116
diff changeset
215 default 1:29becc82797a (inactive)
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
216 $ hg branch
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
217 secret
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
218
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
219 Changing branch of another head, different from one on which we are
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
220
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
221 $ hg glog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
222 @ 11:38a9b2d53f98 added bar
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
223 | secret (b1)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
224 * 9:de1404b45a69 Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
225 | wat ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
226 * 8:343660ccab74 Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
227 | wat ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
228 | o 7:8a4729a5e2b8 Added c
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
229 | | foo ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
230 x | 2:28ad74487de9 Added c
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
231 |/ default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
232 o 1:29becc82797a Added b
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
233 | default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
234 o 0:18d04c59bb5d Added a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
235 default ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
236
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
237 $ hg branch
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
238 secret
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
239
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
240 $ hg branch -r 7 foobar
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
241 changed branch on 1 changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
242
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
243 The current branch must be preserved
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
244 $ hg branch
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
245 secret
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
246
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
247 Changing branch on multiple heads at once
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
248
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
249 $ hg rebase -s 8 -d 12 --keepbranches -q
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
250
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
251 $ hg rebase -s 14 -d 1 --keepbranches -q
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
252
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
253 $ hg branch -r 0: stable
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
254 changed branch on 6 changesets
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
255 $ hg glog
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
256 @ 23:6a5ddbcfb870 added bar
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
257 | stable (b1)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
258 o 22:baedc6e98a67 Added e
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
259 | stable ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
260 | o 21:99ac7bf8aad1 Added d
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
261 | | stable ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
262 | o 20:0ecb4d39c4bd Added c
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
263 |/ stable ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
264 o 19:fd45b986b109 Added b
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
265 | stable ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
266 o 18:204d2769eca2 Added a
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
267 stable ()
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
268
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
269 $ hg branches
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
270 stable 23:6a5ddbcfb870
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
271
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
272 $ hg branch
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
273 stable
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
274
35746
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
275 Changing to same branch is no-op
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
276
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
277 $ hg branch -r 19::21 stable
35746
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
278 changed branch on 0 changesets
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
279
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
280 Changing branch name to existing branch name if the branch of parent of root of
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
281 revs is same as the new branch name
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
282
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
283 $ hg branch -r 20::21 bugfix
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
284 changed branch on 2 changesets
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
285 $ hg glog
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
286 o 25:714defe1cf34 Added d
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
287 | bugfix ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
288 o 24:98394def28fc Added c
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
289 | bugfix ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
290 | @ 23:6a5ddbcfb870 added bar
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
291 | | stable (b1)
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
292 | o 22:baedc6e98a67 Added e
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
293 |/ stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
294 o 19:fd45b986b109 Added b
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
295 | stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
296 o 18:204d2769eca2 Added a
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
297 stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
298
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
299 $ hg branch -r 24:25 stable
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
300 changed branch on 2 changesets
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
301 $ hg glog
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
302 o 27:4ec342341562 Added d
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
303 | stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
304 o 26:83f48859c2de Added c
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
305 | stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
306 | @ 23:6a5ddbcfb870 added bar
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
307 | | stable (b1)
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
308 | o 22:baedc6e98a67 Added e
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
309 |/ stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
310 o 19:fd45b986b109 Added b
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
311 | stable ()
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
312 o 18:204d2769eca2 Added a
e5b6ba786d83 branch: allow changing branch name to existing name if possible
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35745
diff changeset
313 stable ()
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
314
40666
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
315 Changing branch of a merge commit
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
316
40666
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
317 $ hg branch -q ghi
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
318 $ echo f > f
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
319 $ hg ci -qAm 'Added f'
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
320 $ hg up -q 27
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
321 $ hg branch -q jkl
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
322 $ echo g > g
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
323 $ hg ci -qAm 'Added g'
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
324 $ hg glog -r 'heads(:)'
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
325 @ 29:6bc1c6c2c9da Added g
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
326 | jkl ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
327 ~
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
328 o 28:2f1019bd29d2 Added f
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
329 | ghi (b1)
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
330 ~
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
331
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
332 $ hg branch -q default
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
333 $ hg merge -r 28
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
334 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
335 (branch merge, don't forget to commit)
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
336 $ hg branch -r . abcd
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
337 abort: outstanding uncommitted merge
45840
527ce85c2e60 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
338 [20]
40666
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
339
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
340 $ hg ci -m "Merge commit"
40666
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
341 $ hg glog -r 'parents(.)::'
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
342 @ 30:4d56e6b1eb6b Merge commit
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
343 |\ default ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
344 | o 29:6bc1c6c2c9da Added g
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
345 | | jkl ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
346 | ~
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
347 o 28:2f1019bd29d2 Added f
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
348 | ghi (b1)
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
349 ~
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
350
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
351 $ hg branch -r . ghi
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
352 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
353 changed branch on 1 changesets
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
354 $ hg branch -r . jkl
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
355 changed branch on 1 changesets
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
356 $ hg branch -r . default
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
357 changed branch on 1 changesets
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
358 $ hg branch -r . stable
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
359 abort: a branch of the same name already exists
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 44401
diff changeset
360 [10]
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
361
44401
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
362 $ hg branch -r . stable --force
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
363 changed branch on 1 changesets
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
364 $ hg branches
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
365 stable 34:d1c2addda4a2
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
366 jkl 29:6bc1c6c2c9da (inactive)
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
367 ghi 28:2f1019bd29d2 (inactive)
92b7caf4cb9e branch: make --force work even when specifying revs
Manuel Jacob <me@manueljacob.de>
parents: 42602
diff changeset
368
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
369 Changing branch on public changeset
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
370
40666
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
371 $ hg phase -r . -p
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
372 $ hg branch -r . def
47069
5b6dd0d9171b rewriteutil: give examples of public changesets that can't be rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47020
diff changeset
373 abort: cannot change branch of public changesets: d1c2addda4a2
35745
3bd8ab4c80a5 branch: add a --rev flag to change branch name of given revisions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
374 (see 'hg help phases' for details)
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45845
diff changeset
375 [10]
40666
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
376
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
377 Merge commit with conflicts, with evolution and without
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
378
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
379 $ mklozenge() {
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
380 > echo foo > a
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
381 > hg ci -qAm foo
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
382 > echo bar > a
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
383 > hg ci -qm bar
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
384 > hg up -q '.^'
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
385 > echo baz > a
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
386 > hg ci -qm baz
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
387 > hg merge -q -t :local
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
388 > echo neither > a
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
389 > hg ci -qm neither
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
390 > }
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
391
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
392 $ cd ..
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
393 $ hg init merge-with-evolution
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
394 $ cd merge-with-evolution
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
395 $ mklozenge
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
396
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
397 $ hg branch -r '(.^)::' abc
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
398 changed branch on 2 changesets
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
399 $ hg glog
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
400 @ 5:c07fa8b34d54 neither
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
401 |\ abc ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
402 | o 4:f2aa51777cc9 baz
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
403 | | abc ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
404 o | 1:2e33c4f0856b bar
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
405 |/ default ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
406 o 0:91cfb6004abf foo
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
407 default ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
408 $ hg cat a
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
409 neither
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
410
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
411 $ cd ..
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
412 $ hg init merge-without-evolution
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
413 $ cd merge-without-evolution
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
414 $ mklozenge
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
415 $ cat > .hg/hgrc << EOF
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
416 > [experimental]
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
417 > evolution = no
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
418 > evolution.allowunstable = no
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
419 > EOF
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
420
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
421 $ hg branch -r '(.^)::' abc
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
422 changed branch on 2 changesets
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
423 saved backup bundle to $TESTTMP/merge-without-evolution/.hg/strip-backup/9a3a2af368f4-8db1a361-branch-change.hg
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
424 $ hg glog
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
425 @ 3:c07fa8b34d54 neither
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
426 |\ abc ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
427 | o 2:f2aa51777cc9 baz
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
428 | | abc ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
429 o | 1:2e33c4f0856b bar
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
430 |/ default ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
431 o 0:91cfb6004abf foo
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
432 default ()
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
433 $ hg cat a
69268a13ffa5 branch: allow changing branch of merge commits with --rev
Anton Shestakov <av6@dwimlabs.net>
parents: 35771
diff changeset
434 neither