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 2576E1393DD for ; Mon, 16 Jun 2014 03:40:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 98580E0B2D; Mon, 16 Jun 2014 03:40:20 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DBE34E0B20 for ; Mon, 16 Jun 2014 03:40:19 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0B4FC33FB4C for ; Mon, 16 Jun 2014 03:40:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id C4DE2187EE for ; Mon, 16 Jun 2014 03:40:17 +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: <1402607509.ef6f5893a333684f3b73e04e486b02b60559c512.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/overlays/ X-VCS-Repository: proj/layman X-VCS-Files: layman/overlays/svn.py X-VCS-Directories: layman/overlays/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: ef6f5893a333684f3b73e04e486b02b60559c512 X-VCS-Branch: master Date: Mon, 16 Jun 2014 03:40:17 +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: 5c94d89c-b19d-4be0-873d-daed4977baf7 X-Archives-Hash: 436fe53e36d6e1257e4e7493218f2dce commit: ef6f5893a333684f3b73e04e486b02b60559c512 Author: Devan Franchini gentoo org> AuthorDate: Mon May 26 22:22:33 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Jun 12 21:11:49 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=ef6f5893 svn.py: Adds update() function Adds _fix_svn_source() function to correct the source url in order to run the svn switch --relocate command. --- layman/overlays/svn.py | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/layman/overlays/svn.py b/layman/overlays/svn.py index 0244dd4..f494eba 100644 --- a/layman/overlays/svn.py +++ b/layman/overlays/svn.py @@ -53,6 +53,18 @@ class SvnOverlay(OverlaySource): parent, config, _location, ignore) self.subpath = None + def _fix_svn_source(self, source): + ''' + Adds @ to all sources that don't already include it. + + @params source: source URL, string. + ''' + if source.endswith("/"): + source = source + '@' + else: + source = source +'/@' + return source + def add(self, base): '''Add overlay.''' @@ -70,11 +82,7 @@ class SvnOverlay(OverlaySource): if len(cfg_opts): args.append(cfg_opts) - if self.src.endswith("/"): - src = self.src + '@' - else: - src = self.src + '/@' - + src = self._fix_svn_source(self.src) args.append(src) args.append(self.target) @@ -82,6 +90,25 @@ class SvnOverlay(OverlaySource): self.run_command(self.command(), args, cmd=self.type), cwd=self.target) + def update(self, base, src): + ''' + Update overlay src-url + + @params base: base location where all overlays are installed. + @params src: source URL. + ''' + + self.output.debug("svn.update(); starting...%s" % self.parent.name, 6) + target = path([base, self.parent.name]) + + # svn switch --relocate + args = ['switch', '--relocate', self._fix_svn_source(self.src), self._fix_svn_source(src)] + + return self.postsync( + self.run_command(self.command(), args, cmd=self.type), + cwd=target) + + def sync(self, base): '''Sync overlay.''' 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 16CC913877A for ; Mon, 16 Jun 2014 03:37:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E6E7E0B86; Mon, 16 Jun 2014 03:37:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 504A5E0B70 for ; Mon, 16 Jun 2014 03:37:30 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6E9CC33FF91 for ; Mon, 16 Jun 2014 03:37:29 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 10872187EE for ; Mon, 16 Jun 2014 03:37:28 +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: <1402607509.ef6f5893a333684f3b73e04e486b02b60559c512.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/overlays/ X-VCS-Repository: proj/layman X-VCS-Files: layman/overlays/svn.py X-VCS-Directories: layman/overlays/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: ef6f5893a333684f3b73e04e486b02b60559c512 X-VCS-Branch: gsoc2014 Date: Mon, 16 Jun 2014 03:37:28 +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: 18698c0d-d6a6-4bb4-8252-b81bd70d52c3 X-Archives-Hash: cc2b8edd481f328f597be7443f1893ba Message-ID: <20140616033728.kaPoNVtWPigVKQM4RgyyCeYgSi-Qgqvj4AzRt9XErn4@z> commit: ef6f5893a333684f3b73e04e486b02b60559c512 Author: Devan Franchini gentoo org> AuthorDate: Mon May 26 22:22:33 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Thu Jun 12 21:11:49 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=ef6f5893 svn.py: Adds update() function Adds _fix_svn_source() function to correct the source url in order to run the svn switch --relocate command. --- layman/overlays/svn.py | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/layman/overlays/svn.py b/layman/overlays/svn.py index 0244dd4..f494eba 100644 --- a/layman/overlays/svn.py +++ b/layman/overlays/svn.py @@ -53,6 +53,18 @@ class SvnOverlay(OverlaySource): parent, config, _location, ignore) self.subpath = None + def _fix_svn_source(self, source): + ''' + Adds @ to all sources that don't already include it. + + @params source: source URL, string. + ''' + if source.endswith("/"): + source = source + '@' + else: + source = source +'/@' + return source + def add(self, base): '''Add overlay.''' @@ -70,11 +82,7 @@ class SvnOverlay(OverlaySource): if len(cfg_opts): args.append(cfg_opts) - if self.src.endswith("/"): - src = self.src + '@' - else: - src = self.src + '/@' - + src = self._fix_svn_source(self.src) args.append(src) args.append(self.target) @@ -82,6 +90,25 @@ class SvnOverlay(OverlaySource): self.run_command(self.command(), args, cmd=self.type), cwd=self.target) + def update(self, base, src): + ''' + Update overlay src-url + + @params base: base location where all overlays are installed. + @params src: source URL. + ''' + + self.output.debug("svn.update(); starting...%s" % self.parent.name, 6) + target = path([base, self.parent.name]) + + # svn switch --relocate + args = ['switch', '--relocate', self._fix_svn_source(self.src), self._fix_svn_source(src)] + + return self.postsync( + self.run_command(self.command(), args, cmd=self.type), + cwd=target) + + def sync(self, base): '''Sync overlay.'''