aboutsummaryrefslogtreecommitdiff
path: root/paludis
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2011-10-03 22:00:01 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2011-10-04 22:19:54 +0100
commit338d0ebd6a158fedb3763c2d8f028646a73978af (patch)
treec3ca500940aa09771a8c374d7b27a6d9e40c53c2 /paludis
parent95c707052672c0f772355e9a1dad22989d656d40 (diff)
downloadpaludis-338d0ebd6a158fedb3763c2d8f028646a73978af.tar.gz
paludis-338d0ebd6a158fedb3763c2d8f028646a73978af.tar.xz
Rename sync suffixes to sources
"Suffixes" made sense when they were going to be configured as sync.foo = , sync.bar = , etc, but not anymore.
Diffstat (limited to 'paludis')
-rw-r--r--paludis/repositories/e/e_repository.cc34
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc34
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc34
-rw-r--r--paludis/repository.hh4
4 files changed, 53 insertions, 53 deletions
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index f8b5806b1..c0ab5ed45 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -725,20 +725,20 @@ ERepository::need_mirrors() const
bool
ERepository::sync(
- const std::string & suffix,
+ const std::string & source,
const std::string & revision,
const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
std::string sync_uri, sync_options;
- if (_imp->params.sync()->end() != _imp->params.sync()->find(suffix))
- sync_uri = _imp->params.sync()->find(suffix)->second;
+ if (_imp->params.sync()->end() != _imp->params.sync()->find(source))
+ sync_uri = _imp->params.sync()->find(source)->second;
if (sync_uri.empty())
return false;
- if (_imp->params.sync_options()->end() != _imp->params.sync_options()->find(suffix))
- sync_options = _imp->params.sync_options()->find(suffix)->second;
+ if (_imp->params.sync_options()->end() != _imp->params.sync_options()->find(source))
+ sync_options = _imp->params.sync_options()->find(source)->second;
std::list<std::string> sync_list;
tokenise_whitespace(sync_uri, std::back_inserter(sync_list));
@@ -1373,35 +1373,35 @@ ERepository::repository_factory_create(
auto sync(std::make_shared<Map<std::string, std::string> >());
std::vector<std::string> sync_tokens;
tokenise_whitespace(f("sync"), std::back_inserter(sync_tokens));
- std::string suffix;
+ std::string source;
for (auto t(sync_tokens.begin()), t_end(sync_tokens.end()) ;
t != t_end ; ++t)
if ((! t->empty()) && (':' == t->at(t->length() - 1)))
- suffix = t->substr(0, t->length() - 1);
+ source = t->substr(0, t->length() - 1);
else
{
std::string v;
- if (sync->end() != sync->find(suffix))
- v = sync->find(suffix)->second + " ";
- sync->erase(suffix);
- sync->insert(suffix, v + *t);
+ if (sync->end() != sync->find(source))
+ v = sync->find(source)->second + " ";
+ sync->erase(source);
+ sync->insert(source, v + *t);
}
auto sync_options(std::make_shared<Map<std::string, std::string> >());
std::vector<std::string> sync_options_tokens;
tokenise_whitespace(f("sync_options"), std::back_inserter(sync_options_tokens));
- suffix = "";
+ source = "";
for (auto t(sync_options_tokens.begin()), t_end(sync_options_tokens.end()) ;
t != t_end ; ++t)
if ((! t->empty()) && (':' == t->at(t->length() - 1)))
- suffix = t->substr(0, t->length() - 1);
+ source = t->substr(0, t->length() - 1);
else
{
std::string v;
- if (sync_options->end() != sync_options->find(suffix))
- v = sync_options->find(suffix)->second + " ";
- sync_options->erase(suffix);
- sync_options->insert(suffix, v + *t);
+ if (sync_options->end() != sync_options->find(source))
+ v = sync_options->find(source)->second + " ";
+ sync_options->erase(source);
+ sync_options->insert(source, v + *t);
}
std::string builddir(f("builddir"));
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 9ce26190a..61af1e1a3 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -306,20 +306,20 @@ UnavailableRepository::some_ids_might_not_be_masked() const
bool
UnavailableRepository::sync(
- const std::string & suffix,
+ const std::string & source,
const std::string & revision,
const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
std::string sync_uri, sync_options;
- if (_imp->params.sync()->end() != _imp->params.sync()->find(suffix))
- sync_uri = _imp->params.sync()->find(suffix)->second;
+ if (_imp->params.sync()->end() != _imp->params.sync()->find(source))
+ sync_uri = _imp->params.sync()->find(source)->second;
if (sync_uri.empty())
return false;
- if (_imp->params.sync_options()->end() != _imp->params.sync_options()->find(suffix))
- sync_options = _imp->params.sync_options()->find(suffix)->second;
+ if (_imp->params.sync_options()->end() != _imp->params.sync_options()->find(source))
+ sync_options = _imp->params.sync_options()->find(source)->second;
std::list<std::string> sync_list;
tokenise_whitespace(sync_uri, std::back_inserter(sync_list));
@@ -377,35 +377,35 @@ UnavailableRepository::repository_factory_create(
auto sync(std::make_shared<Map<std::string, std::string> >());
std::vector<std::string> sync_tokens;
tokenise_whitespace(f("sync"), std::back_inserter(sync_tokens));
- std::string suffix;
+ std::string source;
for (auto t(sync_tokens.begin()), t_end(sync_tokens.end()) ;
t != t_end ; ++t)
if ((! t->empty()) && (':' == t->at(t->length() - 1)))
- suffix = t->substr(0, t->length() - 1);
+ source = t->substr(0, t->length() - 1);
else
{
std::string v;
- if (sync->end() != sync->find(suffix))
- v = sync->find(suffix)->second + " ";
- sync->erase(suffix);
- sync->insert(suffix, v + *t);
+ if (sync->end() != sync->find(source))
+ v = sync->find(source)->second + " ";
+ sync->erase(source);
+ sync->insert(source, v + *t);
}
auto sync_options(std::make_shared<Map<std::string, std::string> >());
std::vector<std::string> sync_options_tokens;
tokenise_whitespace(f("sync_options"), std::back_inserter(sync_options_tokens));
- suffix = "";
+ source = "";
for (auto t(sync_options_tokens.begin()), t_end(sync_options_tokens.end()) ;
t != t_end ; ++t)
if ((! t->empty()) && (':' == t->at(t->length() - 1)))
- suffix = t->substr(0, t->length() - 1);
+ source = t->substr(0, t->length() - 1);
else
{
std::string v;
- if (sync_options->end() != sync_options->find(suffix))
- v = sync_options->find(suffix)->second + " ";
- sync_options->erase(suffix);
- sync_options->insert(suffix, v + *t);
+ if (sync_options->end() != sync_options->find(source))
+ v = sync_options->find(source)->second + " ";
+ sync_options->erase(source);
+ sync_options->insert(source, v + *t);
}
return std::make_shared<UnavailableRepository>(
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 445b31d25..648f6965d 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -254,20 +254,20 @@ UnwrittenRepository::some_ids_might_not_be_masked() const
bool
UnwrittenRepository::sync(
- const std::string & suffix,
+ const std::string & source,
const std::string & revision,
const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
std::string sync_uri, sync_options;
- if (_imp->params.sync()->end() != _imp->params.sync()->find(suffix))
- sync_uri = _imp->params.sync()->find(suffix)->second;
+ if (_imp->params.sync()->end() != _imp->params.sync()->find(source))
+ sync_uri = _imp->params.sync()->find(source)->second;
if (sync_uri.empty())
return false;
- if (_imp->params.sync_options()->end() != _imp->params.sync_options()->find(suffix))
- sync_options = _imp->params.sync_options()->find(suffix)->second;
+ if (_imp->params.sync_options()->end() != _imp->params.sync_options()->find(source))
+ sync_options = _imp->params.sync_options()->find(source)->second;
std::list<std::string> sync_list;
tokenise_whitespace(sync_uri, std::back_inserter(sync_list));
@@ -333,35 +333,35 @@ UnwrittenRepository::repository_factory_create(
auto sync(std::make_shared<Map<std::string, std::string> >());
std::vector<std::string> sync_tokens;
tokenise_whitespace(f("sync"), std::back_inserter(sync_tokens));
- std::string suffix;
+ std::string source;
for (auto t(sync_tokens.begin()), t_end(sync_tokens.end()) ;
t != t_end ; ++t)
if ((! t->empty()) && (':' == t->at(t->length() - 1)))
- suffix = t->substr(0, t->length() - 1);
+ source = t->substr(0, t->length() - 1);
else
{
std::string v;
- if (sync->end() != sync->find(suffix))
- v = sync->find(suffix)->second + " ";
- sync->erase(suffix);
- sync->insert(suffix, v + *t);
+ if (sync->end() != sync->find(source))
+ v = sync->find(source)->second + " ";
+ sync->erase(source);
+ sync->insert(source, v + *t);
}
auto sync_options(std::make_shared<Map<std::string, std::string> >());
std::vector<std::string> sync_options_tokens;
tokenise_whitespace(f("sync_options"), std::back_inserter(sync_options_tokens));
- suffix = "";
+ source = "";
for (auto t(sync_options_tokens.begin()), t_end(sync_options_tokens.end()) ;
t != t_end ; ++t)
if ((! t->empty()) && (':' == t->at(t->length() - 1)))
- suffix = t->substr(0, t->length() - 1);
+ source = t->substr(0, t->length() - 1);
else
{
std::string v;
- if (sync_options->end() != sync_options->find(suffix))
- v = sync_options->find(suffix)->second + " ";
- sync_options->erase(suffix);
- sync_options->insert(suffix, v + *t);
+ if (sync_options->end() != sync_options->find(source))
+ v = sync_options->find(source)->second + " ";
+ sync_options->erase(source);
+ sync_options->insert(source, v + *t);
}
return std::make_shared<UnwrittenRepository>(
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 02b7562ec..a86386db5 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -425,11 +425,11 @@ namespace paludis
*
* \return True if we synced successfully, false if we skipped sync.
* \since 0.42 (previously in an interface)
- * \since 0.55 takes a suffix (may be empty)
+ * \since 0.55 takes a source (may be empty)
* \since 0.61 takes a revision (may be empty)
*/
virtual bool sync(
- const std::string & suffix,
+ const std::string & source,
const std::string & revision,
const std::shared_ptr<OutputManager> &) const = 0;