This is an archive of the discontinued Mercurial Phabricator instance.

uncommit: add options to update to the current user or current date
ClosedPublic

Authored by mharbison72 on Sep 7 2019, 11:31 PM.

Details

Summary

These are also from the evolve extension's version of uncommit.

I tried adding validation that both forms of user or date can't be specified at
the same time, but that fails because these show up in opts with a None value
whether or not the option was given on the command line. Presumably that means
the conditional in resolvecommitoptions could be simplified. But this is how
both evolve and MQ handle it.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Sep 7 2019, 11:31 PM
pulkit accepted this revision.Sep 9 2019, 11:23 AM
pulkit added a subscriber: pulkit.

I guess --interactive is the only flag left which is extra in evolve version, right?

This revision is now accepted and ready to land.Sep 9 2019, 11:23 AM

I guess --interactive is the only flag left which is extra in evolve version, right?

No:

-a --all                 uncommit all changes when no arguments given
-i --interactive         interactive mode to uncommit (EXPERIMENTAL)
-r --rev REV             revert commit content to REV instead
   --revert              discard working directory changes after uncommit
-n --note TEXT           store a note on uncommit

I'd like to port --interactive and lean towards --all too for consistency with revert and resolve, though I can see how it might be used as an alternative to rollback in its current form. I didn't take the time to understand what --rev is doing.

pulkit added a comment.Sep 9 2019, 1:05 PM

I guess --interactive is the only flag left which is extra in evolve version, right?

No:

-a --all                 uncommit all changes when no arguments given
-i --interactive         interactive mode to uncommit (EXPERIMENTAL)
-r --rev REV             revert commit content to REV instead
   --revert              discard working directory changes after uncommit
-n --note TEXT           store a note on uncommit

I'd like to port --interactive.

That will be great. https://phab.mercurial-scm.org/D6005 should help :)

I'd like to port --interactive.

That will be great. https://phab.mercurial-scm.org/D6005 should help :)

I haven’t looked at it at all, and just assumed the evolve code could be dropped into place. Any idea why that patch got so complicated?