aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 23:42:28 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 23:52:27 +0000
commit8b04af73bee62cb97de96f2e79dc5835e0ac3a4c (patch)
tree70ff8b7aecdd1a00c49567b41d1f9d6c8d0d52b0 /paludis/repositories
parente19d5e245fd7e0dfcfd97cc1f31151f59cadec31 (diff)
downloadpaludis-8b04af73bee62cb97de96f2e79dc5835e0ac3a4c.tar.gz
paludis-8b04af73bee62cb97de96f2e79dc5835e0ac3a4c.tar.xz
Let syncing specify a revision
Diffstat (limited to 'paludis/repositories')
-rw-r--r--paludis/repositories/accounts/accounts_repository.cc1
-rw-r--r--paludis/repositories/accounts/accounts_repository.hh6
-rw-r--r--paludis/repositories/e/e_installed_repository.cc2
-rw-r--r--paludis/repositories/e/e_installed_repository.hh1
-rw-r--r--paludis/repositories/e/e_repository.cc5
-rw-r--r--paludis/repositories/e/e_repository.hh5
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc1
-rw-r--r--paludis/repositories/fake/fake_repository_base.hh2
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.cc2
-rw-r--r--paludis/repositories/gemcutter/gemcutter_repository.hh2
-rw-r--r--paludis/repositories/repository/repository_repository.cc4
-rw-r--r--paludis/repositories/repository/repository_repository.hh2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc5
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.hh2
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc1
-rw-r--r--paludis/repositories/unpackaged/installed_repository.hh2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc1
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh2
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.cc5
-rw-r--r--paludis/repositories/unwritten/unwritten_repository.hh2
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc1
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.hh2
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc1
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.hh2
24 files changed, 41 insertions, 18 deletions
diff --git a/paludis/repositories/accounts/accounts_repository.cc b/paludis/repositories/accounts/accounts_repository.cc
index 8b3094267..5400bacb1 100644
--- a/paludis/repositories/accounts/accounts_repository.cc
+++ b/paludis/repositories/accounts/accounts_repository.cc
@@ -449,6 +449,7 @@ AccountsRepository::perform_hook(
bool
AccountsRepository::sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const
{
return false;
diff --git a/paludis/repositories/accounts/accounts_repository.hh b/paludis/repositories/accounts/accounts_repository.hh
index 0c6cc0919..9234ab1a2 100644
--- a/paludis/repositories/accounts/accounts_repository.hh
+++ b/paludis/repositories/accounts/accounts_repository.hh
@@ -143,7 +143,11 @@ namespace paludis
virtual HookResult perform_hook(
const Hook & hook,
const std::shared_ptr<OutputManager> &);
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+
+ virtual bool sync(
+ const std::string &,
+ const std::string &,
+ const std::shared_ptr<OutputManager> &) const;
///\}
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 06aebc666..2c670d198 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -398,7 +398,7 @@ EInstalledRepository::populate_sets() const
}
bool
-EInstalledRepository::sync(const std::string &, const std::shared_ptr<OutputManager> &) const
+EInstalledRepository::sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const
{
return false;
}
diff --git a/paludis/repositories/e/e_installed_repository.hh b/paludis/repositories/e/e_installed_repository.hh
index 3d076d7db..9aa18258a 100644
--- a/paludis/repositories/e/e_installed_repository.hh
+++ b/paludis/repositories/e/e_installed_repository.hh
@@ -90,6 +90,7 @@ namespace paludis
virtual bool sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const;
///\name For use by EInstalledRepositoryID
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index b5d502d4a..e23350883 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -697,6 +697,7 @@ ERepository::need_mirrors() const
bool
ERepository::sync(
const std::string & suffix,
+ const std::string & revision,
const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
@@ -720,8 +721,10 @@ ERepository::sync(
DefaultSyncer syncer(make_named_values<SyncerParams>(
n::environment() = _imp->params.environment(),
n::local() = stringify(_imp->params.location()),
- n::remote() = *s
+ n::remote() = *s,
+ n::revision() = revision
));
+
SyncOptions opts(make_named_values<SyncOptions>(
n::filter_file() = _imp->layout->sync_filter_file(),
n::options() = sync_options,
diff --git a/paludis/repositories/e/e_repository.hh b/paludis/repositories/e/e_repository.hh
index e800f8473..3fc9c5e77 100644
--- a/paludis/repositories/e/e_repository.hh
+++ b/paludis/repositories/e/e_repository.hh
@@ -105,7 +105,10 @@ namespace paludis
/* RepositorySyncableInterface */
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(
+ const std::string &,
+ const std::string &,
+ const std::shared_ptr<OutputManager> &) const;
/* RepositoryEnvironmentVariableInterface */
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index a45a825c1..1c5e24e23 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -200,6 +200,7 @@ FakeRepositoryBase::perform_hook(const Hook &, const std::shared_ptr<OutputManag
bool
FakeRepositoryBase::sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const
{
return false;
diff --git a/paludis/repositories/fake/fake_repository_base.hh b/paludis/repositories/fake/fake_repository_base.hh
index a97b848c5..f1b056791 100644
--- a/paludis/repositories/fake/fake_repository_base.hh
+++ b/paludis/repositories/fake/fake_repository_base.hh
@@ -114,7 +114,7 @@ namespace paludis
virtual bool has_category_named(const CategoryNamePart &, const RepositoryContentMayExcludes &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
///\name Set methods
///\{
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.cc b/paludis/repositories/gemcutter/gemcutter_repository.cc
index 563e6cd77..b03a21b9f 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.cc
+++ b/paludis/repositories/gemcutter/gemcutter_repository.cc
@@ -247,7 +247,7 @@ GemcutterRepository::some_ids_might_not_be_masked() const
}
bool
-GemcutterRepository::sync(const std::string &, const std::shared_ptr<OutputManager> &) const
+GemcutterRepository::sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const
{
return false;
}
diff --git a/paludis/repositories/gemcutter/gemcutter_repository.hh b/paludis/repositories/gemcutter/gemcutter_repository.hh
index ea08595d0..428d0a63d 100644
--- a/paludis/repositories/gemcutter/gemcutter_repository.hh
+++ b/paludis/repositories/gemcutter/gemcutter_repository.hh
@@ -89,7 +89,7 @@ namespace paludis
virtual bool some_ids_might_not_be_masked() const;
virtual void invalidate();
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
///\name RepositoryFactory functions
///\{
diff --git a/paludis/repositories/repository/repository_repository.cc b/paludis/repositories/repository/repository_repository.cc
index 8718a4be5..0da3736a9 100644
--- a/paludis/repositories/repository/repository_repository.cc
+++ b/paludis/repositories/repository/repository_repository.cc
@@ -259,7 +259,7 @@ RepositoryRepository::some_ids_might_not_be_masked() const
}
bool
-RepositoryRepository::sync(const std::string &, const std::shared_ptr<OutputManager> &) const
+RepositoryRepository::sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const
{
return false;
}
@@ -477,7 +477,7 @@ RepositoryRepository::merge(const MergeParams & m)
}
m.output_manager()->stdout_stream() << "Syncing..." << std::endl;
- _imp->params.environment()->repository_from_new_config_file(config_filename_file)->sync("", m.output_manager());
+ _imp->params.environment()->repository_from_new_config_file(config_filename_file)->sync("", "", m.output_manager());
/* the repo we'd get before syncing is mostly unusable */
const std::shared_ptr<Repository> newly_created_repo(
diff --git a/paludis/repositories/repository/repository_repository.hh b/paludis/repositories/repository/repository_repository.hh
index 006ad7b16..604607875 100644
--- a/paludis/repositories/repository/repository_repository.hh
+++ b/paludis/repositories/repository/repository_repository.hh
@@ -95,7 +95,7 @@ namespace paludis
virtual bool some_ids_might_not_be_masked() const;
virtual void invalidate();
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
virtual bool is_suitable_destination_for(const std::shared_ptr<const PackageID> &) const
PALUDIS_ATTRIBUTE((warn_unused_result));
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 428b77d80..4739c7202 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -316,6 +316,7 @@ UnavailableRepository::some_ids_might_not_be_masked() const
bool
UnavailableRepository::sync(
const std::string & suffix,
+ const std::string & revision,
const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
@@ -339,8 +340,10 @@ UnavailableRepository::sync(
DefaultSyncer syncer(make_named_values<SyncerParams>(
n::environment() = _imp->params.environment(),
n::local() = stringify(_imp->params.location()),
- n::remote() = *s
+ n::remote() = *s,
+ n::revision() = revision
));
+
SyncOptions opts(make_named_values<SyncOptions>(
n::filter_file() = FSPath("/dev/null"),
n::options() = sync_options,
diff --git a/paludis/repositories/unavailable/unavailable_repository.hh b/paludis/repositories/unavailable/unavailable_repository.hh
index fdab7db99..3d5fdd569 100644
--- a/paludis/repositories/unavailable/unavailable_repository.hh
+++ b/paludis/repositories/unavailable/unavailable_repository.hh
@@ -94,7 +94,7 @@ namespace paludis
virtual bool some_ids_might_not_be_masked() const;
virtual void invalidate();
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
///\name RepositoryFactory functions
///\{
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index 7d064f140..14cc03232 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -509,6 +509,7 @@ InstalledUnpackagedRepository::perform_hook(const Hook &, const std::shared_ptr<
bool
InstalledUnpackagedRepository::sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const
{
return false;
diff --git a/paludis/repositories/unpackaged/installed_repository.hh b/paludis/repositories/unpackaged/installed_repository.hh
index d364fa209..ba025dbc1 100644
--- a/paludis/repositories/unpackaged/installed_repository.hh
+++ b/paludis/repositories/unpackaged/installed_repository.hh
@@ -140,7 +140,7 @@ namespace paludis
virtual HookResult perform_hook(const Hook & hook, const std::shared_ptr<OutputManager> &)
PALUDIS_ATTRIBUTE((warn_unused_result));
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
};
}
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 6474c26b9..dc78884b5 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -303,6 +303,7 @@ UnpackagedRepository::perform_hook(const Hook &, const std::shared_ptr<OutputMan
bool
UnpackagedRepository::sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const
{
return false;
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index c3129c42c..431096538 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.hh
@@ -108,7 +108,7 @@ namespace paludis
virtual const bool is_unimportant() const;
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
/* Keys */
diff --git a/paludis/repositories/unwritten/unwritten_repository.cc b/paludis/repositories/unwritten/unwritten_repository.cc
index 9bf0aa64e..c23cd8442 100644
--- a/paludis/repositories/unwritten/unwritten_repository.cc
+++ b/paludis/repositories/unwritten/unwritten_repository.cc
@@ -264,6 +264,7 @@ UnwrittenRepository::some_ids_might_not_be_masked() const
bool
UnwrittenRepository::sync(
const std::string & suffix,
+ const std::string & revision,
const std::shared_ptr<OutputManager> & output_manager) const
{
Context context("When syncing repository '" + stringify(name()) + "':");
@@ -287,8 +288,10 @@ UnwrittenRepository::sync(
DefaultSyncer syncer(make_named_values<SyncerParams>(
n::environment() = _imp->params.environment(),
n::local() = stringify(_imp->params.location()),
- n::remote() = *s
+ n::remote() = *s,
+ n::revision() = revision
));
+
SyncOptions opts(make_named_values<SyncOptions>(
n::filter_file() = FSPath("/dev/null"),
n::options() = sync_options,
diff --git a/paludis/repositories/unwritten/unwritten_repository.hh b/paludis/repositories/unwritten/unwritten_repository.hh
index 7abde049a..5c293954a 100644
--- a/paludis/repositories/unwritten/unwritten_repository.hh
+++ b/paludis/repositories/unwritten/unwritten_repository.hh
@@ -93,7 +93,7 @@ namespace paludis
virtual bool some_ids_might_not_be_masked() const;
virtual void invalidate();
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> & output_manager) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> & output_manager) const;
///\name RepositoryFactory functions
///\{
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 413b8bf55..ff4ec82ae 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -391,6 +391,7 @@ InstalledVirtualsRepository::populate_sets() const
bool
InstalledVirtualsRepository::sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const
{
return false;
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.hh b/paludis/repositories/virtuals/installed_virtuals_repository.hh
index 037232d03..c78d81363 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.hh
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.hh
@@ -108,7 +108,7 @@ namespace paludis
virtual bool some_ids_might_not_be_masked() const;
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
/* Keys */
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 86dec7938..ca1e9aa41 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -462,6 +462,7 @@ VirtualsRepository::perform_hook(const Hook &, const std::shared_ptr<OutputManag
bool
VirtualsRepository::sync(
const std::string &,
+ const std::string &,
const std::shared_ptr<OutputManager> &) const
{
return false;
diff --git a/paludis/repositories/virtuals/virtuals_repository.hh b/paludis/repositories/virtuals/virtuals_repository.hh
index c83a299ff..430cd829e 100644
--- a/paludis/repositories/virtuals/virtuals_repository.hh
+++ b/paludis/repositories/virtuals/virtuals_repository.hh
@@ -106,7 +106,7 @@ namespace paludis
virtual bool some_ids_might_not_be_masked() const;
- virtual bool sync(const std::string &, const std::shared_ptr<OutputManager> &) const;
+ virtual bool sync(const std::string &, const std::string &, const std::shared_ptr<OutputManager> &) const;
/* RepositoryMakeVirtualsInterface */