<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">
<sect1 id="tsvn-dug-repobrowser">
  <title>The Repository Browser</title>
  <indexterm>
    <primary>repo-browser</primary>
  </indexterm>
  <indexterm>
    <primary>server-side actions</primary>
  </indexterm>
  <indexterm>
    <primary>copy</primary>
  </indexterm>
  <indexterm>
    <primary>rename</primary>
  </indexterm>
  <indexterm>
    <primary>server viewer</primary>
  </indexterm>
  <?dbhh topicname="HIDD_REPOSITORY_BROWSER"?>
  <?dbhh topicname="HIDD_REVISION"?>
  <para>
    Sometimes you need to work directly on the repository, without having
    a working copy. That's what the <firstterm>Repository Browser</firstterm>
    is for. Just as the explorer and the icon overlays allow you to view your
    working copy, so the Repository Browser allows you to view the structure
    and status of the repository.
    <figure id="tsvn-dug-repobrowser-dia-1">
      <title>The Repository Browser</title>
      <graphic fileref="../images/Repobrowser.png"/>
    </figure>
    With the Repository Browser you can execute commands like copy, move,
    rename, ... directly on the repository.
  </para>
  <para>
    The repository browser looks very similar to the Windows explorer,
    except that it is showing the content of the repository at a particular
    revision rather than files on your computer. In the left pane you
    can see a directory tree, and in the right pane are the contents
    of the selected directory.
    At the top of the Repository Browser Window you can enter the URL of
    the repository and the revision you want to browse.
  </para>
  <para>
    Folders included with the <literal>svn:externals</literal> property are
    also shown in the repository browser. Those folders are shown with a
    small arrow on them to indicate that they are not part of the repository
    structure, just links.
  </para>
  <para>
    Just like Windows explorer, you can click on the column headings in
    the right pane if you want to set the sort order. And as in explorer
    there are context menus available in both panes.
  </para>
  <para>
    The context menu for a file allows you to:
    <itemizedlist>
      <listitem>
        <para>
          Open the selected file, either with the default viewer for
          that file type, or with a program you choose.
        </para>
      </listitem>
      <listitem>
        <para>
          Edit the selected file. This will checkout a temporary working copy and start the
          default editor for that file type. When you close the editor program, if changes
          were saved then a commit dialog appears, allowing you to enter a comment and commit
          the change.
        </para>
      </listitem>
      <listitem>
        <para>
          Show the revision log for that file, or show a graph of
          all revisions so you can see where the file came from.
        </para>
      </listitem>
      <listitem>
        <para>
          Blame the file, to see who changed which line and when.
        </para>
      </listitem>
      <listitem>
        <para>
          Checkout a single file. This creates a <quote>sparse</quote> working copy
          which contains just this one file.
        </para>
      </listitem>
      <listitem>
        <para>
          Delete or rename the file.
        </para>
      </listitem>
      <listitem>
        <para>
          Save an unversioned copy of the file to your hard drive.
        </para>
      </listitem>
      <listitem>
        <para>
          Copy the URL shown in the address bar to the clipboard.
        </para>
      </listitem>
      <listitem>
        <para>
          Make a copy of the file, either to a different part of the
          repository, or to a working copy rooted in the same repository.
        </para>
      </listitem>
      <listitem>
        <para>
          View/Edit the file's properties.
        </para>
      </listitem>
      <listitem>
        <para>
          Create a shortcut so that you can quickly start repo browser again,
          opened directly at this location.
        </para>
      </listitem>
    </itemizedlist>
  </para>
  <para>
    The context menu for a folder allows you to:
    <itemizedlist>
      <listitem>
        <para>
          Show the revision log for that folder, or show a graph of
          all revisions so you can see where the folder came from.
        </para>
      </listitem>
      <listitem>
        <para>
          Export the folder to a local unversioned copy on your hard drive.
        </para>
      </listitem>
      <listitem>
        <para>
          Checkout the folder to produce a local working copy on your hard drive.
        </para>
      </listitem>
      <listitem>
        <para>
          Create a new folder in the repository.
        </para>
      </listitem>
      <listitem>
        <para>
          Add unversioned files or folders directly to the repository.
          This is effectively the Subversion Import operation.
        </para>
      </listitem>
      <listitem>
        <para>
          Delete or rename the folder.
        </para>
      </listitem>
      <listitem>
        <para>
          Make a copy of the folder, either to a different part of the
          repository, or to a working copy rooted in the same repository.
          This can also be used to create a branch/tag without the need
          to have a working copy checked out.
        </para>
      </listitem>
      <listitem>
        <para>
          View/Edit the folder's properties.
        </para>
      </listitem>
      <listitem>
        <para>
          Mark the folder for comparison. A marked folder is shown in bold.
        </para>
      </listitem>
      <listitem>
        <para>
          Compare the folder with a previously marked folder, either as
          a unified diff, or as a list of changed files which can then be
          visually diffed using the default diff tool. This can be particularly
          useful for comparing two tags, or trunk and branch to see what changed.
        </para>
      </listitem>
    </itemizedlist>
  </para>
  <para>
    If you select two folders in the right pane, you can view the differences
    either as a unified-diff, or as a list of files which can be visually diffed
    using the default diff tool.
  </para>
  <para>
    If you select multiple folders in the right pane, you can checkout all
    of them at once into a common parent folder.
  </para>
  <para>
    If you select 2 tags which are copied from the same root
    (typically <literal>/trunk/</literal>), you can use
    <menuchoice>
      <guimenu>Context Menu</guimenu>
      <guimenuitem>Show Log...</guimenuitem>
    </menuchoice>
    to view the list of revisions between the two tag points.
  </para>
  <para>
    External items (referenced using <literal>svn:externals</literal> are also
    shown in the repository browser, and you can even drill down into the folder
    contents. External items are marked with a red arrow over the item.
  </para>
  <para>
    You can use <keycap>F5</keycap> to refresh the view as usual. This will
    refresh everything which is currently displayed. If you want to pre-fetch
    or refresh the information for nodes which have not been opened yet, use
    <keycap>Ctrl-F5</keycap>. After that, expanding any node will happen
    instantly without a network delay while the information is fetched.
  </para>
  <para>
    You can also use the repository browser for drag-and-drop operations.
    If you drag a folder from explorer into the repo-browser, it will be
    imported into the repository. Note that if you drag multiple items,
    they will be imported in separate commits.
  </para>
  <para>
    If you want to move an item within the repository, just <action>left drag</action>
    it to the new location. If you want to create a copy rather than moving the item,
    <keycap>Ctrl</keycap>-<action>left drag</action> instead. When copying, the cursor has a
    <quote>plus</quote> symbol on it, just as it does in Explorer.
  </para>
  <para>
    If you want to copy/move a file or folder to another location and also
    give it a new name at the same time, you can <action>right drag</action>
    or <keycap>Ctrl</keycap>-<action>right drag</action> the item instead of using
    <action>left drag</action>. In that case, a rename dialog
    is shown where you can enter a new name for the file or folder.
  </para>
  <para>
    Whenever you make changes in the repository using one of these methods,
    you will be presented with a log message entry dialog. If you dragged
    something by mistake, this is also your chance to cancel the action.
  </para>
  <para>
    Sometimes when you try to open a path you will get an error message
    in place of the item details. This might happen if you specified an
    invalid URL, or if you don't have access permission, or if there is
    some other server problem. If you need to copy this message to include
    it in an email, just right click on it and use
    <menuchoice>
      <guimenu>Context Menu</guimenu>
      <guimenuitem>Copy error message to clipboard</guimenuitem>
    </menuchoice>,
    or simply use <keycap>Ctrl+C</keycap>.
  </para>
  <para>
    Bookmarked urls/repositories are shown below the current repository folders
    in the left tree view. You can add entries there by <action>right clicking</action>
    on any file or folder and select
    <menuchoice>
      <guimenu>Context Menu</guimenu>
      <guimenuitem>Add to Bookmarks</guimenuitem>
    </menuchoice>.
    Clicking on a bookmark will browse to that repository and file/folder.
  </para>
</sect1>
