Show More
@@ -18,6 +18,7 b' from mercurial import (' | |||||
18 | localrepo, |
|
18 | localrepo, | |
19 | match as matchmod, |
|
19 | match as matchmod, | |
20 | scmutil, |
|
20 | scmutil, | |
|
21 | util, | |||
21 | ) |
|
22 | ) | |
22 |
|
23 | |||
23 | from . import ( |
|
24 | from . import ( | |
@@ -130,14 +131,15 b' def reposetup(ui, repo):' | |||||
130 | if match is None: |
|
131 | if match is None: | |
131 | match = matchmod.always() |
|
132 | match = matchmod.always() | |
132 |
|
133 | |||
133 | wlock = None |
|
|||
134 | try: |
|
134 | try: | |
135 | try: |
|
135 | # updating the dirstate is optional | |
136 | # updating the dirstate is optional |
|
136 | # so we don't wait on the lock | |
137 | # so we don't wait on the lock |
|
137 | wlock = self.wlock(False) | |
138 |
|
|
138 | gotlock = True | |
139 |
|
|
139 | except error.LockError: | |
140 | pass |
|
140 | wlock = util.nullcontextmanager() | |
|
141 | gotlock = False | |||
|
142 | with wlock: | |||
141 |
|
143 | |||
142 | # First check if paths or patterns were specified on the |
|
144 | # First check if paths or patterns were specified on the | |
143 | # command line. If there were, and they don't match any |
|
145 | # command line. If there were, and they don't match any | |
@@ -308,13 +310,9 b' def reposetup(ui, repo):' | |||||
308 | for items in result |
|
310 | for items in result | |
309 | ] |
|
311 | ] | |
310 |
|
312 | |||
311 |
if |
|
313 | if gotlock: | |
312 | lfdirstate.write() |
|
314 | lfdirstate.write() | |
313 |
|
315 | |||
314 | finally: |
|
|||
315 | if wlock: |
|
|||
316 | wlock.release() |
|
|||
317 |
|
||||
318 | self.lfstatus = True |
|
316 | self.lfstatus = True | |
319 | return scmutil.status(*result) |
|
317 | return scmutil.status(*result) | |
320 |
|
318 |
General Comments 0
You need to be logged in to leave comments.
Login now