|Subject:||[Monotone-devel] Re: I think this behavior might be wrong....|
|Date:||Tue, 22 May 2007 01:35:44 -0700|
I was doing some work, and decided that I wanted to commit that work to a new branch, so as to not distrub other developers too badly... I still haven't completely tested the changes, but it turns out that the changes were included in the main branch anyhow because I then made some other changes to files and commited them against the main branch, without first updating to that branch. At the time I wondered if monotone would be really smart about the thing that I did, but as it turns out, the branch tag I applied to the revision basically made no difference...This is a script which reproduces effectively what I did. What I would have expected in the final checkout would have been 'file' with content 'Branch1' and 'file2' with content 'branch1'. Instead, I get 'file' with content 'branch1 + branch2' but I did not propagate the branches... so I would not have expected the changes to be merged...Maybe an artificial warning/error can be generated to alert the user that such a thing will not produce what they might expect?
mtn --db=test.db db init
mtn --db=test.db genkey temp
mtn --db=test.db --key=temp --branch=branch1 setup .
echo "Branch1" >file
mtn --db=test.db --key=temp add file
mtn --db=test.db --key=temp commit -m "Begin branch1"
echo "+Branch2" >>file
mtn --db=test.db --key=temp --branch=branch2 commit -m "Changed file, begin branch2"
echo "branch1" >file2
mtn --db=test.db --key=temp add file2
mtn --db=test.db --key=temp --branch=branch1 commit -m "Add a file to branch1"
mtn --db=../test.db --key=temp --branch=branch1 co .
Again, I was working on 'branch', made changes I didn't want to share with the public yet and commited changes on --branch='branch.test'. I then modified other code, and commited that code using --branch='branch' to commit it against the main branch instead of branch.test. But at the end, the changes added to branch.test were included in 'branch' automatically...
|[Prev in Thread]||Current Thread||[Next in Thread]|