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

Thomas Arendsen Hein <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
* Ralf Schlatterbeck <[email protected]> [20190118 16:24]:
> As you may know we had a Google Summer of Code (GSoC) Project in 2015
> that added a REST-API to roundup. I'd like to integrate this code.
> The original announcement is at
> https://sourceforge.net/p/roundup/mailman/message/34436352/
> and there is also an issue in the tracker:
> https://issues.roundup-tracker.org/issue2550734
> 
> If our version-control system was git I'd add a new remote to my
> checkout of roundup, pull the repo above into a new local branch, rebase
> to the current master and start fixing python3 compatibility issues and
> adding documentation.
> 
> Can someone outline how to achieve this with mercurial?

I assume you only want the changes from the REST branch (with the
CRLF fixed), but not the changes from the bugs.python.org branch?

I just did this using the mq (Mercurial Queues) extension:

# pull bpo+rest changes into my existing clone of the roundup repo:
cd roundup.hg
hg pull https://bitbucket.org/kinggreedy1991/roundup-bpo

# mark pulled changes as yet unpublished to allow importing them into
# a stack of mq patches for further modification:
hg phase --force --draft -r 'outgoing()'
hg qimport -r 'branch("REST")'

# pop the stack of REST patches and remove (strip) the bpo changes:
hg qpop -a
hg strip -r 'outgoing()'

# fix CRLF and two references to run_cgi_outer, which is
# a bpo-only wrapper around run_cgi:
sed -i 's/\r$//' .hg/patches/*
sed -i 's/run_cgi_outer$/run_cgi/' .hg/patches/*

# the patch queue should still be on the REST branch:
hg branch REST

# apply all patches and mark them as finished, so they become
# regular Mercurial changesets again:
hg qpush -a
hg qfinish -a


All patches apply fine, but I haven't run the test suite or tried
running the code.

I have attached a Mercurial bundle "REST.hg" with all the changes,
you can simply use "hg pull REST.hg" to pull them into your
clone of the Mercurial repository.

Alternatively I can push them to SF, just tell me if I should do it.

If you would like to have them without the REST branch marker, I can
easily provide that, too.

Regards,
Thomas

-- 
Thomas Arendsen Hein <[email protected]> - OpenPGP key: 0x5BB3F5195816791A
https://blogs.intevation.de/thomas/         - https://intevation.de/~thomas/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998
Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

_______________________________________________
Roundup-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/roundup-devel
REST.hg (application/octet-stream, 27.2 KB) - not displayed
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRT0npFua0nkV7kTt5bs/UZWBZ5GgUCXEVy3AAKCRBbs/UZWBZ5
GmVtAJ912QeF4zYB0npMhMjneJpDru9T9ACfXVJ6rSF9sJsUMPv5rHv1NnUawOc=
=5Whs
-----END PGP SIGNATURE-----
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.