aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/svn.py
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2007-05-02 19:41:47 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2007-05-02 19:41:47 +0000
commit2e0c7def5895fea29177718abb690b75bc21695e (patch)
treeb07f8b5bb67d29037656ed7a2341b202dfcfb0a3 /RepSys/svn.py
parenta0db56024d803cbe112ce31d8de2aa2701a5d79c (diff)
downloadmgarepo-2e0c7def5895fea29177718abb690b75bc21695e.tar
mgarepo-2e0c7def5895fea29177718abb690b75bc21695e.tar.gz
mgarepo-2e0c7def5895fea29177718abb690b75bc21695e.tar.bz2
mgarepo-2e0c7def5895fea29177718abb690b75bc21695e.tar.xz
mgarepo-2e0c7def5895fea29177718abb690b75bc21695e.zip
Added initial support to mirrors, as requested by mrl.
It was added an option "mirror" to repsys.conf, that will contain an URL to the mirror repository. Also added the subcommand "ci", which will relocate one working copy to the master repository before effectively commiting.
Diffstat (limited to 'RepSys/svn.py')
-rw-r--r--RepSys/svn.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/RepSys/svn.py b/RepSys/svn.py
index 4e073dc..a13db8b 100644
--- a/RepSys/svn.py
+++ b/RepSys/svn.py
@@ -169,6 +169,12 @@ class SVN:
if status == 0:
return output.splitlines()
return None
+
+ def info2(self, *args, **kwargs):
+ lines = self.info(*args, **kwargs)
+ pairs = [[w.strip() for w in line.split(":", 1)] for line in lines]
+ info = dict(pairs)
+ return info
def ls(self, path, **kwargs):
cmd = ["ls", path]
@@ -197,6 +203,19 @@ class SVN:
return [x.split() for x in output.split()]
return None
+ def switch(self, url, oldurl=None, path=None, relocate=False, **kwargs):
+ cmd = ["switch"]
+ if relocate:
+ if oldurl is None:
+ raise Error, "You must supply the old URL when "\
+ "relocating working copies"
+ cmd.append("--relocate")
+ cmd.append(oldurl)
+ cmd.append(url)
+ if path is not None:
+ cmd.append(path)
+ return self._execsvn_success(*cmd, **kwargs)
+
def update(self, path, **kwargs):
cmd = ["update", path]
self._add_revision(cmd, kwargs, optional=1)