[PATCH 1 of 2 V2] verify: document corner cases

Jun Wu quark at fb.com
Sun Apr 2 20:15:48 EDT 2017


Excerpts from Yuya Nishihara's message of 2017-04-02 16:21:24 +0900:
> On Thu, 30 Mar 2017 14:51:14 -0700, Jun Wu wrote:
> > # HG changeset patch
> > # User Jun Wu <quark at fb.com>
> > # Date 1490823901 25200
> > #      Wed Mar 29 14:45:01 2017 -0700
> > # Node ID 17b41390f4912a4c18538d778837bc2cf4a1be92
> > # Parent  dea2a17cbfd00bf08ee87b3e44b1c71499189f89
> > # Available At https://bitbucket.org/quark-zju/hg-draft 
> > #              hg pull https://bitbucket.org/quark-zju/hg-draft  -r 17b41390f491
> > verify: document corner cases
> > 
> > It seems a good idea to list all kinds of "surprises" and expected behavior
> > to make the upcoming changes easier to understand.
> > 
> > Note: the comment added does not reflect the actual behavior of the current
> > code.
> > 
> > diff --git a/mercurial/verify.py b/mercurial/verify.py
> > --- a/mercurial/verify.py
> > +++ b/mercurial/verify.py
> > @@ -380,5 +380,51 @@ class verifier(object):
> >                          del filenodes[f][n]
> >  
> > -                # verify contents
> > +                # Verify contents. 4 cases to care about:
> > +                #
> > +                #   common: the most common case
> > +                #   rename: with a rename
> > +                #   meta: file content starts with b'\1\n', the metadata
> > +                #         header defined in filelog.py, but without a rename
> > +                #   ext: largefiles. content stored elsewhere
> 
> Maybe s/largefiles/lfs/ ? Could be fixed in flight if that's correct.

Yes. But "lfs" is outside core. Maybe just say "content stored externally".


More information about the Mercurial-devel mailing list