« Return to Thread: svn entry property

Re: svn entry property

by Normen Müller-3 :: Rate this Message:

Reply to Author | View in Thread

This one is even nicer ;-)

Index:
/home/nmueller/svnkit/trunk/svnkit/src/org/tmatesoft/svn/core/wc/SVNWCClient.java
===================================================================
---
/home/nmueller/svnkit/trunk/svnkit/src/org/tmatesoft/svn/core/wc/SVNWCClient.java    
(revision 1431)
+++
/home/nmueller/svnkit/trunk/svnkit/src/org/tmatesoft/svn/core/wc/SVNWCClient.java    
(working copy)
@@ -728,7 +728,9 @@
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_REVISION_AUTHOR_CONTAINS_NEWLINE,
"Value will not be set unless forced");
             SVNErrorManager.error(err);
         }
-        if (propName.startsWith(SVNProperty.SVN_WC_PREFIX)) {
+        // nmueller: start
+        if (SVNProperty.isWorkingCopyProperty(propName)) {
+        // nmueller: end
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "''{0}'' is a
wcprop , thus not accessible to clients", propName);
             SVNErrorManager.error(err);
         }
@@ -733,7 +735,7 @@
             SVNErrorManager.error(err);
         }
         // nmueller: start
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) {
+        if (SVNProperty.isEntryProperty(propName)) {
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "Property
''{0}'' is an entry property", propName);
             SVNErrorManager.error(err);
         }
@@ -877,7 +879,9 @@
 
     public void doGetPropertyList(File path, String propName,
SVNRevision pegRevision, SVNRevision revision,
             SVNDepth depth, ISVNPropertyHandler handler, Collection
changeLists) throws SVNException {
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_WC_PREFIX)) {
+        // nmueller: start
+        if (SVNProperty.isWorkingCopyProperty(propName)) {
+        // nmueller: end
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME,
                     "''{0}'' is a wcprop , thus not accessible to
clients", propName);
             SVNErrorManager.error(err);
@@ -883,7 +887,7 @@
             SVNErrorManager.error(err);
         }
         // nmueller: start
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) {
+        if (SVNProperty.isEntryProperty(propName)) {
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME,
                     "Property ''{0}'' is an entry property", propName);
             SVNErrorManager.error(err);
@@ -941,7 +945,9 @@
 
     public void doGetProperty(File path, String propName, SVNRevision
pegRevision, SVNRevision revision,
             SVNDepth depth, ISVNPropertyHandler handler, Collection
changeLists) throws SVNException {
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_WC_PREFIX)) {
+        // nmueller: start
+        if (SVNProperty.isWorkingCopyProperty(propName)) {
+        // nmueller: end
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME,
                     "''{0}'' is a wcprop , thus not accessible to
clients", propName);
             SVNErrorManager.error(err);
@@ -947,7 +953,7 @@
             SVNErrorManager.error(err);
         }
         // nmueller: start
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) {
+        if (SVNProperty.isEntryProperty(propName)) {
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME,
                     "Property ''{0}'' is an entry property", propName);
             SVNErrorManager.error(err);
@@ -1003,7 +1009,9 @@
     }
 
     public void doGetProperty(SVNURL url, String propName, SVNRevision
pegRevision, SVNRevision revision, SVNDepth depth, ISVNPropertyHandler
handler) throws SVNException {
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_WC_PREFIX)) {
+        // nmueller: start
+        if (SVNProperty.isWorkingCopyProperty(propName)) {
+        // nmueller: end
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "''{0}'' is a
wcprop , thus not accessible to clients", propName);
             SVNErrorManager.error(err);
         }
@@ -1008,7 +1016,7 @@
             SVNErrorManager.error(err);
         }
         // nmueller: start
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) {
+        if (SVNProperty.isEntryProperty(propName)) {
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "Property
''{0}'' is an entry property", propName);
             SVNErrorManager.error(err);
         }
@@ -1044,7 +1052,9 @@
      * @see
#doSetRevisionProperty(File,SVNRevision,String,String,boolean,ISVNPropertyHandler)
      */
     public void doGetRevisionProperty(File path, String propName,
SVNRevision revision, ISVNPropertyHandler handler) throws SVNException {
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_WC_PREFIX)) {
+        // nmueller: start
+        if (SVNProperty.isWorkingCopyProperty(propName)) {
+        // nmueller: end
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "''{0}'' is a
wcprop , thus not accessible to clients", propName);
             SVNErrorManager.error(err);
         }
@@ -1049,7 +1059,7 @@
             SVNErrorManager.error(err);
         }
         // nmueller: start
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) {
+        if (SVNProperty.isEntryProperty(propName)) {
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "Property
''{0}'' is an entry property", propName);
             SVNErrorManager.error(err);
         }
@@ -1087,7 +1097,9 @@
      * @see
#doSetRevisionProperty(SVNURL,SVNRevision,String,String,boolean,ISVNPropertyHandler)
      */
     public long doGetRevisionProperty(SVNURL url, String propName,
SVNRevision revision, ISVNPropertyHandler handler) throws SVNException {
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_WC_PREFIX)) {
+        // nmueller: start
+        if (SVNProperty.isWorkingCopyProperty(propName)) {
+        // nmueller: end
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "''{0}'' is a
wcprop , thus not accessible to clients", propName);
             SVNErrorManager.error(err);
         }
@@ -1092,7 +1104,7 @@
             SVNErrorManager.error(err);
         }
         // nmueller: start
-        if (propName != null &&
propName.startsWith(SVNProperty.SVN_ENTRY_PREFIX)) {
+        if (SVNProperty.isEntryProperty(propName)) {
             SVNErrorMessage err =
SVNErrorMessage.create(SVNErrorCode.CLIENT_PROPERTY_NAME, "Property
''{0}'' is an entry property", propName);
             SVNErrorManager.error(err);
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...

 « Return to Thread: svn entry property

LightInTheBox - Buy quality products at wholesale price