From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 71E36138010 for ; Mon, 8 Oct 2012 06:16:42 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B9D1E01C9; Mon, 8 Oct 2012 06:16:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EA801E01C9 for ; Mon, 8 Oct 2012 06:16:33 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CB76F33C235 for ; Mon, 8 Oct 2012 06:16:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 66685E5436 for ; Mon, 8 Oct 2012 06:16:30 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1349676951.729923d4a2d5a22f6509de438953ef6035d38e20.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/overlays/ X-VCS-Repository: proj/layman X-VCS-Files: layman/overlays/bzr.py layman/overlays/darcs.py layman/overlays/git.py layman/overlays/mercurial.py layman/overlays/svn.py X-VCS-Directories: layman/overlays/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 729923d4a2d5a22f6509de438953ef6035d38e20 X-VCS-Branch: master Date: Mon, 8 Oct 2012 06:16:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 119d1b2d-7086-4ba8-99d9-ada6c2c951a8 X-Archives-Hash: 25054721d574ee50f650bf70d9690acf commit: 729923d4a2d5a22f6509de438953ef6035d38e20 Author: Brian Dolbec gentoo org> AuthorDate: Mon Oct 8 06:15:51 2012 +0000 Commit: Brian Dolbec gmail com> CommitDate: Mon Oct 8 06:15:51 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=729923d4 Fix bug 372583. Don't add redundant trailing slashes on src uri's where trailing slashes are required. --- layman/overlays/bzr.py | 9 +++++++-- layman/overlays/darcs.py | 9 +++++++-- layman/overlays/git.py | 5 ++++- layman/overlays/mercurial.py | 9 +++++++-- layman/overlays/svn.py | 8 +++++++- 5 files changed, 32 insertions(+), 8 deletions(-) diff --git a/layman/overlays/bzr.py b/layman/overlays/bzr.py index fb1fb24..5bda251 100644 --- a/layman/overlays/bzr.py +++ b/layman/overlays/bzr.py @@ -56,12 +56,17 @@ class BzrOverlay(OverlaySource): cfg_opts = self.config["bzr_addopts"] target = path([base, self.parent.name]) + if self.src.endswith("/"): + src = self.src + else: + src = self.src + '/' + # bzr get SOURCE TARGET if len(cfg_opts): args = ['branch', cfg_opts, - self.src + '/', target] + src, target] else: - args = ['branch', self.src + '/', target] + args = ['branch', src, target] return self.postsync( self.run_command(self.command(), args, cmd=self.type), cwd=target) diff --git a/layman/overlays/darcs.py b/layman/overlays/darcs.py index d3eec6a..634681b 100644 --- a/layman/overlays/darcs.py +++ b/layman/overlays/darcs.py @@ -55,13 +55,18 @@ class DarcsOverlay(OverlaySource): cfg_opts = self.config["darcs_addopts"] target = path([base, self.parent.name]) + if self.src.endswith("/"): + src = self.src + else: + src = self.src + '/' + # darcs get --partial SOURCE TARGET if len(cfg_opts): args = ['get', '--partial', cfg_opts, - self.src + '/', target] + src, target] else: args = ['get', '--partial', - self.src + '/', target] + src, target] return self.postsync( self.run_command(self.command(), args, cmd=self.type), diff --git a/layman/overlays/git.py b/layman/overlays/git.py index e15f26d..81e650c 100644 --- a/layman/overlays/git.py +++ b/layman/overlays/git.py @@ -53,7 +53,10 @@ class GitOverlay(OverlaySource): def fix_git_source(source): # http:// should get trailing slash, other protocols shouldn't if source.split(':')[0] == 'http': - return source + '/' + if source.endswith('/'): + return source + else: + return source + '/' return source cfg_opts = self.config["git_addopts"] diff --git a/layman/overlays/mercurial.py b/layman/overlays/mercurial.py index 0d8250e..5034993 100644 --- a/layman/overlays/mercurial.py +++ b/layman/overlays/mercurial.py @@ -56,11 +56,16 @@ class MercurialOverlay(OverlaySource): cfg_opts = self.config["mercurial_addopts"] target = path([base, self.parent.name]) + if self.src.endswith("/"): + src = self.src + else: + src = self.src + '/' + # hg clone SOURCE TARGET if len(cfg_opts): - args = ['clone', cfg_opts, self.src + '/', target] + args = ['clone', cfg_opts, src, target] else: - args = ['clone', self.src + '/', target] + args = ['clone', src, target] return self.postsync( self.run_command(self.command(), args, cmd=self.type), diff --git a/layman/overlays/svn.py b/layman/overlays/svn.py index 9785025..4804925 100644 --- a/layman/overlays/svn.py +++ b/layman/overlays/svn.py @@ -67,7 +67,13 @@ class SvnOverlay(OverlaySource): args.append('-q') if len(cfg_opts): args.append(cfg_opts) - args.append(self.src + '/@') + + if self.src.endswith("/"): + src = self.src + '@' + else: + src = self.src + '/@' + + args.append(src) args.append(self.target) return self.postsync(