aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 23:50:30 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-03-19 23:52:27 +0000
commitc93b44bde4c2a5405fe847b9dea65d860fa2bb6c (patch)
tree60d18ce007301fc496cc49c910bfacd654a04d89
parent8b04af73bee62cb97de96f2e79dc5835e0ac3a4c (diff)
downloadpaludis-c93b44bde4c2a5405fe847b9dea65d860fa2bb6c.tar.gz
paludis-c93b44bde4c2a5405fe847b9dea65d860fa2bb6c.tar.xz
cave sync --revision
-rw-r--r--src/clients/cave/cmd_sync.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/clients/cave/cmd_sync.cc b/src/clients/cave/cmd_sync.cc
index dd9b769..04d8d5b 100644
--- a/src/clients/cave/cmd_sync.cc
+++ b/src/clients/cave/cmd_sync.cc
@@ -68,6 +68,7 @@ namespace
args::ArgsGroup g_sync_options;
args::StringArg a_suffix;
+ args::StringArg a_revision;
virtual std::string app_name() const
{
@@ -90,7 +91,9 @@ namespace
a_sequential(&g_job_options, "sequential", '\0', "Only perform one sync at a time.", false),
g_sync_options(main_options_section(), "Sync Options", "Sync options."),
- a_suffix(&g_sync_options, "suffix", 's', "Use the specified suffix for syncing.")
+ a_suffix(&g_sync_options, "suffix", 's', "Use the specified suffix for syncing."),
+ a_revision(&g_sync_options, "revision", 'r', "Sync to the specified revision. Not supported by all "
+ "syncers. Probably doesn't make sense when not specified with a repository parameter.")
{
add_usage_line("[ --sequential ] [repository ...]");
}
@@ -199,7 +202,7 @@ namespace
{
const std::shared_ptr<Repository> repo(env->package_database()->fetch_repository(name));
- if (! repo->sync(cmdline.a_suffix.argument(), "", output_manager))
+ if (! repo->sync(cmdline.a_suffix.argument(), cmdline.a_revision.argument(), output_manager))
skipped = true;
success = true;
}