equal
deleted
inserted
replaced
1627 files = patch.updatedir(ui, repo, files) |
1627 files = patch.updatedir(ui, repo, files) |
1628 n = repo.commit(files, message, user, date) |
1628 n = repo.commit(files, message, user, date) |
1629 if opts.get('exact'): |
1629 if opts.get('exact'): |
1630 if hex(n) != nodeid: |
1630 if hex(n) != nodeid: |
1631 repo.rollback() |
1631 repo.rollback() |
1632 raise util.Abort(_('patch is damaged' + |
1632 raise util.Abort(_('patch is damaged' |
1633 ' or loses information')) |
1633 ' or loses information')) |
1634 finally: |
1634 finally: |
1635 os.unlink(tmpname) |
1635 os.unlink(tmpname) |
1636 finally: |
1636 finally: |
1637 del lock, wlock |
1637 del lock, wlock |
1935 len(heads)) |
1935 len(heads)) |
1936 parent = repo.dirstate.parents()[0] |
1936 parent = repo.dirstate.parents()[0] |
1937 if len(heads) == 1: |
1937 if len(heads) == 1: |
1938 msg = _('there is nothing to merge') |
1938 msg = _('there is nothing to merge') |
1939 if parent != repo.lookup(repo.workingctx().branch()): |
1939 if parent != repo.lookup(repo.workingctx().branch()): |
1940 msg = _('%s - use "hg update" instead' % msg) |
1940 msg = _('%s - use "hg update" instead') % msg |
1941 raise util.Abort(msg) |
1941 raise util.Abort(msg) |
1942 |
1942 |
1943 if parent not in heads: |
1943 if parent not in heads: |
1944 raise util.Abort(_('working dir not at a head rev - ' |
1944 raise util.Abort(_('working dir not at a head rev - ' |
1945 'use "hg update" or merge with an explicit rev')) |
1945 'use "hg update" or merge with an explicit rev')) |