##// END OF EJS Templates
repo locks: use True/False
Matt Mackall -
r4914:9a2a73ea default
parent child Browse files
Show More
@@ -675,7 +675,7 b' def copy(ui, repo, *pats, **opts):'
675 This command takes effect in the next commit. To undo a copy
675 This command takes effect in the next commit. To undo a copy
676 before that, see hg revert.
676 before that, see hg revert.
677 """
677 """
678 wlock = repo.wlock(0)
678 wlock = repo.wlock(False)
679 errs, copied = docopy(ui, repo, pats, opts, wlock)
679 errs, copied = docopy(ui, repo, pats, opts, wlock)
680 return errs
680 return errs
681
681
@@ -2247,7 +2247,7 b' def rename(ui, repo, *pats, **opts):'
2247 This command takes effect in the next commit. To undo a rename
2247 This command takes effect in the next commit. To undo a rename
2248 before that, see hg revert.
2248 before that, see hg revert.
2249 """
2249 """
2250 wlock = repo.wlock(0)
2250 wlock = repo.wlock(False)
2251 errs, copied = docopy(ui, repo, pats, opts, wlock)
2251 errs, copied = docopy(ui, repo, pats, opts, wlock)
2252 names = []
2252 names = []
2253 for abs, rel, exact in copied:
2253 for abs, rel, exact in copied:
@@ -561,11 +561,11 b' class localrepository(repo.repository):'
561 acquirefn()
561 acquirefn()
562 return l
562 return l
563
563
564 def lock(self, wait=1):
564 def lock(self, wait=True):
565 return self._lock(self.sjoin("lock"), wait, None, self.invalidate,
565 return self._lock(self.sjoin("lock"), wait, None, self.invalidate,
566 _('repository %s') % self.origroot)
566 _('repository %s') % self.origroot)
567
567
568 def wlock(self, wait=1):
568 def wlock(self, wait=True):
569 return self._lock(self.join("wlock"), wait, self.dirstate.write,
569 return self._lock(self.join("wlock"), wait, self.dirstate.write,
570 self.dirstate.invalidate,
570 self.dirstate.invalidate,
571 _('working directory of %s') % self.origroot)
571 _('working directory of %s') % self.origroot)
@@ -898,7 +898,7 b' class localrepository(repo.repository):'
898 cleanup = False
898 cleanup = False
899 if not wlock:
899 if not wlock:
900 try:
900 try:
901 wlock = self.wlock(wait=0)
901 wlock = self.wlock(False)
902 cleanup = True
902 cleanup = True
903 except lock.LockException:
903 except lock.LockException:
904 pass
904 pass
General Comments 0
You need to be logged in to leave comments. Login now