hg share

hg share#

create a new shared repository#

hg share [-U] [-B] SOURCE [DEST]

This command is provided by the share extension.

Initialize a new repository and working directory that shares its history (and optionally bookmarks) with another repository.

Note

using rollback or extensions that destroy/modify history (mq, rebase, etc.) can cause considerable confusion with shared clones. In particular, if two shared clones are both updated to the same changeset, and one of them destroys that changeset with rollback, the other clone will suddenly stop working: all operations will fail with "abort: working directory has unknown parent". The only known workaround is to use debugsetparents on the broken clone to reset it to a changeset that still exists.

Options

Every command accepts the global options.

-U

--noupdate

do not create a working directory

-B

--bookmarks

also share bookmarks

--relative

point to source using a relative path