monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: Undo a commit


From: Ludovic Brenta
Subject: Re: [Monotone-devel] Re: Undo a commit
Date: Thu, 09 Oct 2008 21:24:35 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Daniel Carrera <address@hidden> writes:

> Daniel Carrera wrote:
>> So Monotone is expecting me to figure out which files it is not
>> tracking and remove those files before it'll update the working
>> directory? I can't have files or directories that monotone does not
>> keep track of? The "include/php" directory has an external php
>> library. No sense in having that in my monotone database.
>
> Indeed, that seems to have been the case. After making a backup of my
> certification directory I removed all the files that were not in
> Monotone. That includes the _darcs directory, hidden files, a library,
> test files, a TODO list, etc. Then I ran 'mtn update' and Monotone
> deleted everything. It deleted all the files and directories under the
> certification directory. It's ok because I had a backup, but it's not
> what I was hoping monotone would do.
>
> I'm not happy with what Monotone did. If I undo a commit, I don't want
> Monotone to delete or modify my files. If I wanted that I would have
> told it to revert. What I want is that Monotone remove that action
> from the database and then behave as if the commit had never
> happened. I don't want it to mess with my files unless I say 'revert'.

I have a workaround that I used many times already.

$ mtn checkout -b some_branch
$ edit at will
$ mtn checkin

# Oops, I made a mistake and I want to take that revison out

$ mtn log --last=1
Copy the parent revision
$ vi _MTN/revision
Replace the current revision with its parent
$ mtn db kill_rev_locally h:some_branch

And I'm happy.

-- 
Ludovic Brenta.




reply via email to

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