mercurial/repoview.py
changeset 25086 140c2d1e57e7
parent 24620 7c6f9097e2e0
child 25149 3f0744eeaeaf
--- a/mercurial/repoview.py	Fri May 15 09:57:02 2015 -0500
+++ b/mercurial/repoview.py	Fri May 15 09:57:44 2015 -0500
@@ -115,16 +115,15 @@
     """
     wlock = fh = None
     try:
-        try:
-            wlock = repo.wlock(wait=False)
-            # write cache to file
-            newhash = cachehash(repo, hideable)
-            fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True)
-            _writehiddencache(fh, newhash, hidden)
-        except (IOError, OSError):
-            repo.ui.debug('error writing hidden changesets cache')
-        except error.LockHeld:
-            repo.ui.debug('cannot obtain lock to write hidden changesets cache')
+        wlock = repo.wlock(wait=False)
+        # write cache to file
+        newhash = cachehash(repo, hideable)
+        fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True)
+        _writehiddencache(fh, newhash, hidden)
+    except (IOError, OSError):
+        repo.ui.debug('error writing hidden changesets cache')
+    except error.LockHeld:
+        repo.ui.debug('cannot obtain lock to write hidden changesets cache')
     finally:
         if fh:
             fh.close()