From 738050f2a71b2f0d094a692cc48c94653b82287f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Sep 2015 13:41:54 +0200 Subject: Implement rep-fetch command --- bpkg/rep-add.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bpkg/rep-add.cxx') 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 -- cgit v1.1