On Oct 8, 2008, at 2:34 PM, Wilfredo Sánchez Vega wrote:
> Is there a reason why we don't want to leave the Name: case in
> there for older versions rather than requiring an upgrade to 1.5? I
> guess this is a server-side thing, so it's not a big deal, but it
> seems easy to keep compatibility in place there.
The patch below should work on both 1.5 and pre-1.5.
-wsv
Index: contrib/hook-scripts/enforcer/enforcer
===================================================================
--- contrib/hook-scripts/enforcer/enforcer (revision 33559)
+++ contrib/hook-scripts/enforcer/enforcer (working copy)
@@ -412,15 +412,27 @@
continue
if state is 31: # Expecting property name (follows bar)
- assert line.startswith("Name: ")
+ for label in (
+ "Name", # svn versions < 1.5
+ "Added", "Modified", "Deleted" # svn versions >= 1.5
+ ):
+ if line.startswith(label + " :"):
+ break
+ else:
+ raise AssertionError("Unexpected property name line:
%r" % line)
+
state = 300
# Fall through to state 300
if state is 300:
- if line.startswith("Name: "):
- current_property = line[6:]
- current_verify_property_function = None
- continue
+ for label in (
+ "Name", # svn versions < 1.5
+ "Added", "Modified", "Deleted" # svn versions >= 1.5
+ ):
+ if line.startswith(label + ": "):
+ current_property = line[len(label)+2:]
+ current_verify_property_function = None
+ continue
for prefix, verify in (
(" - ", verify_property_line_removed),
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-08 23:56:34 CEST