You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Francois Beausoleil <fb...@users.sourceforge.net> on 2004/02/09 04:08:29 UTC

[BUG] Merge does not pick up svn copy WC URL

Hi,

The following recipe does behave as I would expect:
rd /s/q repos wc
cls
svn --version
svnadmin create repos
svn checkout file:///repos wc
cd wc
mkdir trunk tags branches
cd trunk
echo "fileA" >fileA.java
cd ..
svn add trunk tags branches
svn commit --message "initial version"
cd trunk
echo "fileB" >fileB.java
svn add fileB.java
svn copy . file:///repos/branches/temp --message "Creating temporary
branch"
svn revert -R .
del fileB.java
cd ..
svn update
cd branches\temp
echo "fileC" >fileC.java
svn add fileC.java
svn commit --message "Adding fileC"
cd ..\..\trunk
svn merge --dry-run --revision 2:head file:///repos/branches/temp
svn merge --revision 2:head file:///repos/branches/temp

Should the final merge have picked up fileB.java ?  In my opinion, yes.

I copied a sample run at the end of this mail message.

Bye !
François


K:\>svn --version
svn, version 0.37.0 (r8509)
   compiled Jan 25 2004, 22:51:07

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV)
protocol.
  - handles 'http' schema
  - handles 'https' schema
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' schema
* ra_svn : Module for accessing a repository using the svn network
protocol.
  - handles 'svn' schema


K:\>svnadmin create repos

K:\>svn checkout file:///repos wc
Checked out revision 0.

K:\>cd wc

K:\wc>mkdir trunk tags branches

K:\wc>cd trunk

K:\wc\trunk>echo "fileA"  1>fileA.java

K:\wc\trunk>cd ..

K:\wc>svn add trunk tags branches
A         trunk
A         trunk\fileA.java
A         tags
A         branches

K:\wc>svn commit --message "initial version"
Adding         branches
Adding         tags
Adding         trunk
Adding         trunk\fileA.java
Transmitting file data .
Committed revision 1.

K:\wc>cd trunk

K:\wc\trunk>echo "fileB"  1>fileB.java

K:\wc\trunk>svn add fileB.java
A         fileB.java

K:\wc\trunk>svn copy . file:///repos/branches/temp --message "Creating
temporary
 branch"

Committed revision 2.

K:\wc\trunk>svn revert -R .
Reverted 'fileB.java'

K:\wc\trunk>del fileB.java

K:\wc\trunk>cd ..

K:\wc>svn update
A  branches\temp
A  branches\temp\fileA.java
A  branches\temp\fileB.java
Updated to revision 2.

K:\wc>cd branches\temp

K:\wc\branches\temp>echo "fileC"  1>fileC.java

K:\wc\branches\temp>svn add fileC.java
A         fileC.java

K:\wc\branches\temp>svn commit --message "Adding fileC"
Adding         temp\fileC.java
Transmitting file data .
Committed revision 3.

K:\wc\branches\temp>cd ..\..\trunk

K:\wc\trunk>svn merge --dry-run --revision 2:head
file:///repos/branches/temp
A  fileC.java

K:\wc\trunk>svn merge --revision 2:head file:///repos/branches/temp
A  fileC.java

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [BUG] Merge does not pick up svn copy WC URL

Posted by Ben Collins-Sussman <su...@collab.net>.
On Mon, 2004-02-09 at 08:07, Francois Beausoleil wrote:

> K:\wc\trunk>svn merge file:///repos/trunk@2
> file:///repos/branches/temp@head
> 
> This says "apply the differences between trunk@2 and branches/temp@head
> to .".  Right ?

Yes, exactly.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [BUG] Merge does not pick up svn copy WC URL

Posted by Francois Beausoleil <fb...@users.sourceforge.net>.
On Mon, 09 Feb 2004 07:52:39 -0600, "Ben Collins-Sussman"
<su...@collab.net> said:
> On Sun, 2004-02-08 at 23:06, Francois Beausoleil wrote:
> > > 
> > 
> > Haha !  This is a case where I should have asked for:
> > svn merge -r 2:head trunk branches/temp
> 
> No, I don't think that will do anything at all.  If you compare (2,
> /trunk) with (3, /trunk), there's no difference.  Those two trees are
> identical, so there's no diff to apply to your working copy.
> 

I understand your message.  I did not write the proper command, so you
did not understand what I meant.  The actual command that should have
been written was:

K:\wc\trunk>svn merge file:///repos/trunk@2
file:///repos/branches/temp@head

This says "apply the differences between trunk@2 and branches/temp@head
to .".  Right ?

Thanks,
François
Developer of Java Gui Builder
http://jgb.sourceforge.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [BUG] Merge does not pick up svn copy WC URL

Posted by Ben Collins-Sussman <su...@collab.net>.
On Sun, 2004-02-08 at 23:06, Francois Beausoleil wrote:
> > 
> 
> Haha !  This is a case where I should have asked for:
> svn merge -r 2:head trunk branches/temp

No, I don't think that will do anything at all.  If you compare (2,
/trunk) with (3, /trunk), there's no difference.  Those two trees are
identical, so there's no diff to apply to your working copy.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [BUG] Merge does not pick up svn copy WC URL

Posted by Francois Beausoleil <fb...@users.sourceforge.net>.
On Sun, 08 Feb 2004 22:29:53 -0600, "Ben Collins-Sussman"
<su...@collab.net> said:
> On Sun, 2004-02-08 at 22:08, Francois Beausoleil wrote:
[snip]
> Look at your merge command.  You're asking the server to compare two
> trees:  (2, /branches/temp) and (3, /branches/temp).  What's the
> difference between those two trees?  Answer:  the addition of fileC. 
> That's it.  Both trees *already* have fileB.
> 
> Therefore, merge is doing exactly what you ask:  it's adding fileC.
> 

Haha !  This is a case where I should have asked for:
svn merge -r 2:head trunk branches/temp

True ?  If so, I think I've finally understood merging correctly.  Phew !
 After 12 months, it's about time :)

Bye !
François
Developer of Java Gui Builder
http://jgb.sourceforge.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [BUG] Merge does not pick up svn copy WC URL

Posted by Ben Collins-Sussman <su...@collab.net>.
On Sun, 2004-02-08 at 22:08, Francois Beausoleil wrote:

> Should the final merge have picked up fileB.java ?  In my opinion, yes.

No, there's no bug here.

> svn merge --revision 2:head file:///repos/branches/temp

Look at your merge command.  You're asking the server to compare two
trees:  (2, /branches/temp) and (3, /branches/temp).  What's the
difference between those two trees?  Answer:  the addition of fileC. 
That's it.  Both trees *already* have fileB.

Therefore, merge is doing exactly what you ask:  it's adding fileC.




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org