hg-git: push -d default seems not to work.
Uwe Brauer
oub at mat.ucm.es
Fri May 5 20:26:45 UTC 2017
> On Fri, May 5, 2017 at 5:10 AM, Uwe Brauer <oub at mat.ucm.es> wrote:
> style.
> You CANNOT push a changeset without its ancestors. It's impossible
> no matter which extension you are using. A commit's ID depends on
> the ID(s) of its parent(s) so any parent(s) must be included when
> you push. You have a few options:
> 1. Don't merge at all. You made a mistake by using a named branch
> instead of a bookmark, to use this option. Normally (especially
> when working with git repos) you'd just create a new head, or at
> most create a new bookmark, instead of a using a named branch for
> small changes like this. Named branches are *permanent*, and git
> doesn't have a similar concept unless it was recently introduced.
Well I like named branches because it makes the graph easy to
understand, and I can close and reopen a named branch if I wish. But of
course you are right, for git this is toxic stuff, at least at the
moment, or in any forseeable future the hg-git plugin would translate a
named branch into a bookmark (if memory saves me right this is possible
for mercurial repo with some extension, but I forgot the details.)
> 2. Use "graft" instead of a merge (if you want to keep your branch
> locally for some reason).
Yes I do.
> 3. Use "rebase".
But wouldn't rebase --keep do the same as graft for that purpose?
Although I presume graft and rebase have different functionality.
> As a last resort you can use mq, but really "rebase" is all you need in
> your scenario and mq is overkill.
Ok, thanks. I have used rebase in the past and did not like it too much,
So finally I think, I will stick to my idea of two repos, one for my
stuff: repo-hg and repo-bridge from which I would push. So I would
export the changeset I want from repo-hg to repo-bridge. That is a bit
cumbersome but maybe the best solutions given my preferences.
Thanks
More information about the Mercurial
mailing list