Mercurial > hg
changeset 690:f762860f82c6
Minor merge fixups
return a proper errorlevel on abort
let force jump across branches
catch exception on unlink
manifest hash: 6787814cd75e9f9623c56dc36f865afd54f56bfa
author | mpm@selenic.com |
---|---|
date | Wed, 13 Jul 2005 01:46:50 -0800 |
parents | 4315db147f00 |
children | 61c6b4178b9e |
files | mercurial/hg.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Wed Jul 13 01:42:48 2005 -0800 +++ b/mercurial/hg.py Wed Jul 13 01:46:50 2005 -0800 @@ -1253,7 +1253,7 @@ pl = self.dirstate.parents() if not force and pl[1] != nullid: self.ui.warn("aborting: outstanding uncommitted merges\n") - return + return 1 p1, p2 = pl[0], node pa = self.changelog.ancestor(p1, p2) @@ -1407,7 +1407,7 @@ get[f] = merge[f][1] merge = {} - if linear_path: + if linear_path or force: # we don't need to do any magic, just jump to the new rev mode = 'n' p1, p2 = p2, nullid @@ -1464,7 +1464,10 @@ remove.sort() for f in remove: self.ui.note("removing %s\n" % f) - os.unlink(f) + try: + os.unlink(f) + except OSError, inst: + self.ui.warn("update failed to remove %s: %s!\n" % (f, inst)) # try removing directories that might now be empty try: os.removedirs(os.path.dirname(f)) except: pass