Patchwork [3,of,3] mq: release lock after transaction in qrefresh

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 3, 2016, 4:05 p.m.
Message ID <870b39c306bef0889f73.1475510736@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/16836/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 3, 2016, 4:05 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1470920717 -7200
#      Thu Aug 11 15:05:17 2016 +0200
# Node ID 870b39c306bef0889f738d292006a1a322757e22
# Parent  901855444329e0a4ad7ad0e41cf0a1b6fd3ed5bc
# EXP-Topic vfs.ward
mq: release lock after transaction in qrefresh

The transaction should be closed within the lock.
Augie Fackler - Oct. 8, 2016, 10:11 a.m.
On Mon, Oct 03, 2016 at 06:05:36PM +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1470920717 -7200
> #      Thu Aug 11 15:05:17 2016 +0200
> # Node ID 870b39c306bef0889f738d292006a1a322757e22
> # Parent  901855444329e0a4ad7ad0e41cf0a1b6fd3ed5bc
> # EXP-Topic vfs.ward
> mq: release lock after transaction in qrefresh

Queued these, thanks

>
> The transaction should be closed within the lock.
>
> diff --git a/hgext/mq.py b/hgext/mq.py
> --- a/hgext/mq.py
> +++ b/hgext/mq.py
> @@ -1840,7 +1840,7 @@ class queue(object):
>
>                      self.applied.append(statusentry(n, patchfn))
>                  finally:
> -                    lockmod.release(lock, tr)
> +                    lockmod.release(tr, lock)
>              except: # re-raises
>                  ctx = repo[cparents[0]]
>                  repo.dirstate.rebuild(ctx.node(), ctx.manifest())
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1840,7 +1840,7 @@  class queue(object):
 
                     self.applied.append(statusentry(n, patchfn))
                 finally:
-                    lockmod.release(lock, tr)
+                    lockmod.release(tr, lock)
             except: # re-raises
                 ctx = repo[cparents[0]]
                 repo.dirstate.rebuild(ctx.node(), ctx.manifest())