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

AW: duplicate externals cause update error -- thoughts?

From: Markus Schaber <m.schaber_at_codesys.com>
Date: Mon, 19 Nov 2012 07:17:58 +0000

Hi, Neels,

Von: Neels J Hofmeyr [mailto:neels_at_elego.de]
>
> I've created a check during 'svn propset' that refuses to save
> svn:externals props that contain the same target more than once. The
> result is an error, same as with any other externals format violations.
> (#4227)
>
> Turns out the same parsing code is (obviously) run during update. So in
> the externals phase of the update, the update will bail if the server
> sends an svn:externals with duplicate targets.
>
> Is that bad? Is that good?
>
> The standard update will complete. Only updates of the externals items
> will interrupt. (And the other entries of that svn:externals prop will not
> be handled until a later 'svn up'.)
>
> Subsequently, the prop can be edited and the duplicate removed; an update
> after that will complete the update properly. In short, it works just like
> any other svn:externals format error that happens to come in from the
> repos.
>
> At first I thought I would need to disable the dup check for update, i.e.
> only enable it for the actual propset/propedit invocations. But now that I
> realized the error is recoverable, I think an error message is not that
> bad at all. Like this you are told that your external will be ambiguous
> and it will not update externals unless you fixed it.
>
> Another possibility is to simply print a warning and not bail...
>
> (All of this is just about duplicates within one single svn:externals prop)
>
> I'm not sure which way to go, so thanks for any thoughts.

Could you give a flag to the parsing code whether it should error or just warn on that issue?

So on an update, we can use the warning, while the code can error out on propset/propedit.

And (of course), for backwards compatibility, the behavior in case of an collision should resemble the old behavior (which of the two entries wins...)

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 internet 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>
Received on 2012-11-19 08:19:27 CET

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

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