monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Re: Feature request: mtn rebase


From: Daniel Carrera
Subject: Re: [Monotone-devel] Re: Feature request: mtn rebase
Date: Sat, 11 Oct 2008 17:10:03 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Bruce Stephens wrote:
I agree that consistency with git shouldn't be a goal.  Gratuitous
inconsistency doesn't seem like a good goal, though, especially with
what I'd guess is a well-recognised (if not well-understood) git
command.

I agree.

Why not "uncommit" (by analogy with "unrecord" from darcs)?  Or
perhaps an option to "update" (more of an analogy with git's "reset" I
suppose)?

Between these two, I think uncommit is better. An option to update is more error prone than typing a different command. And update is a destructive command (it destroys uncommitted changes). We don't want to mix together a destructive and a safe command.

If you choose "uncommit", a couple of changes are needed:

1) The parameter to "uncommit" should be the revision you uncommit, rather than the revision you want to be at. In other words:

mtn rebase p:  =>  mtn uncommit h:


2) The user will expect "uncommit" to do more than just rebase. The user will expect the revision to be removed from the database, or something equivalent to that. So I propose that "uncommit h:" be equivalent to:

mtn rebase p:
mtn suspend h:


Notice that I say "suspend" rather than "kill_rev_locally". I think it's reasonable to default to not deleting revisions from the history. Even if that may surprise some users. In addition, kill_rev_locally was made intentionally long to draw attention to its danger, so it seems inappropriate to have a simple shortcut that people type often.

All in all, I think I would be very happy with an "uncommit" like the one above.

Cheers,
Daniel.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]