You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "J. Bakshi" <jo...@infoservices.in> on 2010/03/02 11:16:59 UTC

strange problem with subversion merge

Dear list,

Greetings to all of you. Hope you all are well.

I have come back again to discuss on svn merge which is not working at
all here. The version running at server is

````````````
svn, version 1.5.1 (r32289)
compiled Aug 6 2009, 16:55:38
`````````````````

The client pc has

````````````````````````
svn, version 1.6.6 (r40053)
compiled Nov 1 2009, 12:15:31
```````````````````

I have done a checkout of a repo at client and then start making trunk
and branches

[1] svn co https://192.168.1.1/repos/testrepo ./

[2] cd testrepo

svn mkdir trunk branches
svn mv folder1 folder2 folder3 trunk/
svn commit -m "creating trunk and placing files/folder in it"

till now everything is ok

[3] Now making a branch

svn copy trunk branches/mybranch
svn up

all is OK.

[4] and now merging. I have already changed
branches/mybranch/folder1/file1 and commit successfully. "svn diff -r
475:476" reports the changes I made. BUT

````````````````
svn merge -r 475:476 trunk/
`````````````````

just returns null value. It should merge the changes I made at
branches/mybranch/folder1/file1 to trunk/folder1/file1. Have I missed
something ? Please suggest.

thanks


-- 
জয়দীপ বক্সী

RE: strange problem with subversion merge

Posted by Giulio Troccoli <Gi...@uk.linedata.com>.
> Thanks a lot. I have gone through the link you have provided
> and now the merge is working well :-) That link gives very
> good clarification. Do you have any experience to work with
> esvn or aptana ? I don't  know how merging works with these
> GUI based tool and looking for the info.
> Anyways, thanks a lot once more.

I'm glad you resolved your issue. Unfortunately, I have no experience with esvn or aptana. I don't even use TortoiseSVN (apart from basci operations like checkout and commit), so no GUI experience for me.


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447




Re: strange problem with subversion merge

Posted by "J. Bakshi" <jo...@infoservices.in>.
On 03/03/2010 11:04 AM, J. Bakshi wrote:
> On 03/02/2010 07:48 PM, Giulio Troccoli wrote:
>   
>>   
>>     
>>>>>>> ````````````````
>>>>>>> svn merge -r 475:476 trunk/
>>>>>>> `````````````````
>>>>>>>             
>>>>>>>               
>>   
>>     
>>> ````````````````
>>> svn merge --dry-run -r 490:491 trunk/typo3conf/ branches/bug/
>>> Skipped missing target: 'branches/bug/localconf.php'
>>> ```````````
>>>     
>>>       
>> But these commands are not the same.
>>
>> >From your previous email I understand the bug branch was created as a copy of trunk. What you're trying here is to merge the changes in trunk/typo3conf to a copy of trunk, instead of a copy of trunk/typo3conf.
>>   
>>     
> You are absolute correct. the bug branch is a copy of trunk and it has
> been created to do the bug fixing. Once done then it should be allowed
> to merge into trunk. Please suggest how can I achieve this. Meanwhile I
> am going to five a read to the link you have mentioned here.
>
> Thanks
>   

Dear Giulio Troccoli,

Thanks a lot. I have gone through the link you have provided and now the
merge is working well :-) That link gives very good clarification. Do
you have any experience to work with esvn or aptana ? I don't  know how
merging works with these GUI based tool and looking for the info.
Anyways, thanks a lot once more.

Wish you a great day.

-- 
জয়দীপ বক্সী

Re: strange problem with subversion merge

Posted by "J. Bakshi" <jo...@infoservices.in>.
On 03/02/2010 07:48 PM, Giulio Troccoli wrote:
>   
>>>>>> ````````````````
>>>>>> svn merge -r 475:476 trunk/
>>>>>> `````````````````
>>>>>>             
>   
>> ````````````````
>> svn merge --dry-run -r 490:491 trunk/typo3conf/ branches/bug/
>> Skipped missing target: 'branches/bug/localconf.php'
>> ```````````
>>     
> But these commands are not the same.
>
> >From your previous email I understand the bug branch was created as a copy of trunk. What you're trying here is to merge the changes in trunk/typo3conf to a copy of trunk, instead of a copy of trunk/typo3conf.
>   

You are absolute correct. the bug branch is a copy of trunk and it has
been created to do the bug fixing. Once done then it should be allowed
to merge into trunk. Please suggest how can I achieve this. Meanwhile I
am going to five a read to the link you have mentioned here.

Thanks


> You seem to be very confused about merging. Maybe you should (re)read the documenation. http://svnbook.red-bean.com/en/1.5/svn.branchmerge.html
>
>
> Linedata Services (UK) Ltd
> Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
> Registered in England and Wales No 3027851    VAT Reg No 778499447
>
>
>
>
>
>   


-- 
জয়দীপ বক্সী

RE: strange problem with subversion merge

Posted by Giulio Troccoli <Gi...@uk.linedata.com>.
> >>>> ````````````````
> >>>> svn merge -r 475:476 trunk/
> >>>> `````````````````

> ````````````````
> svn merge --dry-run -r 490:491 trunk/typo3conf/ branches/bug/
> Skipped missing target: 'branches/bug/localconf.php'
> ```````````

But these commands are not the same.

>From your previous email I understand the bug branch was created as a copy of trunk. What you're trying here is to merge the changes in trunk/typo3conf to a copy of trunk, instead of a copy of trunk/typo3conf.

You seem to be very confused about merging. Maybe you should (re)read the documenation. http://svnbook.red-bean.com/en/1.5/svn.branchmerge.html


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447





RE: strange problem with subversion merge

Posted by Giulio Troccoli <Gi...@uk.linedata.com>.
> >>>> ````````````````
> >>>> svn merge -r 475:476 trunk/
> >>>> `````````````````

> ````````````````
> svn merge --dry-run -r 490:491 trunk/typo3conf/ branches/bug/
> Skipped missing target: 'branches/bug/localconf.php'
> ```````````

But these commands are not the same.

Re: strange problem with subversion merge

Posted by "J. Bakshi" <jo...@infoservices.in>.
On 03/02/2010 05:45 PM, Giulio Troccoli wrote:
>
>   
>>     
>
> Linedata Services (UK) Ltd
> Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
> Registered in England and Wales No 3027851    VAT Reg No 778499447
>
> -----Original Message-----
>
>
>   
>> From: J. Bakshi [mailto:joydeep@infoservices.in]
>> Sent: 02 March 2010 11:56
>> To: Giulio Troccoli
>> Cc: users@subversion.apache.org
>> Subject: Re: strange problem with subversion merge
>>
>> On 03/02/2010 05:02 PM, Giulio Troccoli wrote:
>>
>> <snip>
>>     
>>>> ````````````````
>>>> svn merge -r 475:476 trunk/
>>>> `````````````````
>>>> just returns null value. It should merge the changes I made at
>>>> branches/mybranch/folder1/file1 to trunk/folder1/file1.
>>>>         
>> Have I missed
>>     
>>>> something ? Please suggest.
>>>>
>>>>
>>>>         
>> </snip>
>>     
>>> I understand you want to merge the changes you have done in
>>>       
>> the branch to the trunk. If that's the case then from the
>> branch you use the --reintegrate option.
>>     
>>> The merge command you issued merges the changes between 475
>>>       
>> and 476 done to trunk into the directory you are in. Since
>> the changes happened on the branch it's correct that it
>> doesn't merge anything.
>>     
>>>
>>>       
>>
>> Hello,
>>
>> Thanks a lot for your response. I am afraid but I am not
>> fully understand the logic. Which I am following is collected
>> from net and I have just doing the same. I admit I don't know
>> the in-depth about how merging works. It might be interesting
>> that I am now getting something new than the empty return as
>> before. Please fine below
>>     
> Ok, let's start on what you did before.
>
> You created a branch "mybranch" from trunk to work on something. This is correct and the following is roughly what you should do in such cases
>
> - create the branch (done)
> - checkout the branch (done in branches/mybranch)
> - work on the branch committing as many times as you like
> - regularly merge the changes done in trunk
>      cd branches/mybranch
>      svn merge ^/trunk
>      svn commit
> - when you're done with the branch and you want to merge it back to trunk
>      cd branches/mybranch
>      svn merge ^/trunk
>      svn commit
>      cd trunk
>      svn merge --reintegrate ^/branches/mybranch
>
> This works because of merge-tracking. Unfortunately I think your version of SVN server (1.5.1) has some problem with merge-tracking. Other members of this ML hopefully will tell you for sure. I suggest you upgrade your server anyway to the latest SVN which is 1.6.9.
>
>   
>> ``````````````````
>> svn diff -r 488:489
>> Index: branches/bug/typo3conf/localconf.php
>> ===================================================================
>> --- branches/bug/typo3conf/localconf.php (revision 488)
>> +++ branches/bug/typo3conf/localconf.php (revision 489)
>> @@ -1,9 +1,12 @@
>> <?php
>>
>> -qqwq
>> -wq
>> -wqq
>> -qw
>> +wew
>> +wew
>> +ew
>> +wew
>> +
>> ``````````````````````
>>
>> The modification is done at
>> branches/bug/typo3conf/localconf.php. Now I try to merge it to trunk
>>
>> ```````````````
>> svn merge --dry-run -r 488:489 branches/bug/ trunk/
>>
>> --- Merging r489 into 'trunk':
>> C trunk/typo3conf/localconf.php
>> Summary of conflicts:
>> Text conflicts: 1
>> ````````````
>>     
> That usually means that there are some changes done in trunk/typo3conf/localconf.php that were not merged into branches/bug/type3conf/localconf.php.
>
> What does the log command on both files show?
>
> Giulioam now using 
>
>   


The point on svn version seems to valid. I can't upgrade the svn on the
server right now. but I am now using a machine which has a same svn
version i.e. 1.5 and here I found

````````````````
svn merge --dry-run -r 490:491 trunk/typo3conf/ branches/bug/
Skipped missing target: 'branches/bug/localconf.php'
```````````

Just notice now svn reports totally a different points to be failure.

Though "svn diff -r 490:491" shows the differences.



-- 
জয়দীপ বক্সী

RE: strange problem with subversion merge

Posted by Giulio Troccoli <Gi...@uk.linedata.com>.

>


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447

-----Original Message-----


> From: J. Bakshi [mailto:joydeep@infoservices.in]
> Sent: 02 March 2010 11:56
> To: Giulio Troccoli
> Cc: users@subversion.apache.org
> Subject: Re: strange problem with subversion merge
>
> On 03/02/2010 05:02 PM, Giulio Troccoli wrote:
>
> <snip>
> >> ````````````````
> >> svn merge -r 475:476 trunk/
> >> `````````````````
> >> just returns null value. It should merge the changes I made at
> >> branches/mybranch/folder1/file1 to trunk/folder1/file1.
> Have I missed
> >> something ? Please suggest.
> >>
> >>
>
> </snip>
> > I understand you want to merge the changes you have done in
> the branch to the trunk. If that's the case then from the
> branch you use the --reintegrate option.
> >
> > The merge command you issued merges the changes between 475
> and 476 done to trunk into the directory you are in. Since
> the changes happened on the branch it's correct that it
> doesn't merge anything.
> >
> >
>
>
> Hello,
>
> Thanks a lot for your response. I am afraid but I am not
> fully understand the logic. Which I am following is collected
> from net and I have just doing the same. I admit I don't know
> the in-depth about how merging works. It might be interesting
> that I am now getting something new than the empty return as
> before. Please fine below

Ok, let's start on what you did before.

You created a branch "mybranch" from trunk to work on something. This is correct and the following is roughly what you should do in such cases

- create the branch (done)
- checkout the branch (done in branches/mybranch)
- work on the branch committing as many times as you like
- regularly merge the changes done in trunk
     cd branches/mybranch
     svn merge ^/trunk
     svn commit
- when you're done with the branch and you want to merge it back to trunk
     cd branches/mybranch
     svn merge ^/trunk
     svn commit
     cd trunk
     svn merge --reintegrate ^/branches/mybranch

This works because of merge-tracking. Unfortunately I think your version of SVN server (1.5.1) has some problem with merge-tracking. Other members of this ML hopefully will tell you for sure. I suggest you upgrade your server anyway to the latest SVN which is 1.6.9.

> ``````````````````
> svn diff -r 488:489
> Index: branches/bug/typo3conf/localconf.php
> ===================================================================
> --- branches/bug/typo3conf/localconf.php (revision 488)
> +++ branches/bug/typo3conf/localconf.php (revision 489)
> @@ -1,9 +1,12 @@
> <?php
>
> -qqwq
> -wq
> -wqq
> -qw
> +wew
> +wew
> +ew
> +wew
> +
> ``````````````````````
>
> The modification is done at
> branches/bug/typo3conf/localconf.php. Now I try to merge it to trunk
>
> ```````````````
> svn merge --dry-run -r 488:489 branches/bug/ trunk/
>
> --- Merging r489 into 'trunk':
> C trunk/typo3conf/localconf.php
> Summary of conflicts:
> Text conflicts: 1
> ````````````

That usually means that there are some changes done in trunk/typo3conf/localconf.php that were not merged into branches/bug/type3conf/localconf.php.

What does the log command on both files show?

Giulio

Re: strange problem with subversion merge

Posted by "J. Bakshi" <jo...@infoservices.in>.
On 03/02/2010 05:02 PM, Giulio Troccoli wrote:

<snip>
>> ````````````````
>> svn merge -r 475:476 trunk/
>> `````````````````
>> just returns null value. It should merge the changes I made at
>> branches/mybranch/folder1/file1 to trunk/folder1/file1. Have
>> I missed something ? Please suggest.
>>
>>     

</snip>
> I understand you want to merge the changes you have done in the branch to the trunk. If that's the case then from the branch you use the --reintegrate option.
>
> The merge command you issued merges the changes between 475 and 476 done to trunk into the directory you are in. Since the changes happened on the branch it's correct that it doesn't merge anything.
>
>   


Hello,

Thanks a lot for your response. I am afraid but I am not fully
understand the logic. Which I am following is collected from net and I
have just doing the same. I admit I don't know the in-depth about how
merging works. It might be interesting that I am now getting something
new than the empty return as before. Please fine below

``````````````````
svn diff -r 488:489
Index: branches/bug/typo3conf/localconf.php
===================================================================
--- branches/bug/typo3conf/localconf.php (revision 488)
+++ branches/bug/typo3conf/localconf.php (revision 489)
@@ -1,9 +1,12 @@
<?php

-qqwq
-wq
-wqq
-qw
+wew
+wew
+ew
+wew
+
``````````````````````

The modification is done at branches/bug/typo3conf/localconf.php. Now I
try to merge it to trunk

```````````````
svn merge --dry-run -r 488:489 branches/bug/ trunk/

--- Merging r489 into 'trunk':
C trunk/typo3conf/localconf.php
Summary of conflicts:
Text conflicts: 1
````````````

Why the conflict now ? I have provide both source and target and
confirmed the changes with "svn diff" !!! What is wrong from my end ?
Please enlighten me.
Once again thanks for your kind help.


-- 
জয়দীপ বক্সী

RE: strange problem with subversion merge

Posted by Giulio Troccoli <Gi...@uk.linedata.com>.
>


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447

-----Original Message-----


> From: J. Bakshi [mailto:joydeep@infoservices.in]
> Sent: 02 March 2010 11:17
> To: users@subversion.apache.org
> Subject: strange problem with subversion merge
>
> Dear list,
>
> Greetings to all of you. Hope you all are well.
>
> I have come back again to discuss on svn merge which is not
> working at all here. The version running at server is
>
> ````````````
> svn, version 1.5.1 (r32289)
> compiled Aug 6 2009, 16:55:38
> `````````````````
>
> The client pc has
>
> ````````````````````````
> svn, version 1.6.6 (r40053)
> compiled Nov 1 2009, 12:15:31
> ```````````````````
>
> I have done a checkout of a repo at client and then start
> making trunk and branches
>
> [1] svn co https://192.168.1.1/repos/testrepo ./
>
> [2] cd testrepo
>
> svn mkdir trunk branches
> svn mv folder1 folder2 folder3 trunk/
> svn commit -m "creating trunk and placing files/folder in it"
>
> till now everything is ok
>
> [3] Now making a branch
>
> svn copy trunk branches/mybranch
> svn up
>
> all is OK.
>
> [4] and now merging. I have already changed
> branches/mybranch/folder1/file1 and commit successfully. "svn
> diff -r 475:476" reports the changes I made. BUT
>
> ````````````````
> svn merge -r 475:476 trunk/
> `````````````````
> just returns null value. It should merge the changes I made at
> branches/mybranch/folder1/file1 to trunk/folder1/file1. Have
> I missed something ? Please suggest.
>

I understand you want to merge the changes you have done in the branch to the trunk. If that's the case then from the branch you use the --reintegrate option.

The merge command you issued merges the changes between 475 and 476 done to trunk into the directory you are in. Since the changes happened on the branch it's correct that it doesn't merge anything.