Re: REST-API: Merging/Rebasing with Mercurial?

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Sat, Jan 19, 2019 at 01:11:07PM +0100, Mathias Behrle wrote:
> * Ralf Schlatterbeck: " Re: [Roundup-devel] REST-API: Merging/Rebasing with
>   Mercurial?" (Fri, 18 Jan 2019 21:00:12 +0100):
> 
> Re-adding the list, that was probably not intentionally dropped .

Thanks.

> > OK, that at least tells me how to add a second repo.
> > No way to rebase to head (without merging) in hg?
> > I'd like to not introduce lots of artefacts from merging in the
> > history.
> 
> I don't know what you mean by 'artifacts', but the commits of the
> REST branch will be introduced in the history by merging as well as
> by rebasing. Rebasing is basically a sort of internal merge, it only
> tries to re-order the changesets *as if* they were made on top of the
> existing branch.

Yes that would be my intention: to merge the branch as committed by the
original committer and removing any commits that result purely from the
changes since then.

> I think rebasing will not work well in this case if at all, at least
> conflict resolution will be harder. A lot has changed since the REST
> branch was forked and merging it will run into a number of conflicts
> that have to be resolved anyway.

I know what has changed. The REST patches only change two files and the
conflict resolution should not be too hard. With git the conflict
resolution is the same -- with a merge commit with conflicts or a
rebase.

> If you don't want to have the history of the REST branch
I want to keep the history. But see below.

On Sat, Jan 19, 2019 at 01:31:32PM +0000, Joseph Myers wrote:
> 
> Note that at some point the REST changes appear to have converted 
> roundup/cgi/client.py to CRLF line endings (at least, it has such line 
> endings on that branch, though I haven't identified the relevant commit 
> introducing them).  Certainly that line ending change should not be merged 
> into trunk, and I think it would also be unhelpful to have conversions to 
> and from such line endings present in the history of trunk.

That also cries for an interactive rebase with editing of all changes
that introduced newline problems but otherwise keeps the changes as
done by the original committer.

How do I do a rebase (preferrably an interactive rebase where I can
edit individual commits) with hg?

Note that I know my way with git but I'm not very familiar with hg.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   http://www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.