##// END OF EJS Templates
largefiles: introduce a constant for 'lfmr' action...
Pulkit Goyal -
r45855:a3cd63d6 default
parent child Browse files
Show More
@@ -52,6 +52,8 b' eh = exthelper.exthelper()'
52 52
53 53 lfstatus = lfutil.lfstatus
54 54
55 MERGE_ACTION_LARGEFILE_MARK_REMOVED = b'lfmr'
56
55 57 # -- Utility functions: commonly/repeatedly needed functionality ---------------
56 58
57 59
@@ -495,11 +497,11 b' def overridedebugstate(orig, ui, repo, *'
495 497 orig(ui, repo, *pats, **opts)
496 498
497 499
498 # Register the `lfmr` merge action in emptyactions() return type
500 # Register the MERGE_ACTION_LARGEFILE_MARK_REMOVED in emptyactions() return type
499 501 @eh.wrapfunction(merge, b'emptyactions')
500 502 def overrideemptyactions(origfn):
501 503 ret = origfn()
502 ret[b'lfmr'] = []
504 ret[MERGE_ACTION_LARGEFILE_MARK_REMOVED] = []
503 505 return ret
504 506
505 507
@@ -623,7 +625,10 b' def overridecalculateupdates('
623 625 # "lfile" should be marked as "removed" without
624 626 # removal of itself
625 627 mresult.addfile(
626 lfile, b'lfmr', None, b'forget non-standin largefile',
628 lfile,
629 MERGE_ACTION_LARGEFILE_MARK_REMOVED,
630 None,
631 b'forget non-standin largefile',
627 632 )
628 633
629 634 # linear-merge should treat this largefile as 're-added'
@@ -639,9 +644,9 b' def overridecalculateupdates('
639 644
640 645 @eh.wrapfunction(mergestatemod, b'recordupdates')
641 646 def mergerecordupdates(orig, repo, actions, branchmerge, getfiledata):
642 if b'lfmr' in actions:
647 if MERGE_ACTION_LARGEFILE_MARK_REMOVED in actions:
643 648 lfdirstate = lfutil.openlfdirstate(repo.ui, repo)
644 for lfile, args, msg in actions[b'lfmr']:
649 for lfile, args, msg in actions[MERGE_ACTION_LARGEFILE_MARK_REMOVED]:
645 650 # this should be executed before 'orig', to execute 'remove'
646 651 # before all other actions
647 652 repo.dirstate.remove(lfile)
General Comments 0
You need to be logged in to leave comments. Login now