|
From: | Daniel Carrera |
Subject: | Re: [Monotone-devel] Re: Undo a commit |
Date: | Fri, 10 Oct 2008 02:46:14 +0200 |
User-agent: | Thunderbird 2.0.0.17 (Macintosh/20080914) |
Daniel Carrera wrote:
So I am clear, the entire command is "mtn db_kill_rev_locally" and that's it? If we convinced the devs to make "mtn uncommit" an alias to "mtn db_kill_rev_locally" would that cover my use case?
I just tried this on a sandbox branch and it doesn't work that well. In particular, it fails if there are any uncommitted changes:
% mtn status Current branch: foo.sandbox.branch Changes against parent dcfbf59823cf21e292b60ba8f8463f65ea383597 added foo % mtn db kill_rev_locally dcfbf59823cf21e292b60ba8f8463f65ea383597 mtn: misuse:Cannot kill revision dcfbf59823cf21e292b60ba8f8463f65ea383597, because it would leave the current workspace in an invalid state, from which monotone cannot recover automatically since the workspace contains uncommitted changes. Consider updating your workspace to another revision first, before you try to kill this revision again.
This is not good. Suppose I have edited files Foo1, Foo2 and Bar. I run "mtn commit Foo1" because I forgot about Foo2. So I decide I want to undo that last commit so I can run "mtn commit Foo1 Foo2" which is what I wanted initially. Monotone won't let me do it because file Bar has changes.
:-( Daniel.
[Prev in Thread] | Current Thread | [Next in Thread] |