You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vadym Chepkov <ch...@yahoo.com> on 2009/09/29 22:56:08 UTC

merge with tree conflict

Hi,

Could you help me to solve the problem I have, please?

I have loaded a new vendor drop using svn_load_dirs.pl and I can see all changes using svn diff ^/vendor/product/1.2  ^/vendor/product/current

Now I want to merge these changes into my working copy. The problem is, in a working copy I have one of the directories removed and when I try to merge I get a tree conflict.

svn merge  ^/vendor/product/1.2  ^/vendor/product/current .

--- Merging differences between repository URLs into '.':
   C install
Summary of conflicts:
  Tree conflicts: 1

$ svn st
 M      .
!     C install
      >   local delete, incoming edit upon merge

How can I skip the deleted directory changes and apply only the remaining changes? Thank you.

Sincerely yours,
  Vadym Chepkov

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401812

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: merge with tree conflict

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Wed, Sep 30, 2009 at 06:27:39AM -0700, Vadym Chepkov wrote:
> finally we got to the point. now lets go to product directory again and apply the same exactly merge we did with revision 6
> 
> $ svn merge ^/vendor/1.0 ^/vendor/current .
> $ svn diff
> 
> Property changes on: .
> ___________________________________________________________________
> Modified: svn:mergeinfo
>    Merged /vendor/current:r6-7
> 
> As you can see, svn:merginfo was updated yet again, even though nothing was changed under /vendor/ in revisions 6 and 7

Yes, this is correct. Subversion has to track the fact that you already
merged revs 6 and 7 into your "current" branch. Whether there were
actual code changes in those revs is irrelevant.

The topic of "phantom" changes to mergeinfo on seemingly unrelated
merges has been discussed many, many times on this list. Look through
the archives for more examples.

tyler

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402113

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: merge with tree conflict

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Stefan Sperling wrote on Wed, 30 Sep 2009 at 13:51 +0100:
> My recommendation is to use 'svn export' and a tool like rsync instead.

Or 'rsync --exclude' and 'svn up', if you want to save doing a fresh
export each time, I suppose...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2403085

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: merge with tree conflict

Posted by Vadym Chepkov <ch...@yahoo.com>.
> 
> Not just waste of space. Make sure to read:
> http://www.smashingmagazine.com/2009/09/25/svn-strikes-back-a-serious-vulnerability-found/
> (I don't think they should have used the word
> "vulnerability" in their
> title -- they used it to create hype.)
> 
> My recommendation is to use 'svn export' and a tool like
> rsync instead.

I have this in my configuration, so I think I am fine.

<DirectoryMatch "/\.svn/">
    AllowOverride None
    Options None
    Order deny,allow
    Deny from all
</DirectoryMatch>

svn export would override local changes, but I hope we won't start a holy war flame about it :)


> Can you be more specific, please?
> What merge command did you run? What mergeinfo on which
> path did
> change in what way and what did you expect to see instead?
> Output of 'svn diff' and 'svn status' would help. You can
> change
> URLs and path names if you like, but keep any other
> information.

let me just reproduce a test case for you

$ svnadmin create testrepo
$ svn co file:///$HOME/testrepo test
Checked out revision 0.
$ cd test
$ svn mkdir --parents vendor/current trunk
A         /home/vvc/test/vendor
A         /home/vvc/test/vendor/current
A         /home/vvc/test/trunk
$ date > /home/vvc/test/vendor/current/DATE
$ svn add /home/vvc/test/vendor/current/DATE
A         /home/vvc/test/vendor/current/DATE
$ svn commit -m "Initial drop"
Adding         trunk
Adding         vendor
Adding         vendor/current
Adding         vendor/current/DATE
Transmitting file data .
Committed revision 1.
$ svn copy ^/vendor/current ^/vendor/1.0 -m "tag with revision 1.0"

Committed revision 2.
$ svn copy ^/vendor/1.0 ^/trunk/product -m "include vendor product in main branch"

Committed revision 3.
$ svn up
A    trunk/product
A    trunk/product/DATE
A    vendor/1.0
A    vendor/1.0/DATE
Updated to revision 3.

$ date >> /home/vvc/test/vendor/current/DATE
$ svn commit -m "Importing version 2 "
Sending        vendor/current/DATE
Transmitting file data .
Committed revision 4.
$ svn copy ^/vendor/current ^/vendor/2.0 -m "tag with revision 2.0"

Committed revision 5.
$ cd trunk/product
$ svn merge ^/vendor/1.0 ^/vendor/current .
--- Merging differences between repository URLs into '.':
U    DATE
$ svn commit -m "upgraded to version 2.0"
Sending        product
Sending        product/DATE
Transmitting file data .
Committed revision 6.
$ svn pg svn:mergeinfo .
/vendor/current:2-5

$ cd ..
$ date > MAIN
$ svn add MAIN
A         MAIN
$ svn commit -m "Changes in main branch"
Adding         trunk/MAIN
Transmitting file data .
Committed revision 7.

finally we got to the point. now lets go to product directory again and apply the same exactly merge we did with revision 6

$ svn merge ^/vendor/1.0 ^/vendor/current .
$ svn diff

Property changes on: .
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /vendor/current:r6-7

As you can see, svn:merginfo was updated yet again, even though nothing was changed under /vendor/ in revisions 6 and 7

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402074

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: merge with tree conflict

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Sep 30, 2009 at 05:40:00AM -0700, Vadym Chepkov wrote:
> --- On Tue, 9/29/09, Tyler Roscoe <ty...@cryptio.net> wrote:
> 
> > Why did you remove a directory for a project that you,
> > essentially, do
> > not control?
> 
> I run a web-site out of subversion, some say it's a waste of space,

Not just waste of space. Make sure to read:
http://www.smashingmagazine.com/2009/09/25/svn-strikes-back-a-serious-vulnerability-found/
(I don't think they should have used the word "vulnerability" in their
title -- they used it to create hype.)

My recommendation is to use 'svn export' and a tool like rsync instead.

> I still see some strange thing, not sure if it's a 'bug' or a 'feature'.
> If I try to apply the same svn merge yet again later, I obviously
> won't get any changes, since nothing has changed under /vendor/
> directory. But, svn merge still modifies svn:mergeinfo of the working
> copy with the revision range that has nothing to do with /vendor/
> branch. Is it expected?

Can you be more specific, please?
What merge command did you run? What mergeinfo on which path did
change in what way and what did you expect to see instead?
Output of 'svn diff' and 'svn status' would help. You can change
URLs and path names if you like, but keep any other information.

Stefan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402059

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: merge with tree conflict

Posted by Vadym Chepkov <ch...@yahoo.com>.
--- On Tue, 9/29/09, Tyler Roscoe <ty...@cryptio.net> wrote:

> Why did you remove a directory for a project that you,
> essentially, do
> not control?

I run a web-site out of subversion, some say it's a waste of space, but I find it very convenient. vendor requirement is to remove install directory after installation was done.   

> 
> Your merge should continue happily beyond this point,
> merging all the
> other needed changes and leaving the install directory for
> you to deal
> with manually. Is this not what you're seeing? Can you post
> more of the
> output from your svn merge command?

You are right, sorry for producing extra noise. Apparently, ALL changes were in 'install' directory and I should have paid more attention to svn diff output.

I still see some strange thing, not sure if it's a 'bug' or a 'feature'.
If I try to apply the same svn merge yet again later, I obviously won't get any changes, since nothing has changed under /vendor/ directory. But, svn merge still modifies svn:mergeinfo of the working copy with the revision range that has nothing to do with /vendor/ branch. Is it expected?

Thank you,
Vadym

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2402051

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: merge with tree conflict

Posted by Tyler Roscoe <ty...@cryptio.net>.
On Tue, Sep 29, 2009 at 03:56:08PM -0700, Vadym Chepkov wrote:
> Now I want to merge these changes into my working copy. The problem
> is, in a working copy I have one of the directories removed and when I
> try to merge I get a tree conflict.

Why did you remove a directory for a project that you, essentially, do
not control?

> svn merge  ^/vendor/product/1.2  ^/vendor/product/current .
> 
> --- Merging differences between repository URLs into '.':
>    C install
> Summary of conflicts:
>   Tree conflicts: 1
> 
> $ svn st
>  M      .
> !     C install
>       >   local delete, incoming edit upon merge
> 
> How can I skip the deleted directory changes and apply only the remaining changes? Thank you.

Your merge should continue happily beyond this point, merging all the
other needed changes and leaving the install directory for you to deal
with manually. Is this not what you're seeing? Can you post more of the
output from your svn merge command?

tyler

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401848

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].