
<refentry id="svn-do">
      <refentryinfo>
        <address>
          <email>blade@debian.org</email>
          </address>
        <address>
          &dhemail;
        </address>
        <author>
          <firstname>Eduard</firstname>
          <surname>Bloch</surname>
          <contrib>This manual page was written by Eduard Bloch in roff.
          </contrib>
        </author>
        <author>
          <firstname>Goneri</firstname>
          <surname>Le Bouder</surname>
          <contrib>Converted manpages to SGML.</contrib>
        </author>
        <author>
          &dhfirstname;
          &dhsurname;
          <contrib>Converted manpages to DocBook XML and current Debian maintainer
          </contrib>
        </author>
        <copyright>
          <year>2009</year>
          <holder>&dhusername;</holder>
        </copyright>
        &dhdate;
      </refentryinfo>
  <refmeta>
    <refentrytitle>&dopackage;</refentrytitle>

    &dhsection;
  </refmeta>
  <refnamediv>
    <refname>&dopackage;</refname>

    <refpurpose>export a source and run a command inside the source.</refpurpose>

  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dopackage; COMMAND</command>

    </cmdsynopsis>
  </refsynopsisdiv>
  <refsect1>
    <title>DESCRIPTION</title>

    <para><command>svn-do</command> will use <command>svn-buildpackage</command>
    to export a source, run a
    command inside the exported source and, if the command succeeds,
    copy back the debian/ tree</para>
  </refsect1>
  <refsect1>
    <title>Examples</title>
    <para>clean the tree (useful if this requires the full source tree)
    </para>
    <programlisting>
$ svn-do debclean
I: Exporting source tree via svn-buildpackage...
[...]
I: Running command: debclean
[...]
I: Copying back the debian/ tree...
'debian/control' -> 'path/package/debian/control'
    </programlisting>
    <para>use <command>quilt</command> to refresh a patch</para>
    <programlisting>
$ QUILT_PATCHES=debian/patches svn-do \
 sh -c "quilt push 002_static-linking-dont-build-perf.patch; \
 quilt refresh"
[...]
I: Copying back the debian/ tree...
[...]
'debian/patches/002_static-linking-dont-build-perf.patch' ->
'/path/package/debian/patches/002_static-linking-dont-build-perf.patch'
     </programlisting>
     <para>Start a source editing session and decide later not to copy
     back the debian/ tree</para>
     <programlisting>
$ svn-do $SHELL
[...]
I: Running command: /bin/zsh
% exit 1
E: command exited with 1; not copying back the debian/ tree.
    </programlisting>
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>

      <variablelist>

      <varlistentry>
        <term>
          <citerefentry> <refentrytitle>/usr/share/doc/svn-buildpackage/</refentrytitle></citerefentry>
        </term>
        <listitem>
          <para>The svn-buildpackage HOWTO manual</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <citerefentry> <refentrytitle>svn-inject</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
        </term>
        <listitem>
          <para>puts a Debian source package into Subversion repository</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <citerefentry> <refentrytitle>svn-upgrade</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
        </term>
        <listitem>
          <para>upgrade source package from a new upstream revision</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <citerefentry> <refentrytitle>svn</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
        </term>
        <listitem>
          <para>Subversion command line client tool</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <citerefentry> <refentrytitle>dpkg-buildpackage</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
        </term>
        <listitem>
          <para>Debian source package tools</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <citerefentry> <refentrytitle>lintian</refentrytitle> <manvolnum>1</manvolnum> </citerefentry>
        </term>
        <listitem>
          <para>Debian package checker</para>
        </listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

</refentry>
