How can I rebase without destroying changeset metadata?
Mads Kiilerich
mads at kiilerich.com
Mon Jan 14 10:47:28 UTC 2013
On 01/14/2013 11:00 AM, dukeofgaming wrote:
> From: dukeofgaming <dukeofgaming at gmail.com>
> To: mercurial at selenic.com <mercurial at selenic.com>,
> mercurial-devel at selenic.com Devel <mercurial-devel at selenic.com>
Please don't cross-post. That will give noise and a fragmented
discussion where somebody else than you will waste their time. That is
not fair.
> Hi,
>
> I am importing some Perforce stuff through Perfarce. Everything well
> until I met with the delightful end of line problem since Perforce
> stores everything as LF.
>
> So I solved that with the EOL extension. Now I wanted to move the
> changeset where I version the .hgeol file to the very beginning of the
> imported repo, no problem:
>
> $ hg update -C null
> $ hg add .hgeol
> $ hg commit -m "Adding .hgeol file"
> $ hg id -n
> 123
> $ hg rebase --source 0 --dest 123
>
> So that leaves my newest commit as the root commit, effectively
> rewriting history to include that .hgeol file with all changes...
> problem is now, that I cannot pull from Perforce anymore, why?: there
> used to be a "Perforce" field in my imported changesets and is now gone.
>
> Now, I get why the changesets must be rewriten: to recalculate the
> hash (surely among other things). But what I don't get is why does the
> Perfarce metadata die with rebase?
Probably because it references changesets using the hashes and not the
metadata. I guess it maintains a mapping between Perforce revisions and
Mercurial changesets - you will have to update that.
Perfarce has a small user base and the hit rate on the Mercurial lists
might be low. I suggest you contact the Perfarce project or its author
and ask how you can help getting the issue resolved.
/Mads
More information about the Mercurial
mailing list