File History vs. Path History
Paul Mensonides
pmenso57 at comcast.net
Sun Jan 20 08:41:19 UTC 2013
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.
Regards,
Paul Mensonides
More information about the Mercurial
mailing list