From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/sync/modules/git/
Date: Sat, 25 Feb 2017 00:25:52 +0000 (UTC) [thread overview]
Message-ID: <1487980870.58e8b280794af7396115ea76747f0cc5fc5ab013.zmedico@gentoo> (raw)
commit: 58e8b280794af7396115ea76747f0cc5fc5ab013
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 24 23:56:32 2017 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Feb 25 00:01:10 2017 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=58e8b280
GitSync: fix spurious "sync-depth is deprecated" messages (bug 610708)
The CheckGitConfig._check_depth method must not set the sync_depth
attribute, or else it will trigger "sync-depth is deprecated" messages.
Fixes: b3f6297a791a ("repos.conf: rename sync-depth option to clone-depth")
X-Gentoo-Bug: 610708
X-Gentoo-Bug-Url: https://bugs.gentoo.org/show_bug.cgi?id=610708
pym/portage/sync/modules/git/__init__.py | 4 ----
pym/portage/sync/modules/git/git.py | 9 +++++++--
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/pym/portage/sync/modules/git/__init__.py b/pym/portage/sync/modules/git/__init__.py
index 2df60e37f..60b7395b8 100644
--- a/pym/portage/sync/modules/git/__init__.py
+++ b/pym/portage/sync/modules/git/__init__.py
@@ -21,8 +21,6 @@ class CheckGitConfig(CheckSyncConfig):
def _check_depth(self, attr):
d = getattr(self.repo, attr)
- # default
- setattr(self.repo, attr, 1)
if d is not None:
try:
@@ -33,8 +31,6 @@ class CheckGitConfig(CheckSyncConfig):
% (attr.replace('_', '-'), d),
level=self.logger.ERROR, noiselevel=-1)
else:
- if d == 0:
- d = None
setattr(self.repo, attr, d)
diff --git a/pym/portage/sync/modules/git/git.py b/pym/portage/sync/modules/git/git.py
index d5400d53a..d432886dd 100644
--- a/pym/portage/sync/modules/git/git.py
+++ b/pym/portage/sync/modules/git/git.py
@@ -53,9 +53,14 @@ class GitSync(NewBase):
if self.settings.get("PORTAGE_QUIET") == "1":
git_cmd_opts += " --quiet"
if self.repo.clone_depth is not None:
- git_cmd_opts += " --depth %d" % self.repo.clone_depth
+ if self.repo.clone_depth != 0:
+ git_cmd_opts += " --depth %d" % self.repo.clone_depth
elif self.repo.sync_depth is not None:
- git_cmd_opts += " --depth %d" % self.repo.sync_depth
+ if self.repo.sync_depth != 0:
+ git_cmd_opts += " --depth %d" % self.repo.sync_depth
+ else:
+ # default
+ git_cmd_opts += " --depth 1"
if self.repo.module_specific_options.get('sync-git-clone-extra-opts'):
git_cmd_opts += " %s" % self.repo.module_specific_options['sync-git-clone-extra-opts']
git_cmd = "%s clone%s %s ." % (self.bin_command, git_cmd_opts,
next reply other threads:[~2017-02-25 0:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 0:25 Zac Medico [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-07-10 4:28 [gentoo-commits] proj/portage:master commit in: pym/portage/sync/modules/git/ Zac Medico
2018-07-08 22:18 Zac Medico
2018-07-08 21:17 Zac Medico
2018-03-21 18:26 Zac Medico
2018-02-05 18:44 Michał Górny
2017-08-09 20:56 Zac Medico
2017-08-09 20:39 Zac Medico
2016-11-07 22:16 Zac Medico
2016-11-03 20:05 Zac Medico
2016-10-30 21:23 Michał Górny
2016-09-22 21:45 Zac Medico
2016-07-18 16:32 Zac Medico
2016-07-14 18:41 Zac Medico
2015-11-07 21:28 Zac Medico
2015-09-04 17:27 Brian Dolbec
2015-01-18 18:04 Michał Górny
2014-12-04 20:16 Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
2014-12-04 20:04 [gentoo-commits] proj/portage:plugin-sync " Brian Dolbec
2014-12-04 20:16 ` [gentoo-commits] proj/portage:master " Brian Dolbec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487980870.58e8b280794af7396115ea76747f0cc5fc5ab013.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox