monotone-devel
[Top][All Lists]
Advanced

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

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


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

Okay - Along this same topic.  This is very very very annoying. 
 
So I got all done, branch.test was up to date with branch.  and vice versa.
 
(current workspace is on branch.test)
 
mtn update -r h:branch
 
mtn.EXE: expanding selection 'h:[branch]'
mtn.EXE: expanded to '908a782fdccba6caea8ccf06416a982628b93ee9'
mtn.EXE: already up to date at 908a782fdccba6caea8ccf06416a982628b93ee9
 
the next commit
mtn.EXE: beginning commit on branch 'branch.test'
 
 
It would be really nice if the current branch tag in _MTN/options would update even if the revision is already up to date. 
 
 
On 5/22/07, J Decker <address@hidden> wrote:
 
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"

mkdir checkout
cd checkout
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...

 

 

 



reply via email to

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