Is it possible to store only new version of some files in repo ?

Colin D Bennett colin at gibibit.com
Mon Nov 17 00:16:21 GMT 2008


On Sun, 16 Nov 2008 11:16:11 +0800
"Kan Liu" <kan.k.liu at gmail.com> wrote:

> Is it possible to store only new version of some files in repo? And
> how to do so?
> For example, I want to keep  only new version of *.so and *.jpg files
> in code tree.

Strictly speaking, no.  That would be directly contrary to the purpose
of a version control system.

Depending on the details of your situation, there are a couple of
recommendations I would make, however.

(1) If the .so and .jpg files are generated from other files in the
tree, then don't check them in at all.  Generally, I would never check
in a .so file unless it's a 3rd party closed-source library that you
are using.

(2) If the .so and .jpg files are required for the system (and not
generated), then you may want to have them versioned so that you can
always take a revision of the branch and build the system with no other
external dependencies.  If you just want to save space in the repo, you
could use stacking, lightweight checkouts, and/or shared repositories to
reduce the space/time overhead of having these files versioned.

With a lightweight checkout, you can check out the branch without
bringing the entire history along.  I almost always create a shared
repository with tree-less branches to store the project branches, and
then I do lightweight checkouts into a 'work' directory.  The 'work'
directory is then something I can remove when I've checked in my
changes to save disk space, and all the history is stored in the shared
repo in an efficient way that avoids duplication when you create
many branches.

In the future you should be able to use a 'history horizon' to clone
remote branches without bringing the entire history along at once.
<http://bazaar-vcs.org/HistoryHorizon>

Hopefully this is helpful, but if you want to explain your situation
better, perhaps we can give you some more appropriate answers.

Regards,
Colin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081116/5387c70e/attachment.pgp 


More information about the bazaar mailing list