Commits

bbarry  committed af3232a

fixing warning "del lock depreciated, use lock.release instead"

  • Participants
  • Parent commits 1703a86

Comments (0)

Files changed (1)

         wlock = lock = None
         try:
             wlock = repo.wlock()
-            lock = repo.lock()
+            try:
+                lock = repo.lock()
 
-            self.removeundo(repo)
-            repair.strip(self.ui, repo, rev, 'none')
-            # strip may have unbundled a set of backed up revisions after
-            # the actual strip
-            self.removeundo(repo)
+                self.removeundo(repo)
+                repair.strip(self.ui, repo, rev, 'none')
+                # strip may have unbundled a set of backed up revisions after
+                # the actual strip
+                self.removeundo(repo)
+            finally:
+                lock.release()
         finally:
-            del lock, wlock
+            wlock.release()
 
     def _applypatch(self, repo, patchfile, sim, force=False, **opts):
         """applies a patch the old fashioned way."""