# HG changeset patch # User Adrian Buehlmann # Date 1306238900 -7200 # Node ID 137b03b5aea16ecc34d6ecef90460b86ce20b84a # Parent ede7cea1550f3745da21ebc462129f4d5046af8a workingctx: unlink paths while holding the wlock diff -r ede7cea1550f -r 137b03b5aea1 mercurial/context.py --- a/mercurial/context.py Tue May 24 16:12:01 2011 +0200 +++ b/mercurial/context.py Tue May 24 14:08:20 2011 +0200 @@ -852,15 +852,15 @@ yield changectx(self._repo, a) def remove(self, list, unlink=False): - if unlink: - for f in list: - try: - util.unlinkpath(self._repo.wjoin(f)) - except OSError, inst: - if inst.errno != errno.ENOENT: - raise wlock = self._repo.wlock() try: + if unlink: + for f in list: + try: + util.unlinkpath(self._repo.wjoin(f)) + except OSError, inst: + if inst.errno != errno.ENOENT: + raise for f in list: if unlink and os.path.lexists(self._repo.wjoin(f)): self._repo.ui.warn(_("%s still exists!\n") % f)