Show More
@@ -68,6 +68,7 b' from mercurial.lock import release' | |||||
68 | from mercurial import commands, cmdutil, hg, scmutil, util, revset |
|
68 | from mercurial import commands, cmdutil, hg, scmutil, util, revset | |
69 | from mercurial import extensions, error, phases |
|
69 | from mercurial import extensions, error, phases | |
70 | from mercurial import patch as patchmod |
|
70 | from mercurial import patch as patchmod | |
|
71 | from mercurial import lock as lockmod | |||
71 | from mercurial import localrepo |
|
72 | from mercurial import localrepo | |
72 | from mercurial import subrepo |
|
73 | from mercurial import subrepo | |
73 | import os, re, errno, shutil |
|
74 | import os, re, errno, shutil | |
@@ -1790,7 +1791,10 b' class queue(object):' | |||||
1790 |
|
1791 | |||
1791 | # Ensure we create a new changeset in the same phase than |
|
1792 | # Ensure we create a new changeset in the same phase than | |
1792 | # the old one. |
|
1793 | # the old one. | |
1793 |
|
|
1794 | lock = tr = None | |
|
1795 | try: | |||
|
1796 | lock = repo.lock() | |||
|
1797 | tr = repo.transaction('mq') | |||
1794 | n = newcommit(repo, oldphase, message, user, ph.date, |
|
1798 | n = newcommit(repo, oldphase, message, user, ph.date, | |
1795 | match=match, force=True, editor=editor) |
|
1799 | match=match, force=True, editor=editor) | |
1796 | # only write patch after a successful commit |
|
1800 | # only write patch after a successful commit | |
@@ -1809,9 +1813,12 b' class queue(object):' | |||||
1809 | marks = repo._bookmarks |
|
1813 | marks = repo._bookmarks | |
1810 | for bm in bmlist: |
|
1814 | for bm in bmlist: | |
1811 | marks[bm] = n |
|
1815 | marks[bm] = n | |
1812 |
marks. |
|
1816 | marks.recordchange(tr) | |
|
1817 | tr.close() | |||
1813 |
|
1818 | |||
1814 | self.applied.append(statusentry(n, patchfn)) |
|
1819 | self.applied.append(statusentry(n, patchfn)) | |
|
1820 | finally: | |||
|
1821 | lockmod.release(lock, tr) | |||
1815 | except: # re-raises |
|
1822 | except: # re-raises | |
1816 | ctx = repo[cparents[0]] |
|
1823 | ctx = repo[cparents[0]] | |
1817 | repo.dirstate.rebuild(ctx.node(), ctx.manifest()) |
|
1824 | repo.dirstate.rebuild(ctx.node(), ctx.manifest()) |
General Comments 0
You need to be logged in to leave comments.
Login now