Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/overrides.py @ 31664:0eec36112e58
largefiles: add lfile argument to updatestandin() for efficiency (API)
Before this patch, updatestandin() takes "standin" argument, and
applies splitstandin() on it to pick out a path to largefile (aka
"lfile" or so) from standin.
But in fact, all callers already knows "lfile". In addition to it,
many callers knows both "standin" and "lfile".
Therefore, making updatestandin() take only one of "standin" or
"lfile" is inefficient.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 27 Mar 2017 09:44:36 +0900 |
parents | 0192aa8626c1 |
children | 3e37b479ce2f |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Mon Mar 27 09:44:36 2017 +0900 +++ b/hgext/largefiles/overrides.py Mon Mar 27 09:44:36 2017 +0900 @@ -736,7 +736,7 @@ s = lfutil.lfdirstatestatus(lfdirstate, repo) lfdirstate.write() for lfile in s.modified: - lfutil.updatestandin(repo, lfutil.standin(lfile)) + lfutil.updatestandin(repo, lfile, lfutil.standin(lfile)) for lfile in s.deleted: fstandin = lfutil.standin(lfile) if (repo.wvfs.exists(fstandin)): @@ -1417,7 +1417,7 @@ # in this case, content of standin file is meaningless # (in dctx, lfile is unknown, or normal file) continue - lfutil.updatestandin(repo, fstandin) + lfutil.updatestandin(repo, lfile, fstandin) # mark all clean largefiles as dirty, just in case the update gets # interrupted before largefiles and lfdirstate are synchronized for lfile in oldclean: