You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Nikola Skoric <ns...@gmail.com> on 2009/10/24 17:21:28 UTC
commiting trunk checkout to a branch
First, the questions:
1) Can I commit changes on trunk checkout to a branch?
2) A branch has corrupt revision info (merge with trunk doesn't do nothing
but it should since I changed trunk). Can I fix that?
Now, details:
I develop my project on my desktop and on my laptop. I was commiting changes
on both computers to trunk (I didn't have any branches). At one point my
laptop was offline for extended period of time, I continued to develop on
both computers and voila: I have clasic trunk-branch situation. So I tried
to make my laptop version a branch. Since I my laptop code is checkout of
trunk, I can't just commit it to a branch since svn commit doesn't take urls
as parameters. Or, can I?
Anyway, svn info on laptop code said it is revision 22. So I created a
branch by copying that pegged revision of branch, checked it out, then
overwrote files of that checkout with my laptop files (no, I didn't
overwrite complete directories, I was careful not to harm my .svn
directories) and commited this to my branch. But, seems like this proces
didn't create a valid branch because "svn merge /url/to/trunk" does nothing.
I checked if the code is different, and yes, the code in trunk and branch is
different, but subversion doesn't realise that. Is there a way to make
subversion compare trunk code and branch code and produce list of changed
files disregarding mergeinfo property? I think that would solve my problem.
Thanks for help in advance :-)
--
"Strange women lying in ponds distributing swords is no basis for a system
of government."
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411066
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: commiting trunk checkout to a branch
Posted by Olivier Sannier <ob...@free.fr>.
Hello,
What you need to do is to merge the changes from trunk into your branch
then reintegrate the branch into the trunk.
To merge, to this:
svn merge /url/to/trunk WorkingCopyOnBranch
Review the changes
svn commit WorkingCopyOnBranch
Then, to reintegrate, do this
svn merge --reintegrate url/to/branch WorkingCopyOnTrunk
Review the changes
svn commit WorkingCopyOnTrunk
All this is described here:
http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonpatterns.html#svn.branchmerge.commonpatterns.feature
--
Olivier Sannier
olivier@obones.com
http://www.obones.com/
Retrouvez-moi sur Viadeo :
http://www.viadeo.com/invitationpersonnelle/0023asu3wwgwpzx
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411070
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: commiting trunk checkout to a branch
Posted by Henrik Sundberg <st...@gmail.com>.
On Sat, Oct 24, 2009 at 7:21 PM, Nikola Skoric <ns...@gmail.com> wrote:
> 1) Can I commit changes on trunk checkout to a branch?
Yes. You can switch to the branch before commit.
/$
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411068
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
RE: commiting trunk checkout to a branch
Posted by "Srilakshmanan, Lakshman" <la...@police.vic.gov.au>.
Hi Nikola,
Why do you believe this is a "classic trunk-branch" situation. You only
need trunk and branch if you need to keep changes "isolated". You have a
"classic concurrent development" situation.
All you need to do, if you still have your original working copy, is
perform an "svn update" in your working copy. This will "merge" all
changes in trunk into your branch and create conflicts for merge issues.
After resolving the conflicts, commit your change.
Thanks
Lakshman
________________________________
From: Nikola Skoric [mailto:nskoric@gmail.com]
Sent: Sunday, 25 October 2009 4:21 AM
To: users@subversion.tigris.org
Subject: commiting trunk checkout to a branch
First, the questions:
1) Can I commit changes on trunk checkout to a branch?
2) A branch has corrupt revision info (merge with trunk doesn't do
nothing but it should since I changed trunk). Can I fix that?
Now, details:
I develop my project on my desktop and on my laptop. I was commiting
changes on both computers to trunk (I didn't have any branches). At one
point my laptop was offline for extended period of time, I continued to
develop on both computers and voila: I have clasic trunk-branch
situation. So I tried to make my laptop version a branch. Since I my
laptop code is checkout of trunk, I can't just commit it to a branch
since svn commit doesn't take urls as parameters. Or, can I?
Anyway, svn info on laptop code said it is revision 22. So I created a
branch by copying that pegged revision of branch, checked it out, then
overwrote files of that checkout with my laptop files (no, I didn't
overwrite complete directories, I was careful not to harm my .svn
directories) and commited this to my branch. But, seems like this proces
didn't create a valid branch because "svn merge /url/to/trunk" does
nothing. I checked if the code is different, and yes, the code in trunk
and branch is different, but subversion doesn't realise that. Is there a
way to make subversion compare trunk code and branch code and produce
list of changed files disregarding mergeinfo property? I think that
would solve my problem.
Thanks for help in advance :-)
--
"Strange women lying in ponds distributing swords is no basis for a
system of government."
================================================================================================
EMAIL DISCLAIMER
This email and any attachments are confidential. They may also be subject to copyright.
If you are not an intended recipient of this email please immediately contact us by replying
to this email and then delete this email.
You must not read, use, copy, retain, forward or disclose this email or any attachment.
We do not accept any liability arising from or in connection with unauthorised use or disclosure
of the information contained in this email or any attachment.
We make reasonable efforts to protect against computer viruses but we do not accept liability
for any liability, loss or damage caused by any computer virus contained in this email.
================================================================================================
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2411255
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].