Mercurial > hg-stable
changeset 23695:997a96cf6344 stable
largefiles: mark lfile as added in lfdirstate when the standin is added
This is an alternative solution to the problem addressed by f72d73937853. This
implementation has the advantage that it doesn't mark clean largefiles as
normallookup. We can thus avoid repeated rehashing of all largefiles when
f72d73937853 is backed out.
This implementation use the existing 'lfmr' actions that 23fe278bde43
introduced for handling another part of the same cases.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 31 Dec 2014 14:46:02 +0100 |
parents | 97eb62b0f4a9 |
children | 1265a3a71d75 |
files | hgext/largefiles/overrides.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Wed Dec 31 14:45:02 2014 +0100 +++ b/hgext/largefiles/overrides.py Wed Dec 31 14:46:02 2014 +0100 @@ -445,7 +445,7 @@ removes = set(a[0] for a in actions['r']) newglist = [] - lfmr = [] # LargeFiles: Mark as Removed + lfmr = [] # LargeFiles: Mark as Removed ... and mark largefile as added for action in actions['g']: f, args, msg = action splitstandin = f and lfutil.splitstandin(f) @@ -514,10 +514,14 @@ def mergerecordupdates(orig, repo, actions, branchmerge): if 'lfmr' in actions: - # this should be executed before 'orig', to execute 'remove' - # before all other actions + lfdirstate = lfutil.openlfdirstate(repo.ui, repo) for lfile, args, msg in actions['lfmr']: + # this should be executed before 'orig', to execute 'remove' + # before all other actions repo.dirstate.remove(lfile) + # make sure lfile doesn't get synclfdirstate'd as normal + lfdirstate.add(lfile) + lfdirstate.write() return orig(repo, actions, branchmerge)