NAME
bk clone − create a new copy of a package
SYNOPSIS
bk clone [−q] [−rrev]
[more opts] from [to]
DESCRIPTION
The clone command copies from the from repository and
creates a copy at to. If to is not specified
then the basename of from is the implied destination.
This works for fully and partially specified pathnames as
well as BitKeeper URLs. See bk help url for further
naming information.
If bam_url is specified, it tells the destination repository what to use as a BAM server. Normally a new repository inherits the BAM server URL from the source repository. This argument is required when cloning a BAM server to a BKD.
If rev is specified, the cloned repository will include only changesets up to and including rev.
The cloned repository remembers from which repository it was cloned. The from repository is known as the “parent,” while the newly cloned repository is known as the “child.”
Subsequent updates to the child can be done by running bk pull. Changes made in the child can be pushed back into the parent by running bk push.
NOTE
Only completed changesets are cloned. Any pending deltas are
removed from the child before the clone completes.
On recent (2014) versions of Ubuntu (and other Linux distributions), the use of hardlinks has been curtailed for security reasons. Clone will fall back to using copies, see http://man7.org/linux/man-pages/man5/proc.5.html and search for protected_hardlinks. Using copies instead of links is slower and takes more disk space so you may want to disable this security feature if all of your users are trusted.
OPTIONS
−@base_url Use a local repository as a
baseline for the clone so that only the changes need to be
transferred from a remote location.
−Burl Set the BAM server url to url
in the destination repository.
−−checkout=mode Override any previous
setting for the checkout mode. Valid values for mode
are none, get, or edit. Note that this
mode becomes "sticky" in that the checkout mode
will added to `bk root`/BitKeeper/log/config. If
no other config overrides that, then this mode will
"stick" for subsequent updates.
−−downgrade By default, new clones will use
the same storage format as the repository being cloned. This
options forces the new clone to use the older, backwards
compatible format (at the cost of lower performance).
−Eenv=val Export an
environment variable to the bkd running in the remote
BitKeeper repository. Typically used to pass information to
remote triggers. Only variables with the prefix
BKU_ are allowed.
−jjobs Set the level of parallelism for the
unpacking and checking out of files.
−−no−hardlinks Clone nomally uses hard
links whenever it can. This option will prevent this and is
useful to create an archive of a repository that copies
every file.
−−parents Instead of setting the parent to
the from url, use from’s parents. Useful
when you want to pull from/push to the same places as
from.
−q Run quietly.
−rrev Clone the repository up to and
including cset rev. A changeset number or changeset
key can be used to specify rev. See bk help
terms for more information.
−−upgrade By default, new clones will use
the same storage format as the repository being cloned. This
option forces the new clone to upgrade to the latest storage
format. In bk-6.0, the storage format was changed to support
higher performance.
SEE ALSO
bk-alias, bk-bam, bk-bkd,
bk-parent, bk-pull, bk-push,
bk-relink, bk-terms, bk-triggers,
bk-url
CATEGORY
Common
Repository