# HG changeset patch # User FUJIWARA Katsunori # Date 1425307075 -32400 # Node ID 90f08728e0f7cc92d4bae67965d18d8ae5cc312c # Parent bb11081562d776f255e738ecb38a845a5e074226 largefiles: avoid infinite recursive call of openlfdirstate in overriderevert When there isn't lfdirstate file in cases below, "openlfdirstate()" call "scmutil.match()" indirectly to build lfdirstate up. - subrepos disabling largefiles locally - lfdirstate file is missed accidentally This causes infinite recursive call of "openlfdirstate()" in "overriderevert()" (introduced by 79c2c29c71ae), because "openlfdirstate()" is invoked from the function overriding "scmutil.match()" itself. To avoid infinite recursive call of "openlfdirstate()" in "overriderevert()" in such cases, this patch passes "create=False" argument to "openlfdirstate()". "create=False" forcibly makes "openlfdirstate()" avoid code path to build lfdirstate up. diff -r bb11081562d7 -r 90f08728e0f7 hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py Mon Mar 02 01:20:14 2015 -0600 +++ b/hgext/largefiles/overrides.py Mon Mar 02 23:37:55 2015 +0900 @@ -721,7 +721,7 @@ # currently doesn't work correctly in that case, this match is # called, so the lfdirstate above may not be the correct one for # this invocation of match. - lfdirstate = lfutil.openlfdirstate(ctx._repo.ui, ctx._repo) + lfdirstate = lfutil.openlfdirstate(ctx._repo.ui, ctx._repo, False) def tostandin(f): if lfutil.standin(f) in ctx: