File History vs. Path History
Matt Mackall
mpm at selenic.com
Sun Jan 20 21:13:32 UTC 2013
On Sun, 2013-01-20 at 08:41 +0000, Paul Mensonides wrote:
> On Sat, 19 Jan 2013 14:41:59 -0600, Matt Mackall wrote:
>
> > On Sat, 2013-01-19 at 08:17 +0000, Paul Mensonides wrote:
>
> > Now replace "president" with "Makefile". From the perspective of your
> > build system, it does not matter at all how a particular file got to be
> > the Makefile, it's _still in charge_. Because files on your filesystem
> > are addressed by name, not by content or history, in a very real way,
> > filenames matter more than file history.
> >
> > Opinions differ as to whether this is the right point of view for an SCM
> > to take; it's a deeply moot and uninteresting question for Mercurial at
> > this point.
>
> I understand.
>
> >> Explicitly, what I actually need (wian) is all changesets which are
> >> descendants of a particular changeset which affect a particular file
> >> (with a --follow variation). E.g.
> >
> >> hg wian -r 0 A
> >> => changesets 0 and 1
> >
> > Unfortunately, we don't have a convenient way to do this for two
> > reasons:
>
> Okay, so (thinking out loud) I can get all of the heads in the repository,
> build a graph of the changesets via parents, run hg stat --changes each
> changeset, build an entity index with the "history" that I want, and
> serialize the entire thing. Later, updating requires only checking last
> used heads against current heads and only processing the changesets back
> to those already processed. Doesn't sound terribly fun, but it's doable.
If you're going to throw some 'real' code at the problem, you might
consider parsing and inverting 'hg debugindex path/to/file'.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list