Source / thg / manual / 2.4 / clone.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>5.6. Clone a repository &mdash; TortoiseHg 2.4.0 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
        URL_ROOT:    '',
        VERSION:     '2.4.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="TortoiseHg 2.4.0 documentation" href="index.html" />
    <link rel="up" title="5. TortoiseHg in daily use" href="daily.html" />
    <link rel="next" title="5.7. Commit" href="commit.html" />
    <link rel="prev" title="5.5. Create a new repository" href="init.html" /> 
    <div class="related">
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="commit.html" title="5.7. Commit"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="init.html" title="5.5. Create a new repository"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">TortoiseHg 2.4.0 documentation</a> &raquo;</li>
          <li><a href="daily.html" accesskey="U">5. TortoiseHg in daily use</a> &raquo;</li> 

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
  <div class="section" id="module-clone.dialog">
<span id="clone-a-repository"></span><h1>5.6. Clone a repository<a class="headerlink" href="#module-clone.dialog" title="Permalink to this headline"></a></h1>
<p>To clone a repository you have to run the clone dialog.
From the explorer context menu select <em class="menuselection">TortoiseHg... ‣ Clone a repository</em>
or type <strong class="command">thg clone</strong>.</p>
<div class="figure">
<img alt="Clone dialog" src="_images/clone.png" />
<p class="caption">Clone Dialog</p>
<dl class="docutils">
<dt><em class="guilabel">Source</em></dt>
<dd>It is the path (or URL) of the repository that will be cloned. Use
the <em class="guilabel">Browse...</em> to choose a local folder.</dd>
<dt><em class="guilabel">Destination</em></dt>
<dd>It is the path of destination directory, a folder with the same name
of source repository will be created within this directory.</dd>
<p>Under the <em class="guilabel">Options</em> expander you will find:</p>
<dl class="docutils">
<dt><em class="guilabel">Clone To Revision</em></dt>
<dd>You can limit the clone up to this revision. Even the tags created
after this revision will not be imported.</dd>
<dt><em class="guilabel">Do not update the new working directory</em></dt>
<dd>If checked, after the clone the working directory will be empty. It
is useful when you have to clone a repository with the purpose of
central repository, or backup, where you have only, in the future,
to <em>push</em> and <em>pull</em>.</dd>
<dt><em class="guilabel">Use pull protocol to copy metadata</em></dt>
<dd>When the source and destination are on the same filesystem,
Mercurial tries to use hardlinks. Some filesystems, such as AFS
implement hardlink incorrectly, but do not report errors. Use this
option to avoid hardlinks.</dd>
<dt><em class="guilabel">Use uncompressed transfer</em></dt>
<dd>To use uncompressed transfer (fast over LAN).</dd>
<dt><em class="guilabel">Include patch queue</em></dt>
<dd>To also clone an MQ patch repository along with the main repository.
It is possible to provide a patch queue name that differs from the
default one.</dd>
<dt><em class="guilabel">Use proxy server</em></dt>
<dd>To use the proxy server configured in <em class="menuselection">TortoiseHg... ‣ Global Settings ‣ Proxy</em>.
This is enabled only if a proxy is configured.</dd>
<dt><em class="guilabel">Do not verify host certificate</em></dt>
<dd>Skip checking server certificate for <a class="reference external" href="https://">https://</a> url (ignoring web.cacerts config).</dd>
<dt><em class="guilabel">Remote command</em></dt>
<dd>Specify a Mercurial command to run on the remote side.</dd>
<dt><em class="guilabel">Hg command</em></dt>
<dd>This field displays the command that will be executed by the dialog.</dd>
<div class="section" id="from-command-line">
<h2>5.6.1. From command line<a class="headerlink" href="#from-command-line" title="Permalink to this headline"></a></h2>
<p>The clone tool can be started from command line</p>
<div class="highlight-python"><pre>thg clone</pre>
<p>The syntax is</p>
<div class="highlight-python"><pre>thg clone [SOURCE] [DEST]</pre>
<p>where [SOURCE] and [DEST] are, the paths of source repository and destination folder.</p>

      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/thg_logo_92x50.png" alt="Logo"/>
  <h3><a href="index.html">Table Of Contents</a></h3>
<li><a class="reference internal" href="#">5.6. Clone a repository</a><ul>
<li><a class="reference internal" href="#from-command-line">5.6.1. From command line</a></li>

  <h4>Previous topic</h4>
  <p class="topless"><a href="init.html"
                        title="previous chapter">5.5. Create a new repository</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="commit.html"
                        title="next chapter">5.7. Commit</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/clone.txt"
           rel="nofollow">Show Source</a></li>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
<script type="text/javascript">$('#searchbox').show(0);</script>
      <div class="clearer"></div>
    <div class="related">
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="commit.html" title="5.7. Commit"
             >next</a> |</li>
        <li class="right" >
          <a href="init.html" title="5.5. Create a new repository"
             >previous</a> |</li>
        <li><a href="index.html">TortoiseHg 2.4.0 documentation</a> &raquo;</li>
          <li><a href="daily.html" >5. TortoiseHg in daily use</a> &raquo;</li> 
    <div class="footer">
        &copy; Copyright 2012, Steve Borho and others.
      Created using <a href="">Sphinx</a> 1.1.3.