monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] newbie questions (best practices)


From: Brian Campbell
Subject: Re: [Monotone-devel] newbie questions (best practices)
Date: Sat, 28 May 2005 03:37:39 -0400

On May 27, 2005, at 3:54 PM, Nathan Cournia wrote:

Hi,

I've just started to use monotone and have some questions.

1. Should I maintain each project I'm working on in a seperate .db file?

You can do that, and a lot of people do. Or you can store it all in the same .db file. It probably doesn't make all that much of a difference unless some projects are confidential and others are not, and you want to be able to post a .db file online when you encounter a bug and want people to help you solve the problem.

2.  If I do keep each project in a seperate .db, how do I share my
work with my co-workers?  Do I run `monotone serve myhost:port
com.work.myproject` for each .db where, "port" is a unique number?  Is
there a way to have multiple .db's running on the same port?

The easiest thing to do is serve from a different database than the ones you work with normally. Just set up a server with one .db file, sync all of the projects you want to serve with that server, and you should be all set.

Didn't we get exactly the same two questions about a week ago? Yeah, almost exactly a week ago Derk Hillbrecht asked the same two questions. I guess that means that these sorts of questions should be part of a FAQ or best-practices document. Anyhow, check the mailing list archives for the responses to his question.

I just sync'd my database with a friend.  I then updated my working
copy.  When running `monotone update`, monotone popped up `meld` to do
a 3 way merge.  I accidently, closed `meld` before doing the merge.
As a result, it looks as if I've lost the changes I had made to my
working copy.

3. Is there a way to get back the changes I made to my working copy?

Not as far as I know, but I'm not an expert.

4. If I had committed my working copy before sync'ing, what would have
happened?  Would I have been presented with the 3 way merge during the
sync command?

Nope. You would have had two heads, and then whenever you tried to update or checkout without specifying a specific revision, you would be told that it can't determine a unique head. Then you could merge whenever you want, at your leisure, without ever having to worry about losing work.

Read the manual section on forking for more information: < http:// venge.net/monotone/docs/Dealing-with-a-Fork.html>

5. If I had committed my working copy before updating, but after
syncing, what would have happened?  Would have been presented with the
3 way merge during the commit command?

The same thing as before, except now only you would have the two heads, not the person you synced with.

6. Is there a general rule to follow when committing/updating/syncing,
i.e. always commit before doing a sync or update?

Don't update without committing first. It doesn't really matter when you sync, although it might be better if you sync, commit, and then update/merge if you need to, so you don't cause other people to see the un-merged tree and don't have two people doing the merge independently.



reply via email to

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