aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-09-22 13:41:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-09-22 13:41:54 +0200
commit738050f2a71b2f0d094a692cc48c94653b82287f (patch)
tree874b79e5017be0aefde4f9427ecf6fc95cbe36be /bpkg/rep-add.cxx
parent221f0250fcd7cba4fa4b5e4fd6c0d410eb6e5811 (diff)
Implement rep-fetch command
Diffstat (limited to 'bpkg/rep-add.cxx')
-rw-r--r--bpkg/rep-add.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx
index 803c68d..924cd65 100644
--- a/bpkg/rep-add.cxx
+++ b/bpkg/rep-add.cxx
@@ -32,19 +32,19 @@ namespace bpkg
// Figure out the repository location.
//
- const char* s (args.next ());
+ const char* arg (args.next ());
repository_location rl;
try
{
- rl = repository_location (s, repository_location ());
+ rl = repository_location (arg, repository_location ());
if (rl.relative ()) // Throws if location is empty.
rl = repository_location (
- dir_path (s).complete ().normalize ().string ());
+ dir_path (arg).complete ().normalize ().string ());
}
catch (const invalid_argument& e)
{
- fail << "invalid repository location '" << s << "': " << e.what ();
+ fail << "invalid repository location '" << arg << "': " << e.what ();
}
const string& rn (rl.canonical_name ());
@@ -53,6 +53,7 @@ namespace bpkg
//
database db (open (c, trace));
transaction t (db.begin ());
+ session s; // Repository dependencies can have cycles.
// It is possible that this repository is already in the database.
// For example, it might be a prerequisite of one of the already