monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Removing a revision from a branch


From: Chad Walstrom
Subject: Re: [Monotone-devel] Removing a revision from a branch
Date: Thu, 08 Jun 2006 11:33:30 -0500

"Shaun Jackman" <address@hidden>  wrote:
> I don't know how it happened, but apparently I accidentally added a
> revision to  a branch to which it does not belong. How do I remove
> the revision from the branch? Is there a command to remove a
> specified cert?

Yes.  As long as the change has not propagated to other databases via
synchronization, you can:

        $ mtn -d DATABASEPATH db kill_rev_locally REVISION

If it has already propagated to other databases, you can try to
coordinate with everyone to do the same.  Alternatively, if there is
only one parent to REVISION, use ``mtn disapprove REVISION''.  Here's
the text description from the monotone manual:

`monotone disapprove ID'
     This command records a disapproval of the changes between ID's
     ancestor and ID. It does this by committing the inverse changes
     as a new revision descending from ID. The new revision will show
     up as a new head and thus a subsequent `merge' will incorporate
     the inverse of the disapproved changes in the other head(s).

     Conceptually, `disapprove's contract is that disapprove(A) gives
     a revision B such that whenever B is merged with a descendent D
     of A the merge will result in what D "would have looked like" if
     A had never happened.

     Note that as a consequence of this contract the `disapprove'
     command only works if ID has exactly one ancestor, since it
     hasn't been worked out how to generate such a descendent in the
     multi-ancestor case.  

Essentially, it's quite hard to get rid of a revision once it has been
copied to other databases.  This is the next best thing.

-- 
Chad Walstrom <address@hidden>           http://www.wookimus.net/
           assert(expired(knowledge)); /* core dump */





reply via email to

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