You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Matthias Weyh <m....@technisat.de> on 2010/05/06 06:16:59 UTC

Tree conflicts on merging into a branch

Hello,

Since I did not get any responses to my question on the users group and
this might be a bug I am reposting this to the dev user group.

I am looking forward to your answers.

Thanks,
Matthias

-----Ursprüngliche Nachricht-----
Von: Matthias Weyh [mailto:m.weyh@technisat.de] 
Gesendet: Donnerstag, 29. April 2010 08:26
An: users@subversion.apache.org
Betreff: Tree conflicts on merging into a branch

Hello,

I have seen an issue with subversion in which tree conflicts are being
produced when creating a branch from a working copy in which not all
files are at the same revision. This is happening when trying to merge
changes into this branch.

Please refer to the following sequence. Is this supposed to be happening
in this way? I do not exactly understand what causes the tree conflicts.
Shouldn't there at least be a warning on trying to copy from a working
copy with mixed revisions?


>svn co https://localhost/svn/test
Checked out revision 0.

>cd test

test>mkdir trunk

test>mkdir branches

test>mkdir tags

test>svn add trunk branches tags
A         trunk
A         branches
A         tags

test>svn commit -m "initial structure"
Adding         branches
Adding         tags
Adding         trunk

Committed revision 1.

test>svn switch https://localhost/svn/test/trunk
D    trunk
D    branches
D    tags
Updated to revision 1.

test>mkdir d1

test>mkdir d2

test>mkdir d3

test>echo loremipsum > d1\f1.txt

test>echo loremipsum > d2\f1.txt

test>echo loremipsum > d3\f1.txt

test>svn add d1 d2 d3
A         d1
A         d1\f1.txt
A         d2
A         d2\f1.txt
A         d3
A         d3\f1.txt

test>svn ci -m "stuff"
Adding         d1
Adding         d1\f1.txt
Adding         d2
Adding         d2\f1.txt
Adding         d3
Adding         d3\f1.txt
Transmitting file data ...
Committed revision 2.

test>svn copy . https://localhost/svn/test/branches/b1 -m "created b1"

Committed revision 3.

test>svn rename d1 d1_r
A         d1_r
D         d1\f1.txt
D         d1

test>svn commit -m "d1 renamed"
Deleting       d1
Adding         d1_r

Committed revision 4.

test>svn switch https://localhost/svn/test/branches/b1
D    d1_r
A    d1
A    d1\f1.txt
Updated to revision 4.

test>svn merge https://localhost/svn/test/trunk
--- Merging r2 through r4 into '.':
A    d1_r
A    d1_r\f1.txt
   C d2
   C d3
Summary of conflicts:
  Tree conflicts: 2

D:\repositories\test>svn status -v
 M               4        3 weyh         .
                 4        3 weyh         d1
                 4        2 weyh         d1\f1.txt
      C          4        3 weyh         d2
      >   local add, incoming add upon merge
                 4        2 weyh         d2\f1.txt
A  +             -       ?   ?           d1_r
A  +             -        2 weyh         d1_r\f1.txt
      C          4        3 weyh         d3
      >   local add, incoming add upon merge
                 4        2 weyh         d3\f1.txt

Best regards,
Matthias


Re: Tree conflicts on merging into a branch

Posted by Matthias Weyh <m....@technisat.de>.
Hello,

I am sorry about this but the community guide states that a possible bug
can be posted to the dev group if unanswered on the users group.

Does this mean that no one will be looking into the issue? If this is
the case I'd be glad to repost the question on the forums.

Best regards,
Matthias
 

-----Ursprüngliche Nachricht-----
Von: C. Michael Pilato [mailto:cmpilato@collab.net] 
Gesendet: Donnerstag, 6. Mai 2010 15:36
An: Matthias Weyh
Cc: dev@subversion.apache.org
Betreff: ***SPAM***Re: Tree conflicts on merging into a branch

Matthias, the dev@ group is not an escalation path for failing to get
answers on users@.  If users@ is failing you, consider posting your
question
in another community of Subversion users (e.g. the forums at
subversion.open.collab.net).  Thanks.


Matthias Weyh wrote:
> Hello,
> 
> Since I did not get any responses to my question on the users group
and
> this might be a bug I am reposting this to the dev user group.
> 
> I am looking forward to your answers.
> 
> Thanks,
> Matthias
> 
> -----Ursprüngliche Nachricht-----
> Von: Matthias Weyh [mailto:m.weyh@technisat.de] 
> Gesendet: Donnerstag, 29. April 2010 08:26
> An: users@subversion.apache.org
> Betreff: Tree conflicts on merging into a branch
> 
> Hello,
> 
> I have seen an issue with subversion in which tree conflicts are being
> produced when creating a branch from a working copy in which not all
> files are at the same revision. This is happening when trying to merge
> changes into this branch.
> 
> Please refer to the following sequence. Is this supposed to be
happening
> in this way? I do not exactly understand what causes the tree
conflicts.
> Shouldn't there at least be a warning on trying to copy from a working
> copy with mixed revisions?
> 
> 
>> svn co https://localhost/svn/test
> Checked out revision 0.
> 
>> cd test
> 
> test>mkdir trunk
> 
> test>mkdir branches
> 
> test>mkdir tags
> 
> test>svn add trunk branches tags
> A         trunk
> A         branches
> A         tags
> 
> test>svn commit -m "initial structure"
> Adding         branches
> Adding         tags
> Adding         trunk
> 
> Committed revision 1.
> 
> test>svn switch https://localhost/svn/test/trunk
> D    trunk
> D    branches
> D    tags
> Updated to revision 1.
> 
> test>mkdir d1
> 
> test>mkdir d2
> 
> test>mkdir d3
> 
> test>echo loremipsum > d1\f1.txt
> 
> test>echo loremipsum > d2\f1.txt
> 
> test>echo loremipsum > d3\f1.txt
> 
> test>svn add d1 d2 d3
> A         d1
> A         d1\f1.txt
> A         d2
> A         d2\f1.txt
> A         d3
> A         d3\f1.txt
> 
> test>svn ci -m "stuff"
> Adding         d1
> Adding         d1\f1.txt
> Adding         d2
> Adding         d2\f1.txt
> Adding         d3
> Adding         d3\f1.txt
> Transmitting file data ...
> Committed revision 2.
> 
> test>svn copy . https://localhost/svn/test/branches/b1 -m "created b1"
> 
> Committed revision 3.
> 
> test>svn rename d1 d1_r
> A         d1_r
> D         d1\f1.txt
> D         d1
> 
> test>svn commit -m "d1 renamed"
> Deleting       d1
> Adding         d1_r
> 
> Committed revision 4.
> 
> test>svn switch https://localhost/svn/test/branches/b1
> D    d1_r
> A    d1
> A    d1\f1.txt
> Updated to revision 4.
> 
> test>svn merge https://localhost/svn/test/trunk
> --- Merging r2 through r4 into '.':
> A    d1_r
> A    d1_r\f1.txt
>    C d2
>    C d3
> Summary of conflicts:
>   Tree conflicts: 2
> 
> D:\repositories\test>svn status -v
>  M               4        3 weyh         .
>                  4        3 weyh         d1
>                  4        2 weyh         d1\f1.txt
>       C          4        3 weyh         d2
>       >   local add, incoming add upon merge
>                  4        2 weyh         d2\f1.txt
> A  +             -       ?   ?           d1_r
> A  +             -        2 weyh         d1_r\f1.txt
>       C          4        3 weyh         d3
>       >   local add, incoming add upon merge
>                  4        2 weyh         d3\f1.txt
> 
> Best regards,
> Matthias
> 
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



Re: Tree conflicts on merging into a branch

Posted by "C. Michael Pilato" <cm...@collab.net>.
Matthias, the dev@ group is not an escalation path for failing to get
answers on users@.  If users@ is failing you, consider posting your question
in another community of Subversion users (e.g. the forums at
subversion.open.collab.net).  Thanks.


Matthias Weyh wrote:
> Hello,
> 
> Since I did not get any responses to my question on the users group and
> this might be a bug I am reposting this to the dev user group.
> 
> I am looking forward to your answers.
> 
> Thanks,
> Matthias
> 
> -----Ursprüngliche Nachricht-----
> Von: Matthias Weyh [mailto:m.weyh@technisat.de] 
> Gesendet: Donnerstag, 29. April 2010 08:26
> An: users@subversion.apache.org
> Betreff: Tree conflicts on merging into a branch
> 
> Hello,
> 
> I have seen an issue with subversion in which tree conflicts are being
> produced when creating a branch from a working copy in which not all
> files are at the same revision. This is happening when trying to merge
> changes into this branch.
> 
> Please refer to the following sequence. Is this supposed to be happening
> in this way? I do not exactly understand what causes the tree conflicts.
> Shouldn't there at least be a warning on trying to copy from a working
> copy with mixed revisions?
> 
> 
>> svn co https://localhost/svn/test
> Checked out revision 0.
> 
>> cd test
> 
> test>mkdir trunk
> 
> test>mkdir branches
> 
> test>mkdir tags
> 
> test>svn add trunk branches tags
> A         trunk
> A         branches
> A         tags
> 
> test>svn commit -m "initial structure"
> Adding         branches
> Adding         tags
> Adding         trunk
> 
> Committed revision 1.
> 
> test>svn switch https://localhost/svn/test/trunk
> D    trunk
> D    branches
> D    tags
> Updated to revision 1.
> 
> test>mkdir d1
> 
> test>mkdir d2
> 
> test>mkdir d3
> 
> test>echo loremipsum > d1\f1.txt
> 
> test>echo loremipsum > d2\f1.txt
> 
> test>echo loremipsum > d3\f1.txt
> 
> test>svn add d1 d2 d3
> A         d1
> A         d1\f1.txt
> A         d2
> A         d2\f1.txt
> A         d3
> A         d3\f1.txt
> 
> test>svn ci -m "stuff"
> Adding         d1
> Adding         d1\f1.txt
> Adding         d2
> Adding         d2\f1.txt
> Adding         d3
> Adding         d3\f1.txt
> Transmitting file data ...
> Committed revision 2.
> 
> test>svn copy . https://localhost/svn/test/branches/b1 -m "created b1"
> 
> Committed revision 3.
> 
> test>svn rename d1 d1_r
> A         d1_r
> D         d1\f1.txt
> D         d1
> 
> test>svn commit -m "d1 renamed"
> Deleting       d1
> Adding         d1_r
> 
> Committed revision 4.
> 
> test>svn switch https://localhost/svn/test/branches/b1
> D    d1_r
> A    d1
> A    d1\f1.txt
> Updated to revision 4.
> 
> test>svn merge https://localhost/svn/test/trunk
> --- Merging r2 through r4 into '.':
> A    d1_r
> A    d1_r\f1.txt
>    C d2
>    C d3
> Summary of conflicts:
>   Tree conflicts: 2
> 
> D:\repositories\test>svn status -v
>  M               4        3 weyh         .
>                  4        3 weyh         d1
>                  4        2 weyh         d1\f1.txt
>       C          4        3 weyh         d2
>       >   local add, incoming add upon merge
>                  4        2 weyh         d2\f1.txt
> A  +             -       ?   ?           d1_r
> A  +             -        2 weyh         d1_r\f1.txt
>       C          4        3 weyh         d3
>       >   local add, incoming add upon merge
>                  4        2 weyh         d3\f1.txt
> 
> Best regards,
> Matthias
> 
> 


-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: Tree conflicts on merging into a branch

Posted by Stefan Sperling <st...@elego.de>.
[ Taking this discussion back from dev@ to users@ ]

On Fri, May 07, 2010 at 05:15:25PM +1000, Daniel Becroft wrote:
> it sounds
> as though creating branches from mixed-revision working copies will
> cause problems with merging.

The implications of mixed-revision working copies on tree conflicts
have been discussed on the users@ list a lot.
See for instance http://svn.haxx.se/users/archive-2009-08/0748.shtml

To avoid problems resulting from mixed-revision copies,
URL->URL copies should always be used to create branches.
Use working copy -> URL copies only if you really need to create
copies of things which differ from anything else in the repository,
and know how to deal with consequences.

For instance, the Subversion project itself creates its release
tags from working copies, after adjusting version numbers from
e.g. 1.6.x to something fixed like 1.6.12. This avoids version-numbering
churn on the release branch itself.


Stefan

Re: Tree conflicts on merging into a branch

Posted by Daniel Becroft <dj...@gmail.com>.
On Thu, May 6, 2010 at 4:16 PM, Matthias Weyh <m....@technisat.de> wrote:
> Hello,
>
> Since I did not get any responses to my question on the users group and
> this might be a bug I am reposting this to the dev user group.
>
> I am looking forward to your answers.
>
> Thanks,
> Matthias
>
> -----Ursprüngliche Nachricht-----
> Von: Matthias Weyh [mailto:m.weyh@technisat.de]
> Gesendet: Donnerstag, 29. April 2010 08:26
> An: users@subversion.apache.org
> Betreff: Tree conflicts on merging into a branch
>
> Hello,
>
> I have seen an issue with subversion in which tree conflicts are being
> produced when creating a branch from a working copy in which not all
> files are at the same revision. This is happening when trying to merge
> changes into this branch.
>
> Please refer to the following sequence. Is this supposed to be happening
> in this way? I do not exactly understand what causes the tree conflicts.
> Shouldn't there at least be a warning on trying to copy from a working
> copy with mixed revisions?
>

<snipped />

> test>svn ci -m "stuff"
> Adding         d1
> Adding         d1\f1.txt
> Adding         d2
> Adding         d2\f1.txt
> Adding         d3
> Adding         d3\f1.txt
> Transmitting file data ...
> Committed revision 2.

At this point, the root of the working copy is still r1 - committing
children of a directory does not bump the revision of the parent
directory. You need to explicitly run an 'svn update .' here before
the copy.

> test>svn copy . https://localhost/svn/test/branches/b1 -m "created b1"
>
> Committed revision 3.

As a result, this copy causes the following 'copy-from' information:
 - b1 is copied from trunk @ r1
 - d1, d2, and d3 are all copied from trunk @ r2

> test>svn merge https://localhost/svn/test/trunk
> --- Merging r2 through r4 into '.':
> A    d1_r
> A    d1_r\f1.txt
>   C d2
>   C d3
> Summary of conflicts:
>  Tree conflicts: 2

And so here, because b1 was copied from trunk @ r1, then everything
from r2 up to HEAD is 'eligible' to be merged into the branch. This
can be confirmed with 'svn mergeinfo --show-revs eligible'.

> D:\repositories\test>svn status -v
>  M               4        3 weyh         .
>                 4        3 weyh         d1
>                 4        2 weyh         d1\f1.txt
>      C          4        3 weyh         d2
>      >   local add, incoming add upon merge
>                 4        2 weyh         d2\f1.txt
> A  +             -       ?   ?           d1_r
> A  +             -        2 weyh         d1_r\f1.txt
>      C          4        3 weyh         d3
>      >   local add, incoming add upon merge
>                 4        2 weyh         d3\f1.txt

Thats probably the best I can do for an explanation. As to whether its
a bug or by design, I can't help you. But, on the surface, it sounds
as though creating branches from mixed-revision working copies will
cause problems with merging.

Regards,
Daniel B.