# HG changeset patch # User FUJIWARA Katsunori # Date 1490575474 -32400 # Node ID 32d998dc2a007855317dd2726e8521ad39753a97 # Parent d5cbbee542eb51965ff11afb67641acf7335a3c3 largefiles: omit updating newly added standin at linear merging Updating standin for newly added largefile is needed, only if same name largefile exists in destination context at linear merging. In such case, updated standin is used to detect divergence of largefile at overridefilemerge(). Otherwise, standin doesn't have any responsibility for its content (usually, it is empty). diff -r d5cbbee542eb -r 32d998dc2a00 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Mon Mar 27 09:44:34 2017 +0900 +++ b/hgext/largefiles/overrides.py Mon Mar 27 09:44:34 2017 +0900 @@ -1397,6 +1397,7 @@ [], False, True, False) oldclean = set(s.clean) pctx = repo['.'] + dctx = repo[node] for lfile in unsure + s.modified: lfileabs = repo.wvfs.join(lfile) if not repo.wvfs.exists(lfileabs): @@ -1409,7 +1410,12 @@ lfhash == lfutil.readstandin(repo, lfile, pctx)): oldclean.add(lfile) for lfile in s.added: - lfutil.updatestandin(repo, lfutil.standin(lfile)) + fstandin = lfutil.standin(lfile) + if fstandin not in dctx: + # in this case, content of standin file is meaningless + # (in dctx, lfile is unknown, or normal file) + continue + lfutil.updatestandin(repo, fstandin) # mark all clean largefiles as dirty, just in case the update gets # interrupted before largefiles and lfdirstate are synchronized for lfile in oldclean: