     user = "#{opts.location.username}@#{opts.location.host}"   # TODO; port and path?
     async.series([
         (cb) ->
-             # check if project is currently locked -- if so, returns an error.
+             winston.debug("create_lock: check if project is already locked")
              misc_node.execute_code
                  command     : 'ssh'
                  args        : [user, "cat '#{opts.lockfile}'"]

        bup_dir : required
        cb      : (err, output) ->
            if err
                winston.info("error -- #{err}")
            else
                winston.info("bup output -- #{misc.to_json(output)}")

    if typeof(opts.args) == "string"
        command = "/usr/bin/bup " + opts.args

    active = "#{bup_dir}/active"
    fs.readFile active, (err, data) ->
        if not err
            # there's already a bup repository file.
            repo_id = data.toString().trim()
            cb(false, {active_path:"#{bup_dir}/#{repo_id}", repo_id:repo_id})
        else
            misc_node.ensure_containing_directory_exists active, (err) ->
                if err
                    cb(err); return
                # create new bup repository.
                u = uuid.v4()
                path = "#{bup_dir}/#{u}"
                fs.writeFile active, u, (err) ->
                    bup
                        args    : ['init']
                        bup_dir : path
                        cb      : (err) ->
                            cb(err, {active_path:path, repo_id:u})

# Write entry to the database periodicially (with ttl) that this
# snap server is up and running, and provide the key.
