diff options
-rw-r--r-- | RepSys/commands/co.py | 2 | ||||
-rw-r--r-- | RepSys/rpmutil.py | 9 | ||||
-rw-r--r-- | RepSys/svn.py | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/RepSys/commands/co.py b/RepSys/commands/co.py index f2b4d64..693897a 100644 --- a/RepSys/commands/co.py +++ b/RepSys/commands/co.py @@ -23,7 +23,7 @@ def parse_options(): opts, args = parser.parse_args() if len(args) not in (1, 2): raise Error, "invalid arguments" - opts.pkgdirurl = default_parent(args[0]) + opts.pkgdirurl = args[0] if len(args) == 2: opts.path = args[1] else: diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py index 40aa4fe..a74f266 100644 --- a/RepSys/rpmutil.py +++ b/RepSys/rpmutil.py @@ -6,6 +6,7 @@ from RepSys.simplerpm import SRPM from RepSys.log import specfile_svn2rpm from RepSys.util import execcmd import pysvn +from RepSys.command import default_parent import rpm import tempfile import shutil @@ -360,13 +361,17 @@ def check_changed(pkgdirurl, all=0, show=0, verbose=0): "nopristine": nopristine} def checkout(pkgdirurl, path=None, revision=None): - svn = SVN() + o_pkgdirurl = pkgdirurl + pkgdirurl = default_parent(o_pkgdirurl) current = os.path.join(pkgdirurl, "current") if path is None: _, path = os.path.split(pkgdirurl) - if mirror.enabled(): + # if default_parent changed the URL, we can use mirrors because the + # user did not provided complete package URL + if (o_pkgdirurl != pkgdirurl) and mirror.enabled(): current = mirror.checkout_url(current) print "checking out from mirror", current + svn = SVN() svn.checkout(current, path, revision=SVN.makerev(revision), show=1) def _getpkgtopdir(basedir=None): diff --git a/RepSys/svn.py b/RepSys/svn.py index 575651f..8589c4a 100644 --- a/RepSys/svn.py +++ b/RepSys/svn.py @@ -161,7 +161,7 @@ class SVN: # add one keywork "silent" that workaround the strange behavior of # pysvn's get_all, which seems to be broken, this way we also have # the same interface of svn.py from repsys 1.6.x - meth = self._cllient_wrap("status") + meth = self._client_wrap("status") silent = kwargs.pop("silent", None) st = meth(*args, **kwargs) if silent: |