monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] YANQ (yet another newbie question)


From: Ken MacDonald
Subject: Re: [Monotone-devel] YANQ (yet another newbie question)
Date: Wed, 18 Apr 2007 08:53:02 -0400

Thanks Markus & Jack,
Jack's suggestion seems to have fixed the problem; apparently "mtn
drop" doesn't accept a qualified pathname - my current working
directory was c:\kippers_km\almost-right-branch and so I had tried
"mtn drop ..\wrong_branch\myfile". After Jack's suggestion, I did it
as "mtn drop myfile", which of course wiped out the copy of 'myfile' I
had in "almost-right-branch", but when I re-created it, "mtn add"ed
it, and committed it the divergence messages never reappeared.

Sorry for my confusion about all this, but I spent quite some time
working with another VCS that utilized its own filesystem and it's
taking a bit of time for monotone to replace that in my head :-)

Now a comment and question  or two on Markus's reply:

On 4/18/07, Markus Schiltknecht <address@hidden> wrote:
Ken MacDonald wrote:
> I created a branch in a subdirectory,

That very first line already makes me suspicious: why do you create the
branch in a subdirectory? Maybe I'm misunderstanding, but: monotone is
not like subversion, a branch is a branch - not internally the same as a
subdirectory.

The tutorial shows the user creating a workspace for a branch (and a
subdirectory to contain it) in Section 2.5, with the "mtn setup"
command; I didn't see anything to suggest that branches/workspaces
needed to be created in top-level directories - someone clarify if
this is wrong!

Briefly, when we roll out our use of mtn, I expect the following
conditions: we have several developers, but eventually will all be
using the same server to store our mtn 'stuff'. We have a lot of
projects, and so I think we'll store our individual copies of projects
in upper level directories named <project>_<initials> holding the
actual "project.mtn" database. Then creating a workspace/subdir under
that for each branch that comes along. So, for my test "kippers"
project, I propose the following directory/workspace structure:

c:\kippers_km\  ... top level for this project, contains the DB file kippers.mtn
c:\kippers_km\main\ ... "main" branch/workspace in this subdir
c:\kippers_km\cart\  ... "cart" advanced development branch for
eventually selling kippers
c:\kippers_km\minor_bugs\ ... branch for fixing easy/quick bugs
..... etc.

Please feel free to comment on whether this seems feasible; I'm really
just starting out on this and now's the time to fix it!

> using what I found out later was
> the "wrong" name according to our naming conventions. In that
> subdirectory, I created a file and committed it to the DB. I realized
> my mistake, went back up,

By 'went back up' you mean, you did 'mtn update -r $ANCESTOR'?

Actually, by "back up" I meant "cd .." back up to my top level project
directory (c:\kippers_km\ - see above). From there I deleted the
"wrong-branch-name" subdirectory/workspace and its contents using
Windows commands "del" and "rmdir"; this is where I should have used
"mtn drop" instead, or could I have just renamed the directory - would
mtn have figured that out?

...hm.. you shouldn't have created divergence, if you didn't do the
above 'mtn update -r $ANCESTOR' step. Or else, you forgot to 'mtn
update' after a 'mtn sync' or something.

This is the first I've created this particular project, so there's
nothing to sync with yet, and only the one file with only two
revisions to it, so I'm not doing updates or anything very advanced at
this point.

'mtn db kill_rev_locally' might help you. Make sure you kill the right
revision, and make sure your workspace has another parent revision, than
the one you are going to delete.

This looks promising for situations that are a bit more complex than
the one I had; I keep it in mind for then.

Thanks again for the help and any additional suggestions,
Ken




reply via email to

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