Sophie

Sophie

distrib > Mageia > 7 > aarch64 > by-pkgid > 7e647d9940d31b34c253e6f71c416c4b > files > 3590

bzr-2.7.0-6.mga7.aarch64.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="ru">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Branching a project &#8212; Документация Bazaar 2.7.0</title>
    <link rel="stylesheet" href="../_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <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>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <script type="text/javascript" src="../_static/translations.js"></script>
    
    <link rel="shortcut icon" href="../_static/bzr.ico"/>
    <link rel="search" title="Поиск" href="../search.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Навигация</h3>
      <ul>
<li><a href="http://bazaar.canonical.com/">
    <img src="../_static/bzr icon 16.png" /> Главная</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/ru/">Документация</a>&nbsp;|&nbsp;</li>

        <li class="nav-item nav-item-0"><a href="../index.html">Содержание (2.7.0)</a> &#187;</li>
 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="branching-a-project">
<h1>Branching a project<a class="headerlink" href="#branching-a-project" title="Ссылка на этот заголовок">¶</a></h1>
<div class="section" id="branch-urls">
<h2>Branch URLs<a class="headerlink" href="#branch-urls" title="Ссылка на этот заголовок">¶</a></h2>
<p>Before someone else can get a copy of your work, you need to
agree on a transfer technology.
You may decide to make the top level directory of your branch
a network share, an approach familiar to Windows users.
Linux and OS X users might prefer access to be
via SFTP, a secure protocol built-in to most SSH servers.
Bazaar is <em>very</em> flexible in this regard with support for
lots of protocols some of which are given below.</p>
<blockquote>
<div><table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Prefix</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="file://">file://</a></td>
<td>Access using the standard filesystem (default)</td>
</tr>
<tr class="row-odd"><td>sftp://</td>
<td>Access using SFTP (most SSH servers provide SFTP).</td>
</tr>
<tr class="row-even"><td>bzr://</td>
<td>Fast access using the Bazaar smart server.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="ftp://">ftp://</a></td>
<td>Access using passive FTP.</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="http://">http://</a></td>
<td>Read-only access to branches exported by a web server.</td>
</tr>
</tbody>
</table>
</div></blockquote>
<p>As indicated above, branches are identified using URLs with the
prefix indicating the transfer technology. If no prefix is given,
normal filenames are assumed. For a complete list of supported
protocols, see the <code class="docutils literal notranslate"><span class="pre">urlspec</span></code> online help topic or the
<a class="reference external" href="../user-reference/bzr_man.html#url-identifiers">URL Identifiers</a>
section of the Bazaar User Reference.</p>
</div>
<div class="section" id="a-reminder-about-shared-repositories">
<span id="id1"></span><h2>Напоминание о разделяемых репозиториях<a class="headerlink" href="#a-reminder-about-shared-repositories" title="Ссылка на этот заголовок">¶</a></h2>
<p>Before getting a copy of a branch, have a quick think about
where to put it on your filesystem. For maximum storage
efficiency down the track, it is recommended that branches
be created somewhere under a directory that has been set up
as a shared repository. (See <a href="#id2"><span class="problematic" id="id3">`Feature branches`_</span></a> in
n <a href="#id4"><span class="problematic" id="id5">`Organizing your workspace`_</span></a> for a commonly used layout.)
For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">init</span><span class="o">-</span><span class="n">repo</span> <span class="n">my</span><span class="o">-</span><span class="n">repo</span>
<span class="n">cd</span> <span class="n">my</span><span class="o">-</span><span class="n">repo</span>
</pre></div>
</div>
<p>You are now ready to grab a branch from someone else and
hack away.</p>
</div>
<div class="section" id="the-branch-command">
<h2>The branch command<a class="headerlink" href="#the-branch-command" title="Ссылка на этот заголовок">¶</a></h2>
<p>To get a branch based on an existing branch, use the <code class="docutils literal notranslate"><span class="pre">branch</span></code> command.
The syntax is:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">branch</span> <span class="n">URL</span> <span class="p">[</span><span class="n">directory</span><span class="p">]</span>
</pre></div>
</div>
<p>If a directory is not given, one is created based on the last part of
the URL. Here are some examples showing a drive qualified path (M:/) and an
SFTP URL respectively:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">branch</span> <span class="n">M</span><span class="p">:</span><span class="o">/</span><span class="n">cool</span><span class="o">-</span><span class="n">trunk</span>
<span class="n">bzr</span> <span class="n">branch</span> <span class="n">sftp</span><span class="p">:</span><span class="o">//</span><span class="n">bill</span><span class="nd">@mary</span><span class="o">-</span><span class="n">laptop</span><span class="o">/</span><span class="n">cool</span><span class="o">-</span><span class="n">repo</span><span class="o">/</span><span class="n">cool</span><span class="o">-</span><span class="n">trunk</span>
</pre></div>
</div>
<p>This example shows explicitly giving the directory name to use for the
new branch:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">branch</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">mary</span><span class="o">/</span><span class="n">cool</span><span class="o">-</span><span class="n">repo</span><span class="o">/</span><span class="n">cool</span><span class="o">-</span><span class="n">trunk</span> <span class="n">cool</span>
</pre></div>
</div>
</div>
<div class="section" id="time-and-space-considerations">
<h2>Time and space considerations<a class="headerlink" href="#time-and-space-considerations" title="Ссылка на этот заголовок">¶</a></h2>
<p>Depending on the size of the branch being transferred and the
speed and latency of the network between your computer and the
source branch, this initial transfer might take some time.
Subsequent updates should be much faster as only the
changes are transferred then.</p>
<p>Keep in mind that Bazaar is transferring the
complete history of the branch, not just the latest snapshot.
As a consequence, you can be off the network (or disconnected
from the network share) after <code class="docutils literal notranslate"><span class="pre">branch</span></code> completes but you’ll
still be able to <code class="docutils literal notranslate"><span class="pre">log</span></code> and <code class="docutils literal notranslate"><span class="pre">diff</span></code> the history of the
branch as much as you want. Furthermore, these operations
are quick as the history is stored locally.</p>
<p>Note that Bazaar uses smart compression technology to
minimize the amount of disk space required to store version
history. In many cases, the complete history of a project
will take up less disk space than the working copy of
the latest version.</p>
<p>As explained in later chapters, Bazaar also has support for
<a class="reference external" href="#getting-a-lightweight-checkout">lightweight checkouts</a>
of a branch, i.e. working trees with
no local storage of history. Of course, disconnected usage
is not available then but that’s a tradeoff you can decide
to make if local disk space is really tight for you. Support for
limited lookback into history - <em>history horizons</em> - is
currently under development as well.</p>
</div>
<div class="section" id="viewing-branch-information">
<h2>Viewing branch information<a class="headerlink" href="#viewing-branch-information" title="Ссылка на этот заголовок">¶</a></h2>
<p>If you wish to see information about a branch including where it came from,
use the <code class="docutils literal notranslate"><span class="pre">info</span></code> command. For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">info</span> <span class="n">cool</span>
</pre></div>
</div>
<p>If no branch is given, information on the current branch is displayed.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Branching a project</a><ul>
<li><a class="reference internal" href="#branch-urls">Branch URLs</a></li>
<li><a class="reference internal" href="#a-reminder-about-shared-repositories">Напоминание о разделяемых репозиториях</a></li>
<li><a class="reference internal" href="#the-branch-command">The branch command</a></li>
<li><a class="reference internal" href="#time-and-space-considerations">Time and space considerations</a></li>
<li><a class="reference internal" href="#viewing-branch-information">Viewing branch information</a></li>
</ul>
</li>
</ul>

  <div role="note" aria-label="source link">
    <h3>Эта страница</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/user-guide/branching_a_project.txt"
            rel="nofollow">Исходный текст</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Быстрый поиск</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Искать" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Навигация</h3>
      <ul>
<li><a href="http://bazaar.canonical.com/">
    <img src="../_static/bzr icon 16.png" /> Главная</a>&nbsp;|&nbsp;</li>
<a href="http://doc.bazaar.canonical.com/ru/">Документация</a>&nbsp;|&nbsp;</li>

        <li class="nav-item nav-item-0"><a href="../index.html">Содержание (2.7.0)</a> &#187;</li>
 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2009-2011 Canonical Ltd.
      Создано с помощью <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.4.
    </div>
  </body>
</html>