##// END OF EJS Templates
largefiles: avoid redundant standin() invocations...
FUJIWARA Katsunori -
r31618:8228bc8f default
parent child Browse files
Show More
@@ -220,7 +220,8 b' def _lfconvert_addchangeset(rsrc, rdst, '
220 normalfiles.add(f)
220 normalfiles.add(f)
221
221
222 if f in lfiles:
222 if f in lfiles:
223 dstfiles.append(lfutil.standin(f))
223 fstandin = lfutil.standin(f)
224 dstfiles.append(fstandin)
224 # largefile in manifest if it has not been removed/renamed
225 # largefile in manifest if it has not been removed/renamed
225 if f in ctx.manifest():
226 if f in ctx.manifest():
226 fctx = ctx.filectx(f)
227 fctx = ctx.filectx(f)
@@ -236,7 +237,7 b' def _lfconvert_addchangeset(rsrc, rdst, '
236 if f not in lfiletohash or lfiletohash[f] != hash:
237 if f not in lfiletohash or lfiletohash[f] != hash:
237 rdst.wwrite(f, ctx[f].data(), ctx[f].flags())
238 rdst.wwrite(f, ctx[f].data(), ctx[f].flags())
238 executable = 'x' in ctx[f].flags()
239 executable = 'x' in ctx[f].flags()
239 lfutil.writestandin(rdst, lfutil.standin(f), hash,
240 lfutil.writestandin(rdst, fstandin, hash,
240 executable)
241 executable)
241 lfiletohash[f] = hash
242 lfiletohash[f] = hash
242 else:
243 else:
@@ -557,13 +557,13 b' def updatestandinsbymatch(repo, match):'
557 # removed/renamed)
557 # removed/renamed)
558 for lfile in lfiles:
558 for lfile in lfiles:
559 if lfile in modifiedfiles:
559 if lfile in modifiedfiles:
560 if repo.wvfs.exists(standin(lfile)):
560 fstandin = standin(lfile)
561 if repo.wvfs.exists(fstandin):
561 # this handles the case where a rebase is being
562 # this handles the case where a rebase is being
562 # performed and the working copy is not updated
563 # performed and the working copy is not updated
563 # yet.
564 # yet.
564 if repo.wvfs.exists(lfile):
565 if repo.wvfs.exists(lfile):
565 updatestandin(repo,
566 updatestandin(repo, fstandin)
566 standin(lfile))
567
567
568 return match
568 return match
569
569
@@ -739,8 +739,9 b' def overriderevert(orig, ui, repo, ctx, '
739 for lfile in s.modified:
739 for lfile in s.modified:
740 lfutil.updatestandin(repo, lfutil.standin(lfile))
740 lfutil.updatestandin(repo, lfutil.standin(lfile))
741 for lfile in s.deleted:
741 for lfile in s.deleted:
742 if (repo.wvfs.exists(lfutil.standin(lfile))):
742 fstandin = lfutil.standin(lfile)
743 repo.wvfs.unlink(lfutil.standin(lfile))
743 if (repo.wvfs.exists(fstandin)):
744 repo.wvfs.unlink(fstandin)
744
745
745 oldstandins = lfutil.getstandinsstate(repo)
746 oldstandins = lfutil.getstandinsstate(repo)
746
747
@@ -1080,8 +1081,8 b' def cmdutilforget(orig, ui, repo, match,'
1080 forget = [f for f in forget if lfutil.standin(f) in repo[None].manifest()]
1081 forget = [f for f in forget if lfutil.standin(f) in repo[None].manifest()]
1081
1082
1082 for f in forget:
1083 for f in forget:
1083 if lfutil.standin(f) not in repo.dirstate and not \
1084 fstandin = lfutil.standin(f)
1084 repo.wvfs.isdir(lfutil.standin(f)):
1085 if fstandin not in repo.dirstate and not repo.wvfs.isdir(fstandin):
1085 ui.warn(_('not removing %s: file is already untracked\n')
1086 ui.warn(_('not removing %s: file is already untracked\n')
1086 % m.rel(f))
1087 % m.rel(f))
1087 bad.append(f)
1088 bad.append(f)
General Comments 0
You need to be logged in to leave comments. Login now