You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mariano Kamp <ma...@acm.org> on 2006/09/07 08:07:44 UTC

Can subversion track structural changes? In different copies? And merge them?

Hi,

   please consider the following scenario. A file in trunk is renamed, 
but in a branch changes to the same file are also made.
Here in more detail:

   One developer adds "a.c" in the trunk and commits (r1). Another 
developer needs to make a fix to "a.c" and creates a branch "fixing" 
(r2), checks it out, marks the start with a tag "start-fixing" (r3) and 
also marks the end with "stop-fixing" (r5). Between those tags he 
changes the contents of "a.c" in the branch and commits (r4).

   At the same time somebody changes the name of "a.c" to "b.c" in the 
trunk and commits (r6).

   So how to get the changes from the branch"fixing" back to the trunk?
I tried to merge from the HEAD of trunk and branch "fixing". That 
resulted in an error that "a.c" is not known. I am not sure why this is, 
as svn knows from what point on the branch was created, doesn't it?

   I then tried to check out a new working copy of the trunk with (r1), 
i.e. before the new branch "fixing" was created. I then merged 
start-fixing and stop-fixing in the trunk ("svn merge [..]start-fixing 
stop-fixing[..] .").
That worked ok. The changes from the "fixing" branch are now in my local 
copy, but I still need the remaining trunk changes. So I tried to merge 
with HEAD, also tried to get to the HEAD by using update. Both didn't 
work as expected and I have "a.c" and "b.c".

   What is the proper way to do that or can't I track structural changes 
in subversion, when using more than the trunk?

   I am really at a loss here, can somebody open my eyes please? ;-)

Cheers,
Mariano

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

Re: Can subversion track structural changes? In different copies? And merge them?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
> Garrett Rooney wrote:
> > On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
> >> Otherwise this would mean that all svn users don't use branches and
> >> merge automagically. Or they don't do any structural changes, besides
> >> adding new files.
> >
> > No, it just means that significant tree rearrangements can screw up
> > merging, and people have lived with that for now.  Yes, it sucks.
> Sorry for being so annoying, but any change in the structure, besides
> add, that will be effected in more than one tree will cause this, right?

Potentially, yes.

> > Sorry.  Hopefully it will get better in the future.
> No offense meant. Just wanted to understand the situation.
>
> Anyway, Garret, from what I read in the bug report you are working on it
> right now for 1.5. Do I understand it correctly, that after your
> significant fix / new feature you can do all sorts of structural
> changes, e.g. moving directories, and still can automatically merge?

I'm working on it, but considering the scope of the change it's
unknown if it will be in 1.5, or if parts of it do make it in to 1.5
if it will be visible to the user or not.  There are several stages to
the rename support, and the first few of them are very low level, not
the sort of thing that anyone other than a developer would notice.
It's only after those are in place that we can actually use them to
solve the more interesting problems.

> What is the best guess for the release date of the 1.5 release? First
> half of '07 or second half?

It's impossible to say at the moment.  We haven't even got 1.4 out the
door yet, so predicting when 1.5 will come out is just an exercise in
futility.

-garrett

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

Re: Can subversion track structural changes? In different copies? And merge them?

Posted by Mariano Kamp <ma...@acm.org>.
Garrett Rooney wrote:
> On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
>> Otherwise this would mean that all svn users don't use branches and
>> merge automagically. Or they don't do any structural changes, besides
>> adding new files.
> 
> No, it just means that significant tree rearrangements can screw up
> merging, and people have lived with that for now.  Yes, it sucks.
Sorry for being so annoying, but any change in the structure, besides 
add, that will be effected in more than one tree will cause this, right?

> Sorry.  Hopefully it will get better in the future.
No offense meant. Just wanted to understand the situation.

Anyway, Garret, from what I read in the bug report you are working on it 
right now for 1.5. Do I understand it correctly, that after your 
significant fix / new feature you can do all sorts of structural 
changes, e.g. moving directories, and still can automatically merge?

What is the best guess for the release date of the 1.5 release? First 
half of '07 or second half?

Thanks for working on this missing feature. We are really looking 
forward to see it added.

Cheers,
Mariano

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

Re: Can subversion track structural changes? In different copies? And merge them?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
> Erik Huelsmann wrote:
> > On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
> >>
> >>   please consider the following scenario. A file in trunk is renamed,
> >> but in a branch changes to the same file are also made.
> [..]
>
> > This is issue 898: Implement true renames. Because renames are
> > currently implemented as a Copy+Delete, it's not possible to determine
> > whether a file stems from a Copy or Rename operation.
>
> >>   I am really at a loss here, can somebody open my eyes please? ;-)
> Well, sorta ;-)
>
> I read the issue report,
> http://subversion.tigris.org/issues/show_bug.cgi?id=898, and it has been
> filed four years ago. So that lets me believe the feature is not
> important at all. Hence I am probably doing something the wrong way and
>   there is an easy workaround for tracking changes in resource names and
> directories.

It's not that it's not important, it's just that it's hard to do.

> The question is, what does the workaround look like?
>
> Otherwise this would mean that all svn users don't use branches and
> merge automagically. Or they don't do any structural changes, besides
> adding new files.

No, it just means that significant tree rearrangements can screw up
merging, and people have lived with that for now.  Yes, it sucks.
Sorry.  Hopefully it will get better in the future.

-garrett

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

Re: Can subversion track structural changes? In different copies? And merge them?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 7, 2006, at 12:19, Mariano Kamp wrote:

>> This is issue 898: Implement true renames. Because renames are
>> currently implemented as a Copy+Delete, it's not possible to  
>> determine
>> whether a file stems from a Copy or Rename operation.

> I read the issue report, http://subversion.tigris.org/issues/ 
> show_bug.cgi?id=898, and it has been filed four years ago. So that  
> lets me believe the feature is not important at all. Hence I am  
> probably doing something the wrong way and  there is an easy  
> workaround for tracking changes in resource names and directories.
>
> The question is, what does the workaround look like?
>
> Otherwise this would mean that all svn users don't use branches and  
> merge automagically. Or they don't do any structural changes,  
> besides adding new files.
>
> Or don't I get it?

I do not believe there is an easy workaround. The scenario you  
described is problematic in Subversion.

The fact that the issue has not been resolved after four years does  
not mean it is not important to anybody, just that it has not been  
more important to the limited number of developers than some of the  
other issues they have been fixing in the mean time.


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

Re: Can subversion track structural changes? In different copies? And merge them?

Posted by Mariano Kamp <ma...@acm.org>.
Erik Huelsmann wrote:
> On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
>>
>>   please consider the following scenario. A file in trunk is renamed,
>> but in a branch changes to the same file are also made.
[..]

> This is issue 898: Implement true renames. Because renames are
> currently implemented as a Copy+Delete, it's not possible to determine
> whether a file stems from a Copy or Rename operation.

>>   I am really at a loss here, can somebody open my eyes please? ;-)
Well, sorta ;-)

I read the issue report, 
http://subversion.tigris.org/issues/show_bug.cgi?id=898, and it has been 
filed four years ago. So that lets me believe the feature is not 
important at all. Hence I am probably doing something the wrong way and 
  there is an easy workaround for tracking changes in resource names and 
directories.

The question is, what does the workaround look like?

Otherwise this would mean that all svn users don't use branches and 
merge automagically. Or they don't do any structural changes, besides 
adding new files.

Or don't I get it?

Cheers,
Mariano

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

Re: Can subversion track structural changes? In different copies? And merge them?

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/7/06, Mariano Kamp <ma...@acm.org> wrote:
> Hi,
>
>   please consider the following scenario. A file in trunk is renamed,
> but in a branch changes to the same file are also made.
> Here in more detail:
>
>   One developer adds "a.c" in the trunk and commits (r1). Another
> developer needs to make a fix to "a.c" and creates a branch "fixing"
> (r2), checks it out, marks the start with a tag "start-fixing" (r3) and
> also marks the end with "stop-fixing" (r5). Between those tags he
> changes the contents of "a.c" in the branch and commits (r4).
>
>   At the same time somebody changes the name of "a.c" to "b.c" in the
> trunk and commits (r6).
>
>   So how to get the changes from the branch"fixing" back to the trunk?
> I tried to merge from the HEAD of trunk and branch "fixing". That
> resulted in an error that "a.c" is not known. I am not sure why this is,
> as svn knows from what point on the branch was created, doesn't it?
>
>   I then tried to check out a new working copy of the trunk with (r1),
> i.e. before the new branch "fixing" was created. I then merged
> start-fixing and stop-fixing in the trunk ("svn merge [..]start-fixing
> stop-fixing[..] .").
> That worked ok. The changes from the "fixing" branch are now in my local
> copy, but I still need the remaining trunk changes. So I tried to merge
> with HEAD, also tried to get to the HEAD by using update. Both didn't
> work as expected and I have "a.c" and "b.c".
>
>   What is the proper way to do that or can't I track structural changes
> in subversion, when using more than the trunk?

This is issue 898: Implement true renames. Because renames are
currently implemented as a Copy+Delete, it's not possible to determine
whether a file stems from a Copy or Rename operation.

>   I am really at a loss here, can somebody open my eyes please? ;-)


HTH,

Erik.

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