<!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"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Releasing a project — Bazaar 2.7.0 documentation</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"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '2.7.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </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> <link rel="shortcut icon" href="../_static/bzr.ico"/> <link rel="search" title="Search" href="../search.html" /> <link rel="top" title="Bazaar 2.7.0 documentation" href="../index.html" /> <link rel="up" title="Bazaar User Guide" href="index.html" /> <link rel="next" title="Undoing mistakes" href="undoing_mistakes.html" /> <link rel="prev" title="Browsing history" href="browsing_history.html" /> </head> <body role="document"> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="undoing_mistakes.html" title="Undoing mistakes" accesskey="N">next</a></li> <li class="right" > <a href="browsing_history.html" title="Browsing history" accesskey="P">previous</a> |</li> <li><a href="http://bazaar.canonical.com/"> <img src="../_static/bzr icon 16.png" /> Home</a> | </li> <a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li> <li class="nav-item nav-item-0"><a href="../index.html">Table of Contents (2.7.0)</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Bazaar User Guide</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="releasing-a-project"> <h1>Releasing a project<a class="headerlink" href="#releasing-a-project" title="Permalink to this headline">¶</a></h1> <div class="section" id="packaging-a-release"> <h2>Packaging a release<a class="headerlink" href="#packaging-a-release" title="Permalink to this headline">¶</a></h2> <p>The <code class="docutils literal"><span class="pre">export</span></code> command is used to package a release, i.e. to take a copy of the files and directories in a branch and package them into a fresh directory or archive. For example, this command will package the last committed version into a <code class="docutils literal"><span class="pre">tar.gz</span></code> archive file:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">export</span> <span class="o">../</span><span class="n">releases</span><span class="o">/</span><span class="n">my</span><span class="o">-</span><span class="n">stuff</span><span class="o">-</span><span class="mf">1.5</span><span class="o">.</span><span class="n">tar</span><span class="o">.</span><span class="n">gz</span> </pre></div> </div> <p>The <code class="docutils literal"><span class="pre">export</span></code> command uses the suffix of the archive file to work out the type of archive to create as shown below.</p> <blockquote> <div><table border="1" class="docutils"> <colgroup> <col width="40%" /> <col width="60%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Supported formats</th> <th class="head">Autodetected by extension</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>dir</td> <td>(none)</td> </tr> <tr class="row-odd"><td>tar</td> <td>.tar</td> </tr> <tr class="row-even"><td>tbz2</td> <td>.tar.bz2, .tbz2</td> </tr> <tr class="row-odd"><td>tgz</td> <td>.tar.gz, .tgz</td> </tr> <tr class="row-even"><td>zip</td> <td>.zip</td> </tr> </tbody> </table> </div></blockquote> <p>If you wish to package a revision other than the last one, use the <code class="docutils literal"><span class="pre">-r</span></code> option. If you wish to tune the root directory inside the archive, use the <code class="docutils literal"><span class="pre">--root</span></code> option. See the online help or User Reference for further details on the options supported by <code class="docutils literal"><span class="pre">export</span></code>.</p> </div> <div class="section" id="tagging-a-release"> <h2>Tagging a release<a class="headerlink" href="#tagging-a-release" title="Permalink to this headline">¶</a></h2> <p>Rather than remembering which version was used to package a release, it’s useful to define a symbolic name for a version using the <code class="docutils literal"><span class="pre">tag</span></code> command like this:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">tag</span> <span class="n">version</span><span class="o">-</span><span class="mi">1</span><span class="o">-</span><span class="mi">5</span> </pre></div> </div> <p>That tag can be used later whenever a revision identifier is required, e.g.:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bzr</span> <span class="n">diff</span> <span class="o">-</span><span class="n">r</span> <span class="n">tag</span><span class="p">:</span><span class="n">version</span><span class="o">-</span><span class="mi">1</span><span class="o">-</span><span class="mi">5</span> </pre></div> </div> <p>To see the list of tags defined in a branch, use the <code class="docutils literal"><span class="pre">tags</span></code> command.</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="#">Releasing a project</a><ul> <li><a class="reference internal" href="#packaging-a-release">Packaging a release</a></li> <li><a class="reference internal" href="#tagging-a-release">Tagging a release</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="browsing_history.html" title="previous chapter">Browsing history</a></p> <h4>Next topic</h4> <p class="topless"><a href="undoing_mistakes.html" title="next chapter">Undoing mistakes</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/user-guide/releasing_a_project.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <form class="search" action="../search.html" method="get"> <div><input type="text" name="q" /></div> <div><input type="submit" value="Go" /></div> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </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>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="undoing_mistakes.html" title="Undoing mistakes" >next</a></li> <li class="right" > <a href="browsing_history.html" title="Browsing history" >previous</a> |</li> <li><a href="http://bazaar.canonical.com/"> <img src="../_static/bzr icon 16.png" /> Home</a> | </li> <a href="http://doc.bazaar.canonical.com/en/">Documentation</a> | </li> <li class="nav-item nav-item-0"><a href="../index.html">Table of Contents (2.7.0)</a> »</li> <li class="nav-item nav-item-1"><a href="index.html" >Bazaar User Guide</a> »</li> </ul> </div> <div class="footer" role="contentinfo"> © Copyright 2009-2011 Canonical Ltd. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.9. </div> </body> </html>