Mercurial > hg-stable
changeset 31662:641f3a6098d0
largefiles: rename local variable appropriately
repo['.'] is called not as "working context" but as "parent context".
In this code path, hash value of current content of file should be
compared against hash value recorded in "parent context".
Therefore, "wctx" may cause misunderstanding in this case.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 27 Mar 2017 09:44:36 +0900 |
parents | 0192aa8626c1 |
children | f1cf6a745264 |
files | hgext/largefiles/lfutil.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py Mon Mar 27 09:44:35 2017 +0900 +++ b/hgext/largefiles/lfutil.py Mon Mar 27 09:44:36 2017 +0900 @@ -165,13 +165,13 @@ return lfdirstate def lfdirstatestatus(lfdirstate, repo): - wctx = repo['.'] + pctx = repo['.'] match = matchmod.always(repo.root, repo.getcwd()) unsure, s = lfdirstate.status(match, [], False, False, False) modified, clean = s.modified, s.clean for lfile in unsure: try: - fctx = wctx[standin(lfile)] + fctx = pctx[standin(lfile)] except LookupError: fctx = None if not fctx or fctx.data().strip() != hashfile(repo.wjoin(lfile)):