un-reachable revisions from filelog

FUJIWARA Katsunori fujiwara at ascade.co.jp
Fri Apr 30 01:17:52 CDT 2010


Hi, Matt.

At Wed, 28 Apr 2010 02:01:01 -0500,
Matt Mackall wrote:

> > In one of my hg repos, there are some un-reachable revisions when I
> > specify exact filename to "hg log".
> > 
> > But such revisions are visible from "hg log" if target file is not
> > specified, and:
> > 
> >     - "hg log -v" says that they modify target file
> >     - "hg diff" generates expected output for target file
> > 
> > so, recorded history seems to be not so(but a little) damaged.
> > 
> > I found that file contexts for target file of un-reachable revisions
> > point to same filerev. So, scan based on filelog(= "hg log" with
> > filename speicification) can not show such revisions.
> 
> Yup. There is no damage, just Mercurial being weird about walking
> filelogs.

This filelog-based behavir seems to be strange for ordinary usersa
without knowledge about Mercurial internal, does not it ?

But I know that making "-k"-like behavior as default for specified
filenames would cause serious performance decreasing.

So, how about making unification of filelog entries as configurable ?

    Filelog unificiation is disabled in default, so ordinary users can
    see all related revisions (except for removed ones) for specified
    file.

    In other hand, expert users can enable it by own configuration,
    and specify '-k' in appropriate situations for them.

This suppression would increase storage consumption a little, but I
think that revision visibility is more important for ordinary users.


I recognize that:

  - filelog may unify entries in some situations, and

  - filelog-based walking fails to look some of related revisions up,
    because unification hides them from filelog entries, so

  - all related revisions (except for removed ones) are visible from
    filelog, if unification is suppressed

  - unification affects only local repo, not inter-repo co-operation

Please correct me, if not so.

--------------------
[FUJIWARA Katsunori]      fujiwara at ascade.co.jp(foozy at lares.dti.ne.jp)


More information about the Mercurial-devel mailing list