aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-01-17 12:49:19 +0100
committerMichał Górny <mgorny@gentoo.org>2015-01-18 19:04:25 +0100
commit037527cdea703840f4108b7a909ba2775a19a756 (patch)
tree1b993d048f8ecab8558b4837c245c9cc9fe1bd18 /pym/portage/repository/config.py
parentcompression_probe: support lz4, lzip, lzop (diff)
downloadportage-037527cdea703840f4108b7a909ba2775a19a756.tar.gz
portage-037527cdea703840f4108b7a909ba2775a19a756.tar.bz2
portage-037527cdea703840f4108b7a909ba2775a19a756.zip
sync: support sync-depth for DVCS-es (git --depth)
Support sync-depth with the default set to 1. This allows the user to reduce the number of historical commits fetched along with the repository (git --depth).
Diffstat (limited to 'pym/portage/repository/config.py')
-rw-r--r--pym/portage/repository/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py
index 7e17e02dd..f80742e5e 100644
--- a/pym/portage/repository/config.py
+++ b/pym/portage/repository/config.py
@@ -86,6 +86,7 @@ class RepoConfig(object):
'main_repo', 'manifest_hashes', 'masters', 'missing_repo_name',
'name', 'portage1_profiles', 'portage1_profiles_compat', 'priority',
'profile_formats', 'sign_commit', 'sign_manifest', 'sync_cvs_repo',
+ 'sync_depth',
'sync_type', 'sync_umask', 'sync_uri', 'sync_user', 'thin_manifest',
'update_changelog', 'user_location', '_eapis_banned',
'_eapis_deprecated', '_masters_orig')
@@ -176,6 +177,8 @@ class RepoConfig(object):
auto_sync = auto_sync.strip().lower()
self.auto_sync = auto_sync
+ self.sync_depth = repo_opts.get('sync-depth')
+
# Not implemented.
format = repo_opts.get('format')
if format is not None:
@@ -488,6 +491,7 @@ class RepoConfigLoader(object):
# repos.conf is allowed to override.
for k in ('aliases', 'auto_sync', 'eclass_overrides',
'force', 'masters', 'priority', 'sync_cvs_repo',
+ 'sync_depth',
'sync_type', 'sync_umask', 'sync_uri', 'sync_user',
):
v = getattr(repos_conf_opts, k, None)