[PATCH 1 of 4] largefiles: use repo[None].walk instead of repo.walk

Augie Fackler raf at durin42.com
Sun May 21 01:32:42 EDT 2017


> On May 20, 2017, at 22:30, Martin von Zweigbergk <martinvonz at google.com> wrote:
> 
> On Fri, May 19, 2017 at 2:39 PM, Augie Fackler <raf at durin42.com> wrote:
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1495144838 14400
>> #      Thu May 18 18:00:38 2017 -0400
>> # Node ID ea89086c4346e5f38bb1ccb4ea5fa0239ab0c931
>> # Parent  531e6a57abd252bef59a5921e3761f1e5d80abba
>> largefiles: use repo[None].walk instead of repo.walk
>> 
>> diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
>> --- a/hgext/largefiles/overrides.py
>> +++ b/hgext/largefiles/overrides.py
>> @@ -119,7 +119,7 @@ def addlargefiles(ui, repo, isaddremove,
>>     m = matcher
>> 
>>     wctx = repo[None]
>> -    for f in repo.walk(matchmod.badmatch(m, lambda x, y: None)):
>> +    for f in repo[None].walk(matchmod.badmatch(m, lambda x, y: None)):
> 
> Nit: could reuse the existing wctx here and in the next patch. I'll
> fix that in a followup since

> I'm still not sure how our tooling keeps
> track of accepts across obsmarkers

It doesn't chase obsmarkers on purpose, but it does look for things that are the same patch content. https://www.mercurial-scm.org/repo/accept/file/tip/tests/test-diffhashes.t might help explain the logic.

> and/or if pushing still menas
> accepting everything pushed.

It still does. :)

> 
>>         exact = m.exact(f)
>>         lfile = lfutil.standin(f) in wctx
>>         nfile = f in wctx
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list