15168
|
1 |
# Copyright 2009-2010 Gregory P. Ward |
|
2 |
# Copyright 2009-2010 Intelerad Medical Systems Incorporated |
|
3 |
# Copyright 2010-2011 Fog Creek Software |
|
4 |
# Copyright 2010-2011 Unity Technologies |
|
5 |
# |
|
6 |
# This software may be used and distributed according to the terms of the |
|
7 |
# GNU General Public License version 2 or any later version. |
|
8 |
|
|
9 |
'''track large binary files |
|
10 |
|
|
11 |
Large binary files tend to be not very compressible, not very "diffable", and |
|
12 |
not at all mergeable. Such files are not handled well by Mercurial\'s storage |
|
13 |
format (revlog), which is based on compressed binary deltas. largefiles solves |
|
14 |
this problem by adding a centralized client-server layer on top of Mercurial: |
|
15 |
largefiles live in a *central store* out on the network somewhere, and you only |
|
16 |
fetch the ones that you need when you need them. |
|
17 |
|
|
18 |
largefiles works by maintaining a *standin* in .hglf/ for each largefile. The |
|
19 |
standins are small (41 bytes: an SHA-1 hash plus newline) and are tracked by |
|
20 |
Mercurial. Largefile revisions are identified by the SHA-1 hash of their |
|
21 |
contents, which is written to the standin. largefiles uses that revision ID to |
|
22 |
get/put largefile revisions from/to the central store. |
|
23 |
|
|
24 |
A complete tutorial for using lfiles is included in ``usage.txt`` in the lfiles |
|
25 |
source distribution. See |
|
26 |
https://developers.kilnhg.com/Repo/Kiln/largefiles/largefiles/File/usage.txt |
|
27 |
''' |
|
28 |
|
|
29 |
from mercurial import commands |
|
30 |
|
|
31 |
import lfcommands |
|
32 |
import reposetup |
|
33 |
import uisetup |
|
34 |
|
|
35 |
reposetup = reposetup.reposetup |
|
36 |
uisetup = uisetup.uisetup |
|
37 |
|
|
38 |
commands.norepo += " lfconvert" |
|
39 |
|
|
40 |
cmdtable = lfcommands.cmdtable |