aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-add.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/rep-add.cxx')
-rw-r--r--bpkg/rep-add.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/bpkg/rep-add.cxx b/bpkg/rep-add.cxx
index ba79bf8..81b1286 100644
--- a/bpkg/rep-add.cxx
+++ b/bpkg/rep-add.cxx
@@ -1,5 +1,4 @@
// file : bpkg/rep-add.cxx -*- C++ -*-
-// copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#include <bpkg/rep-add.hxx>
@@ -17,12 +16,12 @@ namespace bpkg
{
shared_ptr<repository>
rep_add (const common_options& o,
- transaction& t,
+ database& db,
+ transaction&,
const repository_location& rl)
{
const string& rn (rl.canonical_name ());
- database& db (t.database ());
shared_ptr<repository> r (db.find<repository> (rn));
bool updated (false);
@@ -66,7 +65,7 @@ namespace bpkg
fail << "repository location argument expected" <<
info << "run 'bpkg help rep-add' for more information";
- database db (open (c, trace));
+ database db (c, trace, false /* pre_attach */);
transaction t (db);
session s; // Repository dependencies can have cycles.
@@ -78,7 +77,7 @@ namespace bpkg
? optional<repository_type> (o.type ())
: nullopt));
- rep_add (o, t, rl);
+ rep_add (o, db, t, rl);
}
t.commit ();