Show More
@@ -154,11 +154,7 b' def openlfdirstate(ui, repo):' | |||
|
154 | 154 | |
|
155 | 155 | # If the largefiles dirstate does not exist, populate and create |
|
156 | 156 | # it. This ensures that we create it on the first meaningful |
|
157 |
# largefiles operation in a new clone. |
|
|
158 | # way to forcibly rebuild largefiles state: | |
|
159 | # rm .hg/largefiles/dirstate && hg status | |
|
160 | # Or even, if things are really messed up: | |
|
161 | # rm -rf .hg/largefiles && hg status | |
|
157 | # largefiles operation in a new clone. | |
|
162 | 158 | if not os.path.exists(os.path.join(admin, 'dirstate')): |
|
163 | 159 | util.makedirs(admin) |
|
164 | 160 | matcher = getstandinmatcher(repo) |
@@ -172,14 +168,9 b' def openlfdirstate(ui, repo):' | |||
|
172 | 168 | except OSError, err: |
|
173 | 169 | if err.errno != errno.ENOENT: |
|
174 | 170 | raise |
|
175 | ||
|
176 | lfdirstate.write() | |
|
177 | ||
|
178 | 171 | return lfdirstate |
|
179 | 172 | |
|
180 | 173 | def lfdirstate_status(lfdirstate, repo, rev): |
|
181 | wlock = repo.wlock() | |
|
182 | try: | |
|
183 | 174 |
|
|
184 | 175 |
|
|
185 | 176 |
|
@@ -190,9 +181,6 b' def lfdirstate_status(lfdirstate, repo, ' | |||
|
190 | 181 |
|
|
191 | 182 |
|
|
192 | 183 |
|
|
193 | lfdirstate.write() | |
|
194 | finally: | |
|
195 | wlock.release() | |
|
196 | 184 | return (modified, added, removed, missing, unknown, ignored, clean) |
|
197 | 185 | |
|
198 | 186 | def listlfiles(repo, rev=None, matcher=None): |
@@ -910,6 +910,8 b' def override_rollback(orig, ui, repo, **' | |||
|
910 | 910 | result = orig(ui, repo, **opts) |
|
911 | 911 | merge.update(repo, node=None, branchmerge=False, force=True, |
|
912 | 912 | partial=lfutil.isstandin) |
|
913 | wlock = repo.wlock() | |
|
914 | try: | |
|
913 | 915 | lfdirstate = lfutil.openlfdirstate(ui, repo) |
|
914 | 916 | lfiles = lfutil.listlfiles(repo) |
|
915 | 917 | oldlfiles = lfutil.listlfiles(repo, repo[None].parents()[0].rev()) |
@@ -919,6 +921,8 b' def override_rollback(orig, ui, repo, **' | |||
|
919 | 921 | else: |
|
920 | 922 | lfdirstate.add(file) |
|
921 | 923 | lfdirstate.write() |
|
924 | finally: | |
|
925 | wlock.release() | |
|
922 | 926 | return result |
|
923 | 927 | |
|
924 | 928 | def override_transplant(orig, ui, repo, *revs, **opts): |
@@ -147,9 +147,6 b' def reposetup(ui, repo):' | |||
|
147 | 147 | result = super(lfiles_repo, self).status(node1, node2, m, |
|
148 | 148 | True, clean, unknown, listsubrepos) |
|
149 | 149 | if working: |
|
150 | # hold the wlock while we read largefiles and | |
|
151 | # update the lfdirstate | |
|
152 | wlock = repo.wlock() | |
|
153 | 150 | try: |
|
154 | 151 | # Any non-largefiles that were explicitly listed must be |
|
155 | 152 | # taken out or lfdirstate.status will report an error. |
@@ -186,7 +183,6 b' def reposetup(ui, repo):' | |||
|
186 | 183 | else: |
|
187 | 184 | clean.append(lfile) |
|
188 | 185 | lfdirstate.normal(lfile) |
|
189 | lfdirstate.write() | |
|
190 | 186 | else: |
|
191 | 187 | tocheck = unsure + modified + added + clean |
|
192 | 188 | modified, added, clean = [], [], [] |
@@ -201,10 +197,9 b' def reposetup(ui, repo):' | |||
|
201 | 197 | clean.append(lfile) |
|
202 | 198 | else: |
|
203 | 199 | added.append(lfile) |
|
200 | finally: | |
|
204 | 201 | # Replace the original ignore function |
|
205 | 202 | lfdirstate._ignore = orig_ignore |
|
206 | finally: | |
|
207 | wlock.release() | |
|
208 | 203 | |
|
209 | 204 | for standin in ctx1.manifest(): |
|
210 | 205 | if not lfutil.isstandin(standin): |
@@ -324,10 +319,13 b' def reposetup(ui, repo):' | |||
|
324 | 319 | if not os.path.exists( |
|
325 | 320 | repo.wjoin(lfutil.standin(lfile))): |
|
326 | 321 | lfdirstate.drop(lfile) |
|
322 | ||
|
323 | result = orig(text=text, user=user, date=date, match=match, | |
|
324 | force=force, editor=editor, extra=extra) | |
|
325 | # This needs to be after commit; otherwise precommit hooks | |
|
326 | # get the wrong status | |
|
327 | 327 | lfdirstate.write() |
|
328 | ||
|
329 | return orig(text=text, user=user, date=date, match=match, | |
|
330 | force=force, editor=editor, extra=extra) | |
|
328 | return result | |
|
331 | 329 | |
|
332 | 330 | for f in match.files(): |
|
333 | 331 | if lfutil.isstandin(f): |
@@ -359,7 +357,6 b' def reposetup(ui, repo):' | |||
|
359 | 357 | lfdirstate.normal(lfile) |
|
360 | 358 | else: |
|
361 | 359 | lfdirstate.drop(lfile) |
|
362 | lfdirstate.write() | |
|
363 | 360 | |
|
364 | 361 | # Cook up a new matcher that only matches regular files or |
|
365 | 362 | # standins corresponding to the big files requested by the |
@@ -400,8 +397,12 b' def reposetup(ui, repo):' | |||
|
400 | 397 | return f in standins |
|
401 | 398 | |
|
402 | 399 | match.matchfn = matchfn |
|
403 |
re |
|
|
400 | result = orig(text=text, user=user, date=date, match=match, | |
|
404 | 401 | force=force, editor=editor, extra=extra) |
|
402 | # This needs to be after commit; otherwise precommit hooks | |
|
403 | # get the wrong status | |
|
404 | lfdirstate.write() | |
|
405 | return result | |
|
405 | 406 | finally: |
|
406 | 407 | wlock.release() |
|
407 | 408 |
General Comments 0
You need to be logged in to leave comments.
Login now