[git repos] (was: elmentary (watson): merge (named) branches and/or bookmarks)
Arne Babenhauserheide
arne_bab at web.de
Sun Dec 18 16:27:32 UTC 2016
Uwe Brauer writes:
> - what causes trouble: I create a bookmark say bookfeature. I edit and commit
> several times till I am satisfied. Now as we just said I cannot
> merge, (I could of course do
> hg update bookfeature (to be sure)
> hg bookmark -f master (moving the master bookmark forward).
>
> But now I can neither push nor generate a patch, because that
> would actually generate a series of small patches, which the
> maintainers don't like. So I could have avoided that by using the
> amend option, (but then what is the point of a version system, if
> I collapse all the commits).
This sounds like a typical case for rebasing — or more elegantly using
the evolve extension.
Upstream requires a single commit (one patch). So you’d ideally have
just that.
With the evolve extension you’d simply issue
$ hg fold -r master -r feature
That gives you a new commit with the folded commits and hides the old
ones as obsolete (with the information that they were superseeded by the
new commit).
You could also simply send `hg diff -r master -r bookfeature`.
Your example, followed by fold, gives me this:
$ HGPLAIN=1 hg log -G
@ changeset: 5:e3409db8083b
| bookmark: master
| tag: tip
| parent: 1:e2228ace7d4f
| user: Arne Babenhauserheide <bab at draketo.de>
| date: Sun Dec 18 17:24:24 2016 +0100
| summary: main3
|
| x changeset: 4:96f4ca3c181a
| | bookmark: feature
| | user: Arne Babenhauserheide <bab at draketo.de>
| | date: Sun Dec 18 17:23:12 2016 +0100
| | summary: feature2
| |
| x changeset: 3:996b4d15bc54
| | user: Arne Babenhauserheide <bab at draketo.de>
| | date: Sun Dec 18 17:23:12 2016 +0100
| | summary: feature
| |
| x changeset: 2:56598b667245
|/ user: Arne Babenhauserheide <bab at draketo.de>
| date: Sun Dec 18 17:23:11 2016 +0100
| summary: main3
|
o changeset: 1:e2228ace7d4f
| user: Arne Babenhauserheide <bab at draketo.de>
| date: Sun Dec 18 17:23:11 2016 +0100
| summary: main2
|
o changeset: 0:23e8f06e57e9
user: Arne Babenhauserheide <bab at draketo.de>
date: Sun Dec 18 17:23:10 2016 +0100
summary: main1
x means obsolete.
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein
ohne es zu merken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20161218/f3cd8891/attachment.asc>
More information about the Mercurial
mailing list