Show More
@@ -227,7 +227,10 b' def backout(ui, repo, node=None, rev=Non' | |||||
227 | raise util.Abort(_('cannot use --parent on non-merge changeset')) |
|
227 | raise util.Abort(_('cannot use --parent on non-merge changeset')) | |
228 | parent = p1 |
|
228 | parent = p1 | |
229 |
|
229 | |||
|
230 | # the backout should appear on the same branch | |||
|
231 | branch = repo.dirstate.branch() | |||
230 | hg.clean(repo, node, show_stats=False) |
|
232 | hg.clean(repo, node, show_stats=False) | |
|
233 | repo.dirstate.setbranch(branch) | |||
231 | revert_opts = opts.copy() |
|
234 | revert_opts = opts.copy() | |
232 | revert_opts['date'] = None |
|
235 | revert_opts['date'] = None | |
233 | revert_opts['all'] = True |
|
236 | revert_opts['all'] = True |
@@ -74,7 +74,7 b' marked working directory as branch branc' | |||||
74 | adding file2 |
|
74 | adding file2 | |
75 | removing file1 |
|
75 | removing file1 | |
76 | created new head |
|
76 | created new head | |
77 |
changeset 3: |
|
77 | changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3 | |
78 | the backout changeset is a new head - do not forget to merge |
|
78 | the backout changeset is a new head - do not forget to merge | |
79 | (use "backout --merge" if you want to auto-merge) |
|
79 | (use "backout --merge" if you want to auto-merge) | |
80 | % on branch2 with branch1 not merged, so file1 should still exist: |
|
80 | % on branch2 with branch1 not merged, so file1 should still exist: | |
@@ -85,10 +85,11 b' C file2' | |||||
85 | % on branch2 with branch1 merged, so file1 should be gone: |
|
85 | % on branch2 with branch1 merged, so file1 should be gone: | |
86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
87 | (branch merge, don't forget to commit) |
|
87 | (branch merge, don't forget to commit) | |
88 |
2 |
|
88 | 22149cdde76d (branch2) tip | |
89 | C default |
|
89 | C default | |
90 | C file2 |
|
90 | C file2 | |
91 | % on branch1, so no file1 and file2: |
|
91 | % on branch1, so no file1 and file2: | |
92 |
|
|
92 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
93 |
|
|
93 | bf1602f437f3 (branch1) | |
94 | C default |
|
94 | C default | |
|
95 | C file1 |
General Comments 0
You need to be logged in to leave comments.
Login now