clone

vb clone [OPTIONS] URI [FILENAME]

Description

Make a clone of a repository specified by URI in the local file named FILENAME. If FILENAME is omitted, then an appropriate filename is deduced from last element of the path in the URL.

URI may be one of the following forms ([…] denotes optional elements):

* HTTP/HTTPS protocol:

    http[s]://[userid[:password]@]host[:port][/path]

* SSH protocol:

    ssh://[userid@]host[:port]/path/to/repo.vbyte[?vb=path/vb.exe]

* Filesystem:

    [file://]path/to/repo.vbyte

For ssh and filesystem, path must have an extra leading / to use an absolute path.

Use %HH escapes for special characters in the userid and password. For example %40 in place of @, %2f in place of /, and %3a in place of :.

Note that in VisionByte (in contrast to some other DVCSes) a repository is distinct from a check-out. Cloning a repository is not the same thing as opening a repository. This command always clones the repository. This command might also open the repository, but only if the --no-open option is omitted and either the --workdir option is included or the FILENAME argument is omitted. Use the separate open command to open a repository that was previously cloned and already exists on the local machine.

By default, the current login name is used to create the default admin user for the new clone. This can be overridden using the -A|--admin-user parameter.

Options

-A, --admin-user USERNAME

Make USERNAME the administrator

-B, --httpauth USER:PASS

Add HTTP Basic Authorization to requests

--nested

Allow opening a repository inside an opened check-out

--nocompress

Omit extra delta compression

--no-open

Clone only. Do not open a check-out.

--once

Don’t remember the URI.

--private

Also clone private branches

--proxy PROXY

Use the specified HTTP proxy

--save-http-password

Remember the HTTP password without asking

-c, --ssh-command SSH

Use SSH as the ssh command

--ssl-identity FILENAME

Use the SSL identity if requested by the server

--transport-command CMD

Use CMD to move messages to the server and back

-u, --unversioned

Also sync unversioned content

-v, --verbose

Show more statistics in output

--workdir DIR

Also open a check-out in DIR

--xverbose

Extra debugging output

Examples

  • Clone the remote repository https://username@code.softbridge.com/projecth2

$ vb clone https://username@code.softbridge.com/projecth2
password for https://username@code.softbridge.com/projecth2: **************
remember password (Y/n)? y
Round-trips: 3   Artifacts sent: 0  received: 2857
Clone done, wire bytes sent: 941  received: 3277302  remote: 123.207.33.94
Rebuilding repository meta-data...
  100.0% complete...
Extra delta compression... 55 deltas save 201,576 bytes
...
  • Clone the existing repository test.vbyte to demo.vbyte and open its working copy in the project file, with the administrator designated as admin

$ vb clone  --nested --workdir project -A admin file://test.vbyte  demo.vbyte
Repository cloned into demo.vbyte
Rebuilding repository meta-data...
  0.0% complete...
  100.0% complete...
Extra delta compression... none found
...

See Also

See also

init, open