You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Markus Schaber <m....@codesys.com> on 2014/06/20 12:35:49 UTC

[Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Hi,

See attached my patch for fixing issue #4395.
http://subversion.tigris.org/issues/show_bug.cgi?id=4395

[[[
Fix issue 4395 by not deleting the format and entries file when we 
upgrade from an 1.7 working copy.

* subversion/libsvn_wc/upgrade.c
  (wipe_obsolete_files): Add a boolean parameter remove_format_entries
    declaring whether we should wipe format and entry files.
  (svn_wc__wipe_postupgrade): Pass TRUE for remove_format_entries to
    keep the old behavior for pre-1.7 working copies.
  (svn_wc__upgrade_sdb): Pass FALSE for remove_format_entries to keep
    the files when upgrading from an 1.7 (or newer) working copy.
]]]


All tests still pass after applying that change, but it seems the change itself is not covered by any tests. Should I add a test case for it? If yes, how to get/create 1.6 and 1.7 working copies within the test suite?


Best regards

Markus Schaber

CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.schaber@codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915


AW: AW: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Posted by Markus Schaber <m....@codesys.com>.
Hi, Julian,

Von: Julian Foad [mailto:julianfoad@btopenworld.com]
> Markus Schaber wrote:
> 
> > Second iteration of my patch for fixing issue #4395.
> > http://subversion.tigris.org/issues/show_bug.cgi?id=4395
> 
> The issue report is unclear. What are the 'from' and 'to' versions
> meant to be? Is the repro recipe  meant to check out with 1.6 and
> then upgrade to 1.7? As written it appears to check out with 1.7 and
> upgrade to ... unspecified.

I can reproduce the bug when upgrading an 1.7 WC using trunk.

The bug report states version 1.8.x, so I strongly guess 1.8.x is also affected. (I don't have an 1.8 version lying around right now...)

Upgrading from 1.6.x or older seems to work fine, but nevertheless, I did add test coverage for 1.4, 1.5 and 1.6 format working copies in addition to 1.7.

> Is this fix intended for all of: 1.7, 1.8 and trunk?

I primarily intended it for trunk, but I won't object backporting it.


Best regards

Markus Schaber

CODESYS® a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.schaber@codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

> 
> - Julian
> 
> 
> > The fix itself is actually unchanged, but I added a test case which
> > upgrades some working copies of different formats and checks
> whether
> > the "format" and "entries" files are present and correct.
> >
> > [[[
> > Fix issue 4395 by not deleting the format and entries file when we
> > upgrade from an 1.7 working copy.
> >
> > * subversion/libsvn_wc/upgrade.c
> >   (wipe_obsolete_files): Add a boolean parameter
> remove_format_entries
> >     declaring whether we should wipe format and entry files.
> >   (svn_wc__wipe_postupgrade): Pass TRUE for remove_format_entries
> to
> >     keep the old behavior for pre-1.7 working copies.
> >   (svn_wc__upgrade_sdb): Pass FALSE for remove_format_entries to
> keep
> >     the files when upgrading from an 1.7 (or newer) working copy.
> >
> > * subversion/tests/cmdline/upgrade_tests.py
> >   (upgrade_dropped_status_entries_files): Add a new test case to
> check
> >     that the "entries" and "format" files are retained during
> upgrade.
> > ]]]

Re: AW: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Posted by Julian Foad <ju...@btopenworld.com>.
Daniel Shahaf wrote:
> Julian Foad wrote on Fri, Jun 20, 2014 at 16:39:21 +0100:
>> Markus Schaber wrote:
>>> Second iteration of my patch for fixing issue #4395.
>>> http://subversion.tigris.org/issues/show_bug.cgi?id=4395
>> 
>> The issue report is unclear. What are the 'from' and 'to' versions
>> meant to be? Is the repro recipe  meant to check out with 1.6 and then
>> upgrade to 1.7? As written it appears to check out with 1.7 and
>> upgrade to ... unspecified.
> 
> The 'from' is 1.7.10 and the 'to' is 1.8.x.
> 
> The 'from' is explicitly spelled out in #desc1.  The 'to' is, indeed,
> not spelled out in #desc1; however, the "Version:" metadata field
> includes that information.

Ok, thanks. I was confused because I was focusing on the summary and description which both mention 1.6 clients explicitly, and I didn't notice the "found in: 1.8.x".

- Julian


Re: AW: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Shahaf wrote on Sat, Jun 21, 2014 at 13:34:23 +0000:
> Perhaps I shouldn't rely on metadata fields for anything important.

Sorry, didn't mean to sound accusing.  I was just thinking aloud about
what might have been a better way to present the information in the bug
report.

Daniel

> Sometimes I link to threads by setting the URL field to an archives
> link; I guess those links might be getting overlooked sometimes, too.

Re: AW: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Julian Foad wrote on Fri, Jun 20, 2014 at 16:39:21 +0100:
> Markus Schaber wrote:
> 
> > Second iteration of my patch for fixing issue #4395.
> > http://subversion.tigris.org/issues/show_bug.cgi?id=4395
> 
> The issue report is unclear. What are the 'from' and 'to' versions
> meant to be? Is the repro recipe  meant to check out with 1.6 and then
> upgrade to 1.7? As written it appears to check out with 1.7 and
> upgrade to ... unspecified.

The 'from' is 1.7.10 and the 'to' is 1.8.x.

The 'from' is explicitly spelled out in #desc1.  The 'to' is, indeed,
not spelled out in #desc1; however, the "Version:" metadata field
includes that information.

Perhaps I shouldn't rely on metadata fields for anything important.
Sometimes I link to threads by setting the URL field to an archives
link; I guess those links might be getting overlooked sometimes, too.

Re: AW: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Posted by Julian Foad <ju...@btopenworld.com>.
Markus Schaber wrote:

> Second iteration of my patch for fixing issue #4395.
> http://subversion.tigris.org/issues/show_bug.cgi?id=4395

The issue report is unclear. What are the 'from' and 'to' versions meant to be? Is the repro recipe  meant to check out with 1.6 and then upgrade to 1.7? As written it appears to check out with 1.7 and upgrade to ... unspecified.

Is this fix intended for all of: 1.7, 1.8 and trunk?

- Julian


> The fix itself is actually unchanged, but I added a test case
> which upgrades some working copies of different formats and
> checks whether the "format" and "entries" files are present
> and correct.
> 
> [[[
> Fix issue 4395 by not deleting the format and entries file when we 
> upgrade from an 1.7 working copy.
> 
> * subversion/libsvn_wc/upgrade.c
>   (wipe_obsolete_files): Add a boolean parameter remove_format_entries
>     declaring whether we should wipe format and entry files.
>   (svn_wc__wipe_postupgrade): Pass TRUE for remove_format_entries to
>     keep the old behavior for pre-1.7 working copies.
>   (svn_wc__upgrade_sdb): Pass FALSE for remove_format_entries to keep
>     the files when upgrading from an 1.7 (or newer) working copy.
> 
> * subversion/tests/cmdline/upgrade_tests.py
>   (upgrade_dropped_status_entries_files): Add a new test case to check
>     that the "entries" and "format" files are retained 
> during upgrade.
> ]]]

AW: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client format files

Posted by Markus Schaber <m....@codesys.com>.
Hi,

Second iteration of my patch for fixing issue #4395.
http://subversion.tigris.org/issues/show_bug.cgi?id=4395

The fix itself is actually unchanged, but I added a test case
which upgrades some working copies of different formats and
checks whether the "format" and "entries" files are present
and correct.

[[[
Fix issue 4395 by not deleting the format and entries file when we 
upgrade from an 1.7 working copy.

* subversion/libsvn_wc/upgrade.c
  (wipe_obsolete_files): Add a boolean parameter remove_format_entries
    declaring whether we should wipe format and entry files.
  (svn_wc__wipe_postupgrade): Pass TRUE for remove_format_entries to
    keep the old behavior for pre-1.7 working copies.
  (svn_wc__upgrade_sdb): Pass FALSE for remove_format_entries to keep
    the files when upgrading from an 1.7 (or newer) working copy.

* subversion/tests/cmdline/upgrade_tests.py
  (upgrade_dropped_status_entries_files): Add a new test case to check
    that the "entries" and "format" files are retained during upgrade.
]]]

Best regards

Markus Schaber

CODESYS® a trademark of 3S-Smart Software Solutions GmbH

Inspiring Automation Solutions

3S-Smart Software Solutions GmbH
Dipl.-Inf. Markus Schaber | Product Development Core Technology
Memminger Str. 151 | 87439 Kempten | Germany
Tel. +49-831-54031-979 | Fax +49-831-54031-50

E-Mail: m.schaber@codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com
CODESYS forum: http://forum.codesys.com

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

> -----Ursprüngliche Nachricht-----
> Von: Markus Schaber [mailto:m.schaber@codesys.com]
> Gesendet: Freitag, 20. Juni 2014 12:36
> An: Subversion Dev (dev@subversion.apache.org)
> Betreff: [Patch] Fix for Issue #4395: 'svn upgrade' loses 1.6-client
> format files
> 
> Hi,
> 
> See attached my patch for fixing issue #4395.
> http://subversion.tigris.org/issues/show_bug.cgi?id=4395
> 
> [[[
> Fix issue 4395 by not deleting the format and entries file when we
> upgrade from an 1.7 working copy.
> 
> * subversion/libsvn_wc/upgrade.c
>   (wipe_obsolete_files): Add a boolean parameter
> remove_format_entries
>     declaring whether we should wipe format and entry files.
>   (svn_wc__wipe_postupgrade): Pass TRUE for remove_format_entries to
>     keep the old behavior for pre-1.7 working copies.
>   (svn_wc__upgrade_sdb): Pass FALSE for remove_format_entries to keep
>     the files when upgrading from an 1.7 (or newer) working copy.
> ]]]
> 
> 
> All tests still pass after applying that change, but it seems the
> change itself is not covered by any tests. Should I add a test case
> for it? If yes, how to get/create 1.6 and 1.7 working copies within
> the test suite?
> 
> 
> Best regards
> 
> Markus Schaber
> 
> CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH
> 
> Inspiring Automation Solutions
> 
> 3S-Smart Software Solutions GmbH
> Dipl.-Inf. Markus Schaber | Product Development Core Technology
> Memminger Str. 151 | 87439 Kempten | Germany Tel. +49-831-54031-979 |
> Fax +49-831-54031-50
> 
> E-Mail: m.schaber@codesys.com | Web: http://www.codesys.com | CODESYS
> store: http://store.codesys.com CODESYS forum:
> http://forum.codesys.com
> 
> Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
> Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915