##// END OF EJS Templates
largefiles: correctly handle dirstate status when rebasing...
Na'Tosha Bard -
r15793:3ef07ecd default
parent child Browse files
Show More
@@ -455,7 +455,13 b' def _updatelfile(repo, lfdirstate, lfile'
455 ret = -1
455 ret = -1
456 state = repo.dirstate[lfutil.standin(lfile)]
456 state = repo.dirstate[lfutil.standin(lfile)]
457 if state == 'n':
457 if state == 'n':
458 lfdirstate.normal(lfile)
458 # When rebasing, we need to synchronize the standin and the largefile,
459 # because otherwise the largefile will get reverted. But for commit's
460 # sake, we have to mark the file as unclean.
461 if getattr(repo, "_isrebasing", False):
462 lfdirstate.normallookup(lfile)
463 else:
464 lfdirstate.normal(lfile)
459 elif state == 'r':
465 elif state == 'r':
460 lfdirstate.remove(lfile)
466 lfdirstate.remove(lfile)
461 elif state == 'a':
467 elif state == 'a':
@@ -139,6 +139,8 b' class largefiles_dirstate(dirstate.dirst'
139 return super(largefiles_dirstate, self).drop(unixpath(f))
139 return super(largefiles_dirstate, self).drop(unixpath(f))
140 def forget(self, f):
140 def forget(self, f):
141 return super(largefiles_dirstate, self).forget(unixpath(f))
141 return super(largefiles_dirstate, self).forget(unixpath(f))
142 def normallookup(self, f):
143 return super(largefiles_dirstate, self).normallookup(unixpath(f))
142
144
143 def openlfdirstate(ui, repo):
145 def openlfdirstate(ui, repo):
144 '''
146 '''
@@ -278,14 +278,18 b' def reposetup(ui, repo):'
278
278
279 wlock = repo.wlock()
279 wlock = repo.wlock()
280 try:
280 try:
281 # Case 0: Rebase
282 # We have to take the time to pull down the new largefiles now.
283 # Otherwise if we are rebasing, any largefiles that were
284 # modified in the destination changesets get overwritten, either
285 # by the rebase or in the first commit after the rebase.
286 # updatelfiles will update the dirstate to mark any pulled
287 # largefiles as modified
281 if getattr(repo, "_isrebasing", False):
288 if getattr(repo, "_isrebasing", False):
282 # We have to take the time to pull down the new
283 # largefiles now. Otherwise if we are rebasing,
284 # any largefiles that were modified in the
285 # destination changesets get overwritten, either
286 # by the rebase or in the first commit after the
287 # rebase.
288 lfcommands.updatelfiles(repo.ui, repo)
289 lfcommands.updatelfiles(repo.ui, repo)
290 result = orig(text=text, user=user, date=date, match=match,
291 force=force, editor=editor, extra=extra)
292 return result
289 # Case 1: user calls commit with no specific files or
293 # Case 1: user calls commit with no specific files or
290 # include/exclude patterns: refresh and commit all files that
294 # include/exclude patterns: refresh and commit all files that
291 # are "dirty".
295 # are "dirty".
General Comments 0
You need to be logged in to leave comments. Login now