1. Takayuki KONDO
  2. cointoss1973.bitbucket.org


cointoss1973.bitbucket.org / thg / manual / 2.4 / init.html

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

<html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>5.5. Create a new 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.6. Clone a repository" href="clone.html" />
    <link rel="prev" title="5.4. Workbench" href="workbench.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="clone.html" title="5.6. Clone a repository"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="workbench.html" title="5.4. Workbench"
             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-init.dialog">
<span id="create-a-new-repository"></span><h1>5.5. Create a new repository<a class="headerlink" href="#module-init.dialog" title="Permalink to this headline"></a></h1>
<p>To create a new repository into an existing directory (project) you
have to run the init dialog. From the explorer context menu select
<em class="menuselection">TortoiseHg... ‣ Create Repository Here</em> over the directory, or, within
the folder, type <strong class="command">thg init</strong>.</p>
<div class="figure">
<img alt="Init dialog" src="_images/init.png" />
<p class="caption">Repository Init Dialog</p>
<dl class="docutils">
<dt><em class="guilabel">Destination</em></dt>
<dd>Is the directory where the repository will be created. It is
always filled with the current directory, so if you launch the
dialog from the right directory there is no reason to change it.</dd>
<dt><em class="guilabel">Add special files (.hgignore, ...)</em></dt>
<dd>If selected TortoiseHg creates an empty <tt class="file docutils literal"><span class="pre">.hgignore</span></tt> file
in the working directory.</dd>
<dt><em class="guilabel">Make repo compatible with Mercurial &lt;1.7</em></dt>
<dd>If selected TortoiseHg creates an older format Mercurial repository.
Do not check unless you have a strong reason to do, and you know
what you are doing.</dd>
<dt><em class="guilabel">Show in Workbench after init</em></dt>
<dd>When the repository was successfully created, it is added to the RepoRegistry,
and opened in a new tab the Workbench.</dd>
<dt><em class="guilabel">Hg command</em></dt>
<dd>This field displays the command that will be executed by the dialog.</dd>
<p>Creating a new repository means create a subdirectory called <tt class="file docutils literal"><span class="pre">.hg</span></tt>.
In this subdirectory Mercurial keeps all its versioning information.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">It is dangerous to manually edit the files in <tt class="file docutils literal"><span class="pre">.hg</span></tt> directory,
repository corruption can occur.  <tt class="file docutils literal"><span class="pre">.hg/hgrc</span></tt> is perhaps the
only exception to this rule.</p>
<div class="section" id="from-command-line">
<h2>5.5.1. From command line<a class="headerlink" href="#from-command-line" title="Permalink to this headline"></a></h2>
<p>The init tool can be started from command line</p>
<div class="highlight-python"><pre>thg init</pre>
<p>The syntax is</p>
<div class="highlight-python"><pre>thg init [DEST]</pre>
<p>where [DEST] is the path to 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.5. Create a new repository</a><ul>
<li><a class="reference internal" href="#from-command-line">5.5.1. From command line</a></li>

  <h4>Previous topic</h4>
  <p class="topless"><a href="workbench.html"
                        title="previous chapter">5.4. Workbench</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="clone.html"
                        title="next chapter">5.6. Clone a repository</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/init.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="clone.html" title="5.6. Clone a repository"
             >next</a> |</li>
        <li class="right" >
          <a href="workbench.html" title="5.4. Workbench"
             >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="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.