Show More
@@ -64,6 +64,8 b' def findcmd(ui, cmd, table):' | |||||
64 | raise UnknownCommand(cmd) |
|
64 | raise UnknownCommand(cmd) | |
65 |
|
65 | |||
66 | def bail_if_changed(repo): |
|
66 | def bail_if_changed(repo): | |
|
67 | if repo.dirstate.parents()[1] != nullid: | |||
|
68 | raise util.Abort(_('outstanding uncommitted merge')) | |||
67 | modified, added, removed, deleted = repo.status()[:4] |
|
69 | modified, added, removed, deleted = repo.status()[:4] | |
68 | if modified or added or removed or deleted: |
|
70 | if modified or added or removed or deleted: | |
69 | raise util.Abort(_("outstanding uncommitted changes")) |
|
71 | raise util.Abort(_("outstanding uncommitted changes")) |
@@ -196,11 +196,9 b' def backout(ui, repo, node=None, rev=Non' | |||||
196 | raise util.Abort(_("please specify a revision to backout")) |
|
196 | raise util.Abort(_("please specify a revision to backout")) | |
197 |
|
197 | |||
198 | cmdutil.bail_if_changed(repo) |
|
198 | cmdutil.bail_if_changed(repo) | |
|
199 | node = repo.lookup(rev) | |||
|
200 | ||||
199 | op1, op2 = repo.dirstate.parents() |
|
201 | op1, op2 = repo.dirstate.parents() | |
200 | if op2 != nullid: |
|
|||
201 | raise util.Abort(_('outstanding uncommitted merge')) |
|
|||
202 | node = repo.lookup(rev) |
|
|||
203 |
|
||||
204 | a = repo.changelog.ancestor(op1, node) |
|
202 | a = repo.changelog.ancestor(op1, node) | |
205 | if a != node: |
|
203 | if a != node: | |
206 | raise util.Abort(_('cannot back out change on a different branch')) |
|
204 | raise util.Abort(_('cannot back out change on a different branch')) |
General Comments 0
You need to be logged in to leave comments.
Login now