Chris wrote on Wed, 10 Jan 2018 08:26 +0000:
> I think the fix to svn_apply_autoprops.py should be something like below
> (/subversion/trunk/contrib/client-side/svn_apply_autoprops.py)
> If anyone with commit rights wants to fix it on the repo, feel free to
> use the below, or improve it as necessary (my python knowledge is non-
> existing)
>
> Index: svn_apply_autoprops.py
> ===================================================================
> --- svn_apply_autoprops.py (revision 103617)
> +++ svn_apply_autoprops.py (revision 103618)
> @@ -101,7 +101,11 @@
> # leading and trailing whitespce from the propery names and
> # values.
> props_list = []
> - for prop in props.split(';'):
> + # Since ;; is a separator within one property, we need to do
> + # regex and use both negative lookahead and lookbehind to avoid
> + # ever matching a more than one semicolon in the split
> + semicolonpattern = re.compile("(?<!;);(?!;)")
> + for prop in re.split(semicolonpattern, props):
That's clever, but it will misparse sequences of three or more semicolons in a row, such as
*.foo = key=val;;with;;semicolons;;;anotherkey=anotherval
Daniel
Received on 2018-01-10 20:52:04 CET