monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] manual merging


From: Daniel Carosone
Subject: Re: [Monotone-devel] manual merging
Date: Sat, 7 Jan 2006 10:13:22 +1100
User-agent: Mutt/1.4.2.1i

On Fri, Jan 06, 2006 at 06:13:15PM +0200, Oguz Altun wrote:
> For some reason I deleted MT directory from my project directory. And I 
> made some changes to an excell file. To rebegin version controlling I 
> issueed
> "monotone -d db -b branch setup ."
> in the project directory. When I commit, monotone told there is a 
> divergence and  that I may wish to run monotone merge, which I did. It 
> opened kdiff3 automatically, but I could do nothing ofcourse...

what you've done with the deletion is lose track of the base revision
you started working from.  when you ran setup again, it created a
working dir with an empty base revision. You then committed a new root
revision to the same branch, which created divergence and had trouble
merging.

There are a number of ways forward from here.  The best, assuming you
haven't sync'd your new mis-parented revision around to many other
databases, is probably to get rid of it and recommit the changed excel
file with the correct ancestor.

You currently have (at least) two heads: the head you had before you
deleted MT/, and the one you just created.  MT/revision currently
contains the new initial revision; change that to contain the older
head, and recommit your new work as a child of that revision.  I'm
taking a guess that's what you were working from previously, and using
that guess to 'restore' the lost MT/revision contents.

At this point, you'll still have (at least) two heads.  You could try
merging these (since they're identical contents they should merge
cleanly), or you could use 'monotone db kill_rev_locally' on the
mistake one.

> So, I have a couple of questions related.
> 
> 1- Instead of opening a merging program, how could I just make the later 
> file overwrite the one in db?
> 2- How can I change the merge program?

Look at the docs for the lua hooks on merge2 and merge3.

> And a couple of questions not related
> 3- In the working directory, How can I revert back to an arbitrary revision?

update -r REV, pretty much like cvs

> 4- In this reverting back business, is there a danger of loosing any 
> changes? Does the db conserves every version like cvs? Or do I have to 
> create two dbs and revert only the local one?

If you commit the working copy contents, you can always get them back.
If you don't, there's a chance of damaging files somehow.  Just like
any other form of taking a backup copy.

> 5- Could there be any problem in synchronizing working directory with 
> unison?

I haven't used that, but it seems like they're two similar mechanisms
that could easily get in conflict -- or cause you confusion about
which is which.

--
Dan.

Attachment: pgpwCYsjk5HCg.pgp
Description: PGP signature


reply via email to

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