[PATCH] histedit: remove history_source

Jordi Gutiérrez Hermoso jordigh at octave.org
Thu Aug 21 09:08:40 CDT 2014


On Thu, 2014-08-21 at 14:09 +0300, Boris Penev wrote:
> On 08/21/2014 01:45 AM, Pierre-Yves David wrote:
> > On 08/20/2014 03:28 PM, Boris Penev wrote:
> >> Does it mean that the proposed behavior will be added to histedit
> >> (either as primary/default or secondary)? I expected a more
> >> concrete yes or no for the time passed.
> >
> > Can you be more precise about what you mean by "the proposed
> > behavior" ?
> 
> I mean to not keep irrelevant metadata in the commit messages.

It's not irrelevant, and they're not in the commit messages (at least,
not in hg). They are useful for when you want to restore history.
Augie didn't decide to add these fields to the histedited commit just
to annoy you. They're sort like a precambrian obsolescence marker like
what you see with hg evolve.

I think the real problem is that when you push with hg-git to a git
repo, hg-git will translate extra: fields into lines of the git commit
message. I don't like this either, and *in this context* it is
irrelevant (git users typically don't care about hg's hashes).

In that case, I think your code-killing wrath should be better
directed to these lines,:

    https://bitbucket.org/durin42/hg-git/src/83e1c73136251271d8acbf92e05100ea175f904b/hggit/git_handler.py?at=default#cl-599

Also, those lines have a purpose too: to preserve all of the data in
the round-trip of the git<->hg conversion. I think the best thing to
do is to add an option to hg-git to not send that data to git for when
you don't care about that round trip, or to make hg-git add that data
in a location where the git UI won't show it to most git users. Kiln
Harmony does this by storing it in *git*'s extra field:

    http://blog.fogcreek.com/kiln-harmony-internals-the-basics/

- Jordi G. H.




More information about the Mercurial-devel mailing list