Source

hgsnap /

Filename Size Date modified Message
tests
2.5 KB
21.4 KB
182.1 KB
== snap ==

//snap// is a Mercurial extension for storing (big) file snapshots
outside a Mercurial repository.

This is useful for files which are either too big, or do not change in
small enough deltas to be stored in a source revision system like
Mercurial.  They would increase the repository size, memory
consumption, and run-time.

You enable snap like any other Mercurial extension, simply add
{{{
    [extensions]
    hgext.snap=/path/to/snap.py
}}}
to your ``.hgrc`` file (see hg help config).  Then you can get further
information with
{{{
$ hg help snap
}}}

The snap extension requires at least Mercurial 1.6, or TortoiseHG 1.1.4.



== Support ==

You may send questions to the main Mercurial mailing list:
[[mercurial@selenic.com]]

Contributions are also very welcome:

  [[http://mercurial.selenic.com/wiki/ContributingChanges]]

  [[http://mercurial.selenic.com/wiki/SuccessfulPatch]]


== Alternatives ==

You may check out bigfiles and hg-bfiles as well:

    [[http://bitbucket.org/avermel/bigfiles/]]

    [[http://vc.gerg.ca/hg/hg-bfiles/]]


== FAQ ==

===Since I use snap, my builder / make utility behaves erratically===

The modification time of files is not restored on update.  See the
Mercurial FAQ for the reasons:
[[http://mercurial.selenic.com/wiki/FAQ#FAQ.2BAC8-CommonProblems.Why_is_the_modification_time_of_files_not_restored_on_checkout.3F|Why
is the modification time of files not restored on checkout?]].

Whenever you store result files (derived from other files) in
Mercurial and then update them, you never know whether their
modification time is earlier or later than of the files they are
derived from.

You may use a hook to fix the modification time of result files after
updates.  See [[http://www.selenic.com/mercurial/hgrc.5.html]] for
information about hooks.

===How can I prevent the exchange of snapped files' data between two repositories?  I do not want to send xxx GB around!===

You can set the paths //snap-store//, and //snap-default// or
//snap-default-push// to the same store.  Later, you can exchange the
snap files explicitly with debugsnappull and debugsnappush.


===I do not like the implicit detection and storage of to be snapped files.  How can I make this explicit?====

First you may add to your .hgrc (see hg help config) the following to
set the size threshold for files to be snapped to the max value:
{{{
    [snap]
    size_threshold = 750000000
}}}

Then you can commit files to be snapped with the command:
{{{
$ hg commit --config snap.patterns='**' <files>
}}}