monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Questions about Monotone


From: Daniel Carrera
Subject: Re: [Monotone-devel] Questions about Monotone
Date: Wed, 08 Oct 2008 22:17:16 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

Derek Scherger wrote:
    # Make two directories: main branch and testing.
    mtn --db=foo.mtn --branch=com.foo.main setup main
    mtn --db=foo.mtn --branch=com.foo.test setup test


This will create two independent branches with no shared history which cannot be merged.

Ooops. I'm glad I asked.


Instead, just make the main branch and once you've committed a few things to it, and need to make an actual branch for feature development, check out the main branch to a new directory and specify the --branch option to the first commit for the feature.

i.e.
$ cd main
$ mtn co ../test
$ cd ../test
... make some changes ...
$ mtn commit --branch com.foo.test -m 'start work on feature X'

This will set the branch for the test directory to com.foo.test on the first commit there, after which you won't need to specify --branch again.

Thanks. And now I know a new command ("mtn co"). I'm slowly getting a feel for Monotone. It actually looks very easy to use. It's just a bit different from what I'm used to.


Creating a branch like this is a bit awkward and it's relatively easy to forget the --branch option on the first commit. Another way to deal with this is to edit _MTN/options in the new (test) directory and set the branch name there immediately after you check it out.

Thanks.

Cheers,
Daniel.






reply via email to

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