[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] branch name appears as directory
From: |
Thomas Keller |
Subject: |
Re: [Monotone-devel] branch name appears as directory |
Date: |
Thu, 12 Mar 2009 18:02:04 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (X11/20081227) |
Hi Hendrik!
address@hidden schrieb:
> [snip]
>
> address@hidden:~$ mtn --db ~/monotone/write.db -k address@hidden setup
> write-try-checkout
> mtn: misuse: need --branch argument for setup
>
> Yup, I did it wrong at first. Again:
>
> address@hidden:~$ mtn --db ~/monotone/write.db -k address@hidden --branch
> com.pooq.hendrik.write setup write-try-checkout
>
> No complaints this time. Let's take a look:
>
> address@hidden:~$ ls write-try-checkout/
> _MTN
>
> Yes, a directory with a _MTN subdirectory. Let's go in and check out
> what I shecked in yestardat:
>
> address@hidden:~$ cd write-try-checkout/
> address@hidden:~/write-try-checkout$ mtn checkout
>
> No complaints. Take a look:
>
> address@hidden:~/write-try-checkout$ ls
> com.pooq.hendrik.write _MTN
>
> What's this new branch-named direactory doing here?
I doubt we've ever checked if `mtn checkout' does anything useful when
triggered inside a freshly created new workspace, but what you've
experienced is actually by design:
mtn setup sets up a new workspace, right, but actually the use case we
think about here is that this workspace is attached to a new, not yet
existing branch.
mtn checkout on the other hand only operates and setups a workspace of
an existing branch. It completly ignores (in newer versions) the
existance of an _MTN directory and presumely needs a path parameter to
know where the checked-out files should go. So, you ask what happens if
you `mtn setup -b foo.branch foo_dir && cd foo_dir && mtn co -b
bar.branch .`? This should actually write out the checkout _MTN in
foo_dir, but will possibly complain about the fact that it already exists.
So, what are the alternatives? One could be to just use `mtn checkout`
and later change the branch name via mtn commit -b foo.branch (this puts
the old bar.branch development line under the foo.branch development
line), or you could edit _MTN/options of the checked out branch to
reflect that branch change. In any case, there is no use case here for
mtn setup...
Thomas.
--
GPG-Key 0x160D1092 | address@hidden | http://thomaskeller.biz
Please note that according to the EU law on data retention, information
on every electronic information exchange might be retained for a period
of six months or longer: http://www.vorratsdatenspeicherung.de/?lang=en
signature.asc
Description: OpenPGP digital signature