monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Re: branch name appears as directory


From: hendrik
Subject: Re: [Monotone-devel] Re: branch name appears as directory
Date: Thu, 12 Mar 2009 12:55:40 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On Thu, Mar 12, 2009 at 06:03:54PM +0100, Lapo Luchini wrote:
> address@hidden wrote:
> > 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
> 
> BTW: this is *not* a checkout of branch com.pooq.hendrik.write, this is
> a completely new (but still uncommitted) new head revision on branch
> com.pooq.hendrik.write.

Somehow I failed to get this information from the manual's description 
of mtn setup.

> 
> > address@hidden:~/write-try-checkout$ mtn checkout
> 
> This is a bit tricky: it creating a completely new checkout, getting the
> required --branch value from the current workspace and outputting it to
> the same name as the branch name (which is the default when you NOT
> specify a checkout directory).

I see.  The manual should specify this -- it requires a directory to be 
explicitly specified (which I failed to do, of course).  If I had known 
the directory name was optiona, and what the default was, I just might 
have figured out what was wrong.

Somehow, mtn setup and mtn checkout should be more clearly 
differentiated in the docs.

> 
> $ mtn help checkout
> [...]
> Syntax specific to 'mtn checkout':
> 
>   checkout [DIRECTORY]
> 
> Description for 'mtn checkout':
> 
>   Checks out a revision from the database into a directory.
> 
>   If a revision is given, that's the one that will be checked out.
> Otherwise, it will be the head of the branch (given or implicit).  If no
> directory is given, the branch name
>   will be used as directory.
> 
> What you should have done in the first place to get what you did want is
> this single line:
> $ mtn --db ~/monotone/write.db -k address@hidden --branch
> com.pooq.hendrik.write checkout write-try-checkout
> 
> Yes, the only error was to use setup (which creates a NEW BLANK
> workspace) instead of checkout (which extract an EXISTING revision in a
> newly created workspace directory).
> 
> I think that's it =)

Yes, it certainly is.  Will try again.  Will also try to think how the 
manual could be reworded.

-- hendrik




reply via email to

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