[Updated] D8836: largefiles: introduce a constant for 'lfmr' action
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Aug 2 17:47:11 UTC 2020
Closed by commit rHGa3cd63d6005b: largefiles: introduce a constant for 'lfmr' action (authored by pulkit).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8836?vs=22126&id=22219
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8836/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8836
AFFECTED FILES
hgext/largefiles/overrides.py
CHANGE DETAILS
diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -52,6 +52,8 @@
lfstatus = lfutil.lfstatus
+MERGE_ACTION_LARGEFILE_MARK_REMOVED = b'lfmr'
+
# -- Utility functions: commonly/repeatedly needed functionality ---------------
@@ -495,11 +497,11 @@
orig(ui, repo, *pats, **opts)
-# Register the `lfmr` merge action in emptyactions() return type
+# Register the MERGE_ACTION_LARGEFILE_MARK_REMOVED in emptyactions() return type
@eh.wrapfunction(merge, b'emptyactions')
def overrideemptyactions(origfn):
ret = origfn()
- ret[b'lfmr'] = []
+ ret[MERGE_ACTION_LARGEFILE_MARK_REMOVED] = []
return ret
@@ -623,7 +625,10 @@
# "lfile" should be marked as "removed" without
# removal of itself
mresult.addfile(
- lfile, b'lfmr', None, b'forget non-standin largefile',
+ lfile,
+ MERGE_ACTION_LARGEFILE_MARK_REMOVED,
+ None,
+ b'forget non-standin largefile',
)
# linear-merge should treat this largefile as 're-added'
@@ -639,9 +644,9 @@
@eh.wrapfunction(mergestatemod, b'recordupdates')
def mergerecordupdates(orig, repo, actions, branchmerge, getfiledata):
- if b'lfmr' in actions:
+ if MERGE_ACTION_LARGEFILE_MARK_REMOVED in actions:
lfdirstate = lfutil.openlfdirstate(repo.ui, repo)
- for lfile, args, msg in actions[b'lfmr']:
+ for lfile, args, msg in actions[MERGE_ACTION_LARGEFILE_MARK_REMOVED]:
# this should be executed before 'orig', to execute 'remove'
# before all other actions
repo.dirstate.remove(lfile)
To: pulkit, #hg-reviewers, indygreg
Cc: indygreg, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200802/28ddad4d/attachment-0002.html>
More information about the Mercurial-patches
mailing list