Default behavior of uncommit

Sean Farley sean.michael.farley at gmail.com
Wed Jul 23 22:38:22 UTC 2014


Nathan Goldbaum writes:

> Hi all,
>
> I just ran into a confusing behavior in uncommit.
>
> Right now when one doesn't specify an argument to uncommit, this happens:
>
> $ hg uncommit
> abort: nothing to uncommit
>
> I would have expected it to uncommit the previous changeset, i.e. the
> inverse of "hg commit".
>
> After perusing "hg help uncommit" I see that I actually wanted:
>
> $ hg uncommit --all
>
> I'm curious, would it be possible to make uncommit use --all by default?

Yeah, I've thought about this as well. It would make sense to have --all
the default since that would make it mirror 'hg commit':

'hg commit' -> commits everything in the working directory
'hg commit file1' -> commits just file1

'hg uncommit' -> uncommits everything into the working directory
'hg uncommit file1' -> uncommits just file1



More information about the Evolve-testers mailing list