[RFC] Caching in Stacked Branches
John Arbash Meinel
john at arbash-meinel.com
Wed Feb 25 18:10:03 GMT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
At the moment stacked branches only contain what you have pushed into
them. Which means they work fairly well for "publishing" (bzr push
- --stacked).
There is another use for stacked branches, which is the "get me the tip
of a project so I can make a quick patch". As an example, to branch
"python/trunk" takes about 200+ MB to download. By comparison, doing
"bzr branch --stacked" only really needs to download about 21MB to get
all of the working files.
The downside, though, is that you download that 21MB, and then have to
download it *again* whenever doing any more work. (Such as during,
commit, diff, etc.)
One fairly obvious possibility, would be to have Stacked branches cache
any data that gets requested from a fallback.
I was looking into it in the past, and the problem is that stuff like
"diff" only has a read lock, and to insert things into the repo, you
really need a write_lock() + start_commit_group().
We could add a new locking, which would be aware of wanting to cache
things in the stacked branch.
Any thoughts? It would be pretty slick if doing:
bzr branch --stacked $BIG_PROJECT work
cd work
< change stuff >
bzr diff
bzr commit -m "my local change"
bzr send
Could download just the content for the working files, and then not have
to download anything extra.
(I was able to hack this together as a test, but it seems like something
we would really want to support.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmliXsACgkQJdeBCYSNAANi3QCdGGA6EF/Kk9S44nl2nMc5FJ3J
J7YAn3fTQcIjaBnq97IEeeqR2XVto092
=FsBV
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list