Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 26578:8bd2759f1fa7
dirstate: remove meaningless dirstateguard
Previous patch made dirstate changes in a transaction scope "all or
nothing". Therefore, 'dirstateguard' is meaningless, if its scope is
as same as one of the related transaction.
This patch removes such meaningless 'dirstateguard' usage.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 09 Oct 2015 03:53:46 +0900 |
parents | 2aa0dde846b4 |
children | 56b2bcea2529 |
line wrap: on
line diff
--- a/hgext/mq.py Fri Oct 09 03:53:46 2015 +0900 +++ b/hgext/mq.py Fri Oct 09 03:53:46 2015 +0900 @@ -816,10 +816,9 @@ def apply(self, repo, series, list=False, update_status=True, strict=False, patchdir=None, merge=None, all_files=None, tobackup=None, keepchanges=False): - wlock = dsguard = lock = tr = None + wlock = lock = tr = None try: wlock = repo.wlock() - dsguard = cmdutil.dirstateguard(repo, 'mq.apply') lock = repo.lock() tr = repo.transaction("qpush") try: @@ -828,12 +827,10 @@ tobackup=tobackup, keepchanges=keepchanges) tr.close() self.savedirty() - dsguard.close() return ret except AbortNoCleanup: tr.close() self.savedirty() - dsguard.close() raise except: # re-raises try: @@ -843,7 +840,7 @@ self.invalidate() raise finally: - release(tr, lock, dsguard, wlock) + release(tr, lock, wlock) self.removeundo(repo) def _apply(self, repo, series, list=False, update_status=True,