diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-01-12 23:55:25 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-01-12 23:55:25 +0000 |
commit | 7ae1a3b117c439210bd02fd7daaaa000d1cc754a (patch) | |
tree | 779c4735b791e8afb377fdc248e16242a70780c5 /MgaRepo/svn.py | |
parent | 51b002a2369d9f67348b4c2d410567918c94f691 (diff) | |
download | mgarepo-7ae1a3b117c439210bd02fd7daaaa000d1cc754a.tar mgarepo-7ae1a3b117c439210bd02fd7daaaa000d1cc754a.tar.gz mgarepo-7ae1a3b117c439210bd02fd7daaaa000d1cc754a.tar.bz2 mgarepo-7ae1a3b117c439210bd02fd7daaaa000d1cc754a.tar.xz mgarepo-7ae1a3b117c439210bd02fd7daaaa000d1cc754a.zip |
only append '@' to the path if it contains '@' or it causes problems for some paths such as '.'
Diffstat (limited to 'MgaRepo/svn.py')
-rw-r--r-- | MgaRepo/svn.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/MgaRepo/svn.py b/MgaRepo/svn.py index d44d7f2..b0ed193 100644 --- a/MgaRepo/svn.py +++ b/MgaRepo/svn.py @@ -109,24 +109,24 @@ class SVN: cmd_args.append("-r '%s'" % ret) def add(self, path, **kwargs): - cmd = ["add", path + '@'] + cmd = ["add", path + '@' if '@' in path else path] return self._execsvn_success(noauth=1, *cmd, **kwargs) def copy(self, pathfrom, pathto, **kwargs): - cmd = ["copy", pathfrom + '@', pathto + '@'] + cmd = ["copy", pathfrom + '@' if '@' in pathfrom else pathfrom, pathto + '@' if '@' in pathto else pathto] self._add_revision(cmd, kwargs, optional=1) self._add_log(cmd, kwargs) return self._execsvn_success(*cmd, **kwargs) def remove(self, path, force=0, **kwargs): - cmd = ["remove", path + '@'] + cmd = ["remove", path + '@' if '@' in path else path] self._add_log(cmd, kwargs) if force: cmd.append("--force") return self._execsvn_success(*cmd, **kwargs) def mkdir(self, path, **kwargs): - cmd = ["mkdir", path + '@'] + cmd = ["mkdir", path + '@' if '@' in path else path] if kwargs.get("parents"): cmd.append("--parents") self._add_log(cmd, kwargs) @@ -140,7 +140,7 @@ class SVN: return int(rawrev) def commit(self, path, **kwargs): - cmd = ["commit", path + '@'] + cmd = ["commit", path + '@' if '@' in path else path] if kwargs.get("nonrecursive"): cmd.append("-N") self._add_log(cmd, kwargs) @@ -181,7 +181,7 @@ class SVN: return self._execsvn_success(local=True, show=True, *cmd, **kwargs) def revision(self, path, **kwargs): - cmd = ["info", path + '@'] + cmd = ["info", path + '@' if '@' in path else path] status, output = self._execsvn(local=True, *cmd, **kwargs) if status == 0: for line in output.splitlines(): @@ -190,7 +190,7 @@ class SVN: return None def info(self, path, **kwargs): - cmd = ["info", path + '@'] + cmd = ["info", path + '@' if '@' in path else path] status, output = self._execsvn(local=True, noerror=True, *cmd, **kwargs) if "Not a versioned resource" not in output: return output.splitlines() @@ -205,14 +205,14 @@ class SVN: return info def ls(self, path, **kwargs): - cmd = ["ls", path + '@'] + cmd = ["ls", path + '@' if '@' in path else path] status, output = self._execsvn(*cmd, **kwargs) if status == 0: return output.split() return None def status(self, path, **kwargs): - cmd = ["status", path + '@'] + cmd = ["status", path + '@' if '@' in path else path] if kwargs.get("verbose"): cmd.append("-v") if kwargs.get("noignore"): @@ -225,11 +225,11 @@ class SVN: return None def cleanup(self, path, **kwargs): - cmd = ["cleanup", path + '@'] + cmd = ["cleanup", path + '@' if '@' in path else path] return self._execsvn_success(*cmd, **kwargs) def revert(self, path, **kwargs): - cmd = ["revert", path + '@'] + cmd = ["revert", path + '@' if '@' in path else path] status, output = self._execsvn(*cmd, **kwargs) if status == 0: return [x.split() for x in output.split()] @@ -249,7 +249,7 @@ class SVN: return self._execsvn_success(*cmd, **kwargs) def update(self, path, **kwargs): - cmd = ["update", path + '@'] + cmd = ["update", path + '@' if '@' in path else path] self._add_revision(cmd, kwargs, optional=1) status, output = self._execsvn(*cmd, **kwargs) if status == 0: |