Source

thg / doc / source / archive.txt

Archiving
=========

.. module:: archive.dialog
	:synopsis: Dialog used to make an archive of a repository

You can choose from quite a lot of formats to make an archive of a repository.
There are the usual compressed formats, of course, but it's also possible to make a
folder of the uncompressed files in a place other than the Working Directory (like a clone,
but without the .hg folder). Such archives, for example, can be useful for doing builds (similar
to 'svn export'). Archives may also be useful for sending changes to external people
without access to the reposity, where only the effected files of a given revision or set
of revisions need be included in the archive.


From TortoiseHg
---------------

From the changelog context menu in the Workbench select
:menuselection:`Export --> Archive...` for the choosen changeset.

.. figure:: figures/archive.png
	:alt: Archive dialog

	Repository Archive Dialog

:guilabel:`Revision`
	To select the revision you wish to archive or export.
:guilabel:`Only files modified/created in this revision`
	To limit the number of files in the archive.
:guilabel:`Destination path`
	The filename or directory where the archive will be created. The archive is filled
	with the name of the current repository, suffixed with the revision number
	of the selected revision, and has the appropriate extension of the selected
	archive type.
:guilabel:`Archive types`
	Here you can choose the type of archive to create, ranging from a plain
	folder with files to a variety of standard archive type.
:guilabel:`Hg command`
	This field displays the command that will be executed by the dialog.
:guilabel:`Always show output`
	To have an logging output pane with the results of the command while it runs.

Archiving a repository means create an archive file or subdirectory with the
contents of the selected revision.

From command line
-----------------

The archive tool can be started from command line ::

	thg archive

The syntax is ::

	thg archive -r [REV] -t [TYPE] [DEST]

where [REV] is the revision to archive, [TYPE] is the type of archive to create,
and [DEST] is the name of the file or folder to create.

See `hg.1.html#archive <http://www.selenic.com/mercurial/hg.1.html#archive>`_ 
for details, or type :command:`hg help archive` at the command line or in the
Output Log of the Workbench.

.. vim: noet ts=4
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.