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 268521389E2 for ; Mon, 1 Dec 2014 21:50:24 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C469E097A; Mon, 1 Dec 2014 21:50:14 +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 E5EABE0972 for ; Mon, 1 Dec 2014 21:50:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 334F33405F5 for ; Mon, 1 Dec 2014 21:50:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21D43B516 for ; Mon, 1 Dec 2014 21:50:07 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1417470582.883f7ceb8b30f75d882e94074a3a3411875f6c31.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:plugin-sync commit in: pym/portage/sync/modules/git/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/sync/modules/git/git.py X-VCS-Directories: pym/portage/sync/modules/git/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 883f7ceb8b30f75d882e94074a3a3411875f6c31 X-VCS-Branch: plugin-sync Date: Mon, 1 Dec 2014 21:50:07 +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: c81f08b1-fd36-4441-8b0f-054588550882 X-Archives-Hash: a52f5a6798c2ae5115dbe6f50a184b3c commit: 883f7ceb8b30f75d882e94074a3a3411875f6c31 Author: Zac Medico gentoo org> AuthorDate: Wed Oct 22 11:01:03 2014 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Dec 1 21:49:42 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=883f7ceb GitSync: support file:// sync-uri This will be useful for unit tests that will sync from a local file:// sync-uri. --- pym/portage/sync/modules/git/git.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/portage/sync/modules/git/git.py b/pym/portage/sync/modules/git/git.py index 7c28139..35943dd 100644 --- a/pym/portage/sync/modules/git/git.py +++ b/pym/portage/sync/modules/git/git.py @@ -60,10 +60,13 @@ class GitSync(SyncBase): msg = ">>> Cloning git repository from upstream into %s..." % self.repo.location self.logger(self.xterm_titles, msg) writemsg_level(msg + "\n") + sync_uri = self.repo.sync_uri + if sync_uri.startswith("file://"): + sync_uri = sync_uri[6:] exitcode = portage.process.spawn_bash("cd %s ; %s clone %s ." % \ (portage._shell_quote(self.repo.location), self.bin_command, - portage._shell_quote(self.repo.sync_uri)), + portage._shell_quote(sync_uri)), **portage._native_kwargs(self.spawn_kwargs)) if exitcode != os.EX_OK: msg = "!!! git clone error in %s" % self.repo.location