Commits

ronvoe committed f7273d0

Removed trailing whitespaces.

Comments (0)

Files changed (1)

              return self.svn_url
          assert path[0] != '/', path
          return '/'.join((self.svn_url, urllib.quote(path).rstrip('/'),))
-+    
++
 +
 +class AutoPropsConfig(object):
 +    """Provides the subversion auto-props functionality
          return '/'.join((self.svn_url,
                           urllib.quote(path).rstrip('/'),
                           ))
-+	
++
 +def my_svn_config_get_config(path):
 +    """Emulates core.svn_config_get_config,
 +       but returns a Python dictionary instead of an apr_hash_t,
 +       which can't be accessed from Python.
 +
 +       Limitations:
-+       It only returns a svn_config_t for the config-category loaded from 
++       It only returns a svn_config_t for the config-category loaded from
 +       the users subversion configuration and additionally
-+       a ConfigParser of the same config file as 'config2', 
++       a ConfigParser of the same config file as 'config2',
 +       which is required by my_svn_config_enumerate2.
 +    """
 +    config_path = core.svn_config_get_user_config_path(
 +    """
 +    def __init__(self, config_dir=None):
 +        self.config = my_svn_config_get_config(config_dir)
-+   
++
 +    def properties(self, file):
 +        """Returns a dictionary of the auto-props applicable for file.
 +           Takes enable-auto-props into account.
 +
 +        if autoprops_enabled:
 +            baton = {'properties': {}, 'filename': os.path.basename(file)}
-+            my_svn_config_enumerate2( 
-+                self.config['config2'], 'auto-props', 
++            my_svn_config_enumerate2(
++                self.config['config2'], 'auto-props',
 +                autoprops_enumerator, baton )
 +            return baton['properties']
 +        else:
 +        if len(s)>1 and s[0] in ['"', "'"] and s[0]==s[-1]:
 +            return s[1:-1]
 +        return s
-+        
++
 +    properties = {}
 +    for prop in properties_string.split(';'):
 +        match = re.match('([^=]+)(=(.*))*', prop)
-+        if match: 
++        if match:
 +            name, value = match.group(1,3)
 +            name = name.strip()
 +            value = '' if value is None else unquote(value.strip())
 +            self.wc_path)
 +
 +    def test_push_honors_svn_autoprops(self):
-+        self.setup_svn_config( 
++        self.setup_svn_config(
 +            "[miscellany]\n"
 +            "enable-auto-props = yes\n"
 +            "[auto-props]\n"
 +        changes = [ ('test.py', 'test.py', 'echo hallo') ]
 +        self.commitchanges(changes)
 +        self.pushrevisions(True)
-+        prop_val = self.svnlook_propget('test:prop', "trunk/test.py") 
++        prop_val = self.svnlook_propget('test:prop', "trunk/test.py")
 +        self.assertEqual('success', prop_val)
 +
 +    def svnlook_propget( self, property, path ):
 +        return subprocess.Popen([
-+            "svnlook", "propget", self.repo_path, property, path], 
++            "svnlook", "propget", self.repo_path, property, path],
 +            stdout=subprocess.PIPE).communicate()[0]
 +
 +    def setup_svn_config(self, config):
 +        self.config_dir = self.tmpdir
 +
 +    def test_use_autoprops_for_matching_file_when_enabled(self):
-+        self.setup_svn_config( 
++        self.setup_svn_config(
 +            "[miscellany]\n"
 +            "enable-auto-props = yes\n"
 +            "[auto-props]\n"
 +        return svnwrap.AutoPropsConfig(self.config_dir)
 +
 +    def test_ignore_autoprops_when_file_doesnt_match(self):
-+        self.setup_svn_config( 
++        self.setup_svn_config(
 +            "[miscellany]\n"
 +            "enable-auto-props = yes\n"
 +            "[auto-props]\n"
 +        self.assertEqual({}, props)
 +
 +    def test_ignore_autoprops_when_disabled(self):
-+        self.setup_svn_config( 
++        self.setup_svn_config(
 +            "[miscellany]\n"
 +            "#enable-auto-props = yes\n"
 +            "[auto-props]\n"
 +        self.assertEqual({}, props)
 +
 +    def test_combine_properties_of_multiple_matches(self):
-+        self.setup_svn_config( 
++        self.setup_svn_config(
 +            "[miscellany]\n"
 +            "enable-auto-props = yes\n"
 +            "[auto-props]\n"
 +            "*.py = test:prop=success\n"
 +            "test.* = test:prop2=success\n")
 +        props = self.new_autoprops_config().properties('xxx/test.py')
-+        self.assertEqual({ 
++        self.assertEqual({
 +            'test:prop': 'success', 'test:prop2': 'success'}, props)
 +
 +
 +        self.assertEqual({'svn:eol-style': 'native'}, props)
 +
 +    def test_multiple_properties_are_separated_by_semicolon(self):
-+        props = svnwrap.parse_autoprops( 
++        props = svnwrap.parse_autoprops(
 +            "svn:eol-style=native;svn:executable=true\n")
 +        self.assertEqual({
-+            'svn:eol-style': 'native', 
++            'svn:eol-style': 'native',
 +            'svn:executable': 'true'},
 +            props)
 +