Mercurial > hg
changeset 14420:137b03b5aea1
workingctx: unlink paths while holding the wlock
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 24 May 2011 14:08:20 +0200 |
parents | ede7cea1550f |
children | 639f26cab2f5 |
files | mercurial/context.py |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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)