hg-git: push -d default seems not to work.

Matt Harbison mharbison72 at gmail.com
Tue May 16 02:18:13 UTC 2017


On Sat, 13 May 2017 16:47:31 -0400, Uwe Brauer <oub at mat.ucm.es> wrote:

>
>     > On Fri, 12 May 2017 11:21:16 -0400, Uwe Brauer <oub at mat.ucm.es>  
> wrote:
>
>     > What I was getting at is, while it's possible, it doesn't make  
> sense
>     > to commit there. I can't think of any time I've ever updated to a
>     > hidden commit. (Or other command for that matter, other than to
>     > extdiff against a successor.)
>
> But what are you doing if your patch is rejected?
> I mean, you suggested.
>
> hg branch -q feature
> hack hack
> hg update default
> hg pull -u
> hg rebase -d . -b feature --collapse
>
> Then either push or send a patch.
>
> But if the patch is rejected? That is most of the time my scenario I
> mean in one repo I push (and it is usually accepted) but in another I
> export and send a patch and wait for feedback, if accepted fine. But if
> not then I would strip the last commit, and checkout the latest (hidden)
> commit of the feature branch,
> hack hack correct

Yes.

> And repeat the process above. But that seems not what you are doing.

Correct.  I'm extrapolating what I think you would want, given your usage  
of named branches per feature.

> Besides if I push, that later on I could not rebase because the pushed
> commit is public.

Also correct.  However, I assume that you are pushing to a repo that you  
control.  If so, see `hg help config.phases`, and consider making your  
repos non-publishing.  If your patch hasn't been accepted, and you aren't  
forking the project, you probably shouldn't push to a non publishing repo.

If you mean pushing to the git repo, your changes really aren't published  
until they are accepted upstream.  You can move the phases manually if you  
need to, but understand the implications.  I have no idea how to get rid  
of the rejected commits in your git repo.  Maybe you should set it up so  
that you pull from the official repo only, and push only to a different  
git repo that contains your patch submissions?  Setting paths.default-push  
would probably help you do that.

> So I would appreciate if you can tell me what you do if your patch is
> rejected or modified.

Probably what you want to do is exactly what you outlined above.  When you  
are ready again, strip the previously submitted commit on default.  Then  
rebase --collapse the whole feature branch, like you would have if this  
was your first time.

> Thanks
>
> Uwe
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial



More information about the Mercurial mailing list