##// END OF EJS Templates
largefiles: fix transplant for all cases (issue3192)
Na'Tosha Bard -
r15982:bf502ccc stable
parent child Browse files
Show More
@@ -952,6 +952,11 b' def override_rollback(orig, ui, repo, **'
952 return result
952 return result
953
953
954 def override_transplant(orig, ui, repo, *revs, **opts):
954 def override_transplant(orig, ui, repo, *revs, **opts):
955 result = orig(ui, repo, *revs, **opts)
955 try:
956 lfcommands.updatelfiles(repo.ui, repo)
956 repo._istransplanting = True
957 result = orig(ui, repo, *revs, **opts)
958 lfcommands.updatelfiles(ui, repo, filelist=None,
959 printmessage=False)
960 finally:
961 repo._istransplanting = False
957 return result
962 return result
@@ -268,15 +268,17 b' def reposetup(ui, repo):'
268
268
269 wlock = repo.wlock()
269 wlock = repo.wlock()
270 try:
270 try:
271 # Case 0: Rebase
271 # Case 0: Rebase or Transplant
272 # We have to take the time to pull down the new largefiles now.
272 # We have to take the time to pull down the new largefiles now.
273 # Otherwise if we are rebasing, any largefiles that were
273 # Otherwise, any largefiles that were modified in the
274 # modified in the destination changesets get overwritten, either
274 # destination changesets get overwritten, either by the rebase
275 # by the rebase or in the first commit after the rebase.
275 # or in the first commit after the rebase or transplant.
276 # updatelfiles will update the dirstate to mark any pulled
276 # updatelfiles will update the dirstate to mark any pulled
277 # largefiles as modified
277 # largefiles as modified
278 if getattr(repo, "_isrebasing", False):
278 if getattr(repo, "_isrebasing", False) or \
279 lfcommands.updatelfiles(repo.ui, repo)
279 getattr(repo, "_istransplanting", False):
280 lfcommands.updatelfiles(repo.ui, repo, filelist=None,
281 printmessage=False)
280 result = orig(text=text, user=user, date=date, match=match,
282 result = orig(text=text, user=user, date=date, match=match,
281 force=force, editor=editor, extra=extra)
283 force=force, editor=editor, extra=extra)
282 return result
284 return result
@@ -423,8 +423,6 b' revisions (this was a very bad bug that '
423 adding manifests
423 adding manifests
424 adding file changes
424 adding file changes
425 added 1 changesets with 2 changes to 2 files (+1 heads)
425 added 1 changesets with 2 changes to 2 files (+1 heads)
426 getting changed largefiles
427 1 largefiles updated, 0 removed
428 Invoking status precommit hook
426 Invoking status precommit hook
429 M sub/normal4
427 M sub/normal4
430 M sub2/large6
428 M sub2/large6
@@ -463,8 +461,6 b' revisions (this was a very bad bug that '
463 caching new largefiles
461 caching new largefiles
464 0 largefiles cached
462 0 largefiles cached
465 $ hg rebase
463 $ hg rebase
466 getting changed largefiles
467 1 largefiles updated, 0 removed
468 Invoking status precommit hook
464 Invoking status precommit hook
469 M sub/normal4
465 M sub/normal4
470 M sub2/large6
466 M sub2/large6
@@ -730,8 +726,6 b' Test that transplanting a largefile chan'
730 adding manifests
726 adding manifests
731 adding file changes
727 adding file changes
732 added 1 changesets with 2 changes to 2 files
728 added 1 changesets with 2 changes to 2 files
733 getting changed largefiles
734 1 largefiles updated, 0 removed
735 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
729 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
736 9:598410d3eb9a modify normal file largefile in repo d
730 9:598410d3eb9a modify normal file largefile in repo d
737 8:a381d2c8c80e modify normal file and largefile in repo b
731 8:a381d2c8c80e modify normal file and largefile in repo b
General Comments 0
You need to be logged in to leave comments. Login now