Commits

Diego Búrigo Zacarão committed 34638e6

Removed branch requirement from SVN

- Now if no branch is passed to the svn backend it will
consider that the root url already includes it.
- In case a branch is passed, everything works like before.

Comments (0)

Files changed (1)

transifex/vcs/lib/types/svn.py

     # Pysvn is somewhat different from the mercurial and git apis.
     # We have to specify the full path to svn commands in order to work.
 
-    def __init__(self, root, name=None, branch='trunk'):
+    def __init__(self, root, name=None, branch=None):
         # If name isn't given, let's take the last part of the root
         # Eg. root = 'http://example.com/foo/baz' -> name='baz'
         if not name:
     @property
     def remote_path(self):
         """Calculate remote path using the standard svn layout."""
-        if self.branch == u'trunk':
-            repo_path = "%s/trunk" % self.root
+        if self.branch:
+            if self.branch == u'trunk':
+                repo_path = "%s/trunk" % self.root
+            else:
+                repo_path = "%s/branches/%s" % (self.root, self.branch)
+            return repo_path
         else:
-            repo_path = "%s/branches/%s" % (self.root, self.branch)
-        return repo_path
+            return self.root
 
 
     def setup_repo(self):