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

Matt Harbison mharbison72 at gmail.com
Sat May 13 03:22:40 UTC 2017


On Fri, 12 May 2017 11:21:16 -0400, Uwe Brauer <oub at mat.ucm.es> wrote:

>
>     > On Thu, 11 May 2017 16:34:18 -0400, Uwe Brauer <oub at mat.ucm.es>  
> wrote:
>
>
>     > If you are just trying to continue the feature branch (unbroken)  
> after
>     > you have rebased and pushed, you *could* just `hg update --hidden  
> 2`
>     > and start committing again. That too would create an unstable  
> commit
>     > though. (There's nothing scary about unstable commits. It just  
> means
>     > if you `hg evolve`, it will automatically rebase the unstable  
> commit.
>     > In this case, if you committed to top of 2, `hg evolve` would  
> rebase
>     > it onto 4 (since 2 was succeeded by 4 in the original rebase). That
>     > may sound like exactly what you want. But it's not because if you
>     > pulled stuff from upstream, it's not rebased onto that upstream
>     > stuff.)
>
> You are right, of course. But you said I *could* use
>
> hg update --hidden 2

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.)

>
> what is the difference to
>
> hg touch -hidden 2

`hg update` is the way to checkout files from a given revision.  It only  
operates on the working directory, without changing the repository.  Other  
commands may do an update as a side effect, but that's typically only for  
convenience, when it is the right thing to do.

`hg touch` basically creates a new commit that is a visible version of the  
commit that was touched.  That means altering the repository.  You  
shouldn't need it for what you are doing.  The only time I've used it is  
when I accidentally pruned the wrong thing and don't notice until another  
transaction occurs (which means rollback won't undo it), and once when I  
got into some weird divergent state a few years ago.  It's on the evolve  
mailing list somewhere, but it's not something I'd worry about.

>
> What other command exist to checkout rev 2?

The evolve extension adds 'next' and 'previous' commands to update to a  
child or parent respectively, without specifying a revision.

But if you are wondering because 2 is now hidden, all of the normal  
commands still apply.  You just need to specify --hidden for the command  
to operate on a hidden revision.

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



More information about the Mercurial mailing list