[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Regression: Branch from working copy with modified files

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2007-03-18 16:27:12 CET

Norbert Unterberg wrote:
> Stefan,
>
> thank you for taking the time. I think I sort of found out what happend:
> See below.
>
> 2007/3/16, Stefan Küng <tortoisesvn@gmail.com>:
>
>> Norbert Unterberg wrote:
>> > I have to warm up a very old issue, because it seemed to have slipped
>> > back in into TSVN. You can not merge or show the differences in a
>> > revision where a branch was created. But this feature is required when
>> > you modify your WC and then create a branch from the modified working
>> > copy
> [...]
>
>> > Here is the reproduction recipe, which still works unmodified to show
>> > the problem:
>> > http://svn.haxx.se/tsvn/archive-2005-08/0133.shtml
>> >
>> > And the problem again applies to both the show log dialog and the merge
>> > dialog.
>>
>> Unfortunately, I don't think this time I can fix it.
>> The problem here is a little bit complicated:
>>
>> When you create a copy from your working copy, Subversion creates a new
>> revision in the repository. If you now want to show a diff between the
>> new revision and the revision before, you'll get an error. The reason is
>> that the copy you've created didn't exist in a previous revision.
>>
>> If you would have created a copy from e.g. the trunk or some other url
>> instead of the working copy, Subversion would add copy-from information
>> so it knows where the copy came from. That's why the diffing works if
>> you create e.g. a tag/branch from trunk and not your working copy.
>>
>> If we really wanted to show the diff, we would have to know which url
>> your working copy was at when you copied it. But Subversion doesn't
>> store that information (anymore? - don't know if it ever did, but I
>> guess there must have been some changes there because as you noted, it
>> worked some time in the past).
>
> Subversion still records all this information, it is one of the main
> features of Subversion (history tracking across renames, copies and
> moves). The change in Subversion is that it follows this history more
> strict than before.
>
> Taking my reproduction script, the branch was created from a modified
> WC at r2, creating r4. r3 has already been commit from a different WC
> for the same trunk. So the files in the branch skipped r3, this exact
> version really did not exist in r3. Therefore a merge from r3 fails,
> but a merge from r2 succeeds:
>
> C:\xx\wc>svn merge -r3:4 file:///c:/xx/repo/branches/test
> svn: Unable to find repository location for
> 'file:///c:/xx/repo/branches/test' in revision 3
>
> C:\xx\wc>svn merge -r2:4 file:///c:/xx/repo/branches/test
> G dir1\test2.txt
>
> A log on the branch actually reveals that the branch was created from r2:
>
> C:\xx\wc>svn log -v -r4 file:///c:/xx/repo/branches/test
> ------------------------------------------------------------------------
> r4 | Norbert | 2007-03-17 16:13:54 +0100 (Sa, 17 Mrz 2007) | 1 line
> Changed paths:
> A /branches/test (from /trunk:2)
> M /branches/test/dir1/test2.txt
>
> You see, the changeset before r4 is not r3 but r2, and subversion has
> actually recorded that information. Do you think you can somehow use
> that information to improve TortoiseSVN's log and merge functions?
>
> If I manually set the "From Revision" in the merge dialog to 2 then
> the merge also succeeds in TSVN. But the problem remains in the Log
> dialog because I can not manually select the "from revision" when
> double clicking on a line with a changed file.

This may be related to SVN issue 2496 which appeared in 1.3.x. ATM none
of the SVN developers has the time or inclination to look into it.

http://subversion.tigris.org/issues/show_bug.cgi?id=2496

Simon

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Mar 18 16:47:17 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.