Forrest logo
back to the hg tool

hg-clone:tldr:93cde

hg-clone: Clone a repository to a specific revision, tag or branch, keeping the entire history.
$ hg clone --updaterev ${revision} ${remote_repository_source}
try on your machine

The command hg clone --updaterev ${revision} ${remote_repository_source} is used to create a copy (clone) of a remote Mercurial repository on your local machine.

Here is a breakdown of the different parts of the command:

  • hg clone: This is the command for cloning a Mercurial repository.
  • --updaterev ${revision}: This option is used to specify the revision or changeset that you want to clone. The ${revision} placeholder is meant to be replaced with the actual revision number or identifier. By using this option, you can clone the repository at a specific point in time, rather than the most recent revision.
  • ${remote_repository_source}: This is the URL or path to the remote repository that you want to clone. It can be a HTTP/HTTPS URL, SSH URL, or a local filesystem path. The ${remote_repository_source} placeholder needs to be replaced with the actual source of the remote repository.

By running this command, you will create a copy of the remote repository on your local machine, starting from the specified revision.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hg tool