monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] I think this behavior might be wrong....


From: J Decker
Subject: Re: [Monotone-devel] I think this behavior might be wrong....
Date: Tue, 22 May 2007 22:47:23 -0700



On 5/22/07, Brian May <address@hidden > wrote:
>>>>> "J" == J Decker <J> writes:

    J> mtn --db=test.db db init
    J> mtn --db=test.db genkey temp

    J> mtn --db=test.db --key=temp --branch=branch1 setup .

    J> echo "Branch1" >file
    J> mtn --db=test.db --key=temp  add file
    J> mtn --db=test.db --key=temp  commit -m "Begin branch1"

    J> echo "+Branch2" >>file
    J> mtn --db=test.db --key=temp --branch=branch2 commit -m "Changed file, begin branch2"

Here the working directory contains the branch2 files.

    J> echo "branch1" >file2
    J> mtn --db=test.db --key=temp add file2
    J> mtn --db=test.db --key=temp --branch=branch1 commit -m "Add a file to branch1"


oh dang, i meant to specify file2 specifically on this commit.
turns out that that does not modify the end result, since, as someone metioned in an earlier response, this last commit is related with an ancestor of the last commit to branch2, not to the head of branch1.


The way I see it, this commit means everything in the working
directory will appear as a new revision in branch1. Since the working
directory is still branch2, this means everything in branch2 will be
included in this new revision.

The way I see it, if I specify '--branch=...' as part of a commit line, I would like the diff between the head of that branch and the files specified stored.  I would like this diff to be related with an ancestor of the head of the branch specified.  If the branch has mutliple heads, require a merge of those heads before allowing the commit to proceed.

If there is no branch previously existing, then yes, the branch should be created and related with the current revision marked in the current workspace, however, if the branch does exist, I would expect, again, the diff of the files sepcified (all fiels in the workspace of course if none otheriwse specified) to be commited against the head of the branch specified.

Including, if the current branch that the workspace is currently on, is the one that is sp[ecified, but the current revision of the workspace is not the head revision, then the changes should be commited against the head revision, not the current one.  If you want the changes to be commited against the current revision in the workspace, just commit.

If I had manually updated the revision file without doing any update, monotone would have gladly done the above behavior.....
 

Maybe I am daft and/or misunderstood something, but I fail to see why
this is confusing.
--
Brian May < address@hidden>


_______________________________________________
Monotone-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/monotone-devel


reply via email to

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