1
==========================
2
1
KnitPack repository format
3
2
==========================
7
Using KnitPack repositories
8
===========================
13
KnitPack is a new repository format for Bazaar, which is expected to be
14
faster both locally and over the network, is usually more compact, and
15
will work with more FTP servers.
17
Our benchmarking results to date have been very promising. We fully expect
18
to make a pack-based format the default in the near future. We would
19
therefore like as many people as possible using KnitPack repositories,
20
benchmarking the results and telling us where improvements are still needed.
25
A small percentage of existing repositories may have some inconsistent
26
data within them. It's is a good idea to check the integrity of your
27
repositories before migrating them to knitpack format. To do this, run::
31
If that reports a problem, run this command::
35
Note that this can take many hours for repositories with deep history
36
so be sure to set aside some time for this if it is required.
38
Creating a new knitpack branch
39
------------------------------
41
If you're starting a project from scratch, it's easy to make it a
42
``knitpack`` one. Here's how::
47
bzr commit -m "initial import"
49
In other words, use the normal sequence of commands but add the
50
``--pack-0.92`` option to the ``init`` command.
52
**Note:** In bzr 0.92, this format was called ``knitpack-experimental``.
54
Creating a new knitpack repository
55
----------------------------------
57
If you're starting a project from scratch and wish to use a shared repository
58
for branches, you can make it a ``knitpack`` repository like this::
61
bzr init-repo --pack-0.92 .
65
bzr commit -m "initial import"
67
In other words, use the normal sequence of commands but add the
68
``--pack-0.92`` option to the ``init-repo`` command.
70
Upgrading an existing branch or repository to knitpack format
71
-------------------------------------------------------------
73
If you have an existing branch and wish to migrate it to
74
a ``knitpack`` format, use the ``upgrade`` command like this::
76
bzr upgrade --pack-0.92 path-to-my-branch
78
If you are using a shared repository, run::
80
bzr upgrade --pack-0.92 ROOT_OF_REPOSITORY
82
to upgrade the history database. Note that this will not
83
alter the branch format of each branch, so
84
you will need to also upgrade each branch individually
85
if you are upgrading from an old (e.g. < 0.17) bzr.
86
More modern bzr's will already have the branch format at
87
our latest branch format which adds support for tags.
89
Starting a new knitpack branch from one in an older format
90
----------------------------------------------------------
92
This can be done in one of several ways:
94
1. Create a new branch and pull into it
95
2. Create a standalone branch and upgrade its format
96
3. Create a knitpack shared repository and branch into it
98
Here are the commands for using the ``pull`` approach::
100
bzr init --pack-0.92 my-new-branch
102
bzr pull my-source-branch
104
Here are the commands for using the ``upgrade`` approach::
106
bzr branch my-source-branch my-new-branch
108
bzr upgrade --pack-0.92 .
110
Here are the commands for the shared repository approach::
113
bzr init-repo --pack-0.92 .
114
bzr branch my-source-branch my-new-branch
117
As a reminder, any of the above approaches can fail if the source branch
118
has inconsistent data within it and hasn't been reconciled yet. Please
119
be sure to check that before reporting problems.
121
Testing packs for bzr-svn users
122
-------------------------------
124
If you are using ``bzr-svn`` or are testing the prototype subtree support,
125
you can still use and assist in testing KnitPacks. The commands to use
126
are identical to the ones given above except that the name of the format
127
to use is ``knitpack-subtree-experimental``.
129
WARNING: Note that the subtree formats, ``dirstate-subtree`` and
130
``knitpack-subtree-experimental``, are **not** production strength yet and
131
may cause unexpected problems. They are required for the bzr-svn
132
plug-in but should otherwise only be used by people happy to live on the
133
bleeding edge. If you are using bzr-svn, you're on the bleeding edge anyway.
139
If you need any help or encounter any problems, please contact the developers
140
via the usual ways, i.e. chat to us on IRC or send a message to our mailing
141
list. See http://bazaar-vcs.org/BzrSupport for contact details.
147
4
Bazaar 0.92 adds a new format (experimental at first) implemented in
148
``bzrlib.repofmt.pack_repo.py``.
5
``bzrlib.repofmt.pack_repo.py``.
150
7
This format provides a knit-like interface which is quite compatible
151
8
with knit format repositories: you can get a VersionedFile for a