Show More
@@ -115,16 +115,15 b' def trywritehiddencache(repo, hideable, ' | |||||
115 | """ |
|
115 | """ | |
116 | wlock = fh = None |
|
116 | wlock = fh = None | |
117 | try: |
|
117 | try: | |
118 | try: |
|
118 | wlock = repo.wlock(wait=False) | |
119 | wlock = repo.wlock(wait=False) |
|
119 | # write cache to file | |
120 | # write cache to file |
|
120 | newhash = cachehash(repo, hideable) | |
121 | newhash = cachehash(repo, hideable) |
|
121 | fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True) | |
122 | fh = repo.vfs.open(cachefile, 'w+b', atomictemp=True) |
|
122 | _writehiddencache(fh, newhash, hidden) | |
123 | _writehiddencache(fh, newhash, hidden) |
|
123 | except (IOError, OSError): | |
124 | except (IOError, OSError): |
|
124 | repo.ui.debug('error writing hidden changesets cache') | |
125 | repo.ui.debug('error writing hidden changesets cache') |
|
125 | except error.LockHeld: | |
126 | except error.LockHeld: |
|
126 | repo.ui.debug('cannot obtain lock to write hidden changesets cache') | |
127 | repo.ui.debug('cannot obtain lock to write hidden changesets cache') |
|
|||
128 | finally: |
|
127 | finally: | |
129 | if fh: |
|
128 | if fh: | |
130 | fh.close() |
|
129 | fh.close() |
General Comments 0
You need to be logged in to leave comments.
Login now