Cached files [was Re: Inner repos]

Marco Canini marco.canini at fastwebnet.it
Sat Dec 31 16:59:56 GMT 2005


On Saturday 31 December 2005 17:35, John A Meinel wrote:
> Marco Canini wrote:
> > Hi John,
> > thanks for the fast reply.
> > I'm playing a bit with bzr since yesterday, I'm happy to know I can do
> > that. Another question: well maybe it's more than one
> > Why the push cmd is not shipped with bzr?
> > I think that for a distributed rcs it's really important to have the push
> > cmd.
>
> What version are you using? I'm assuming you are using bzr 0.6, which
> was released a very long time ago (in bzr age).

Yes, I'm with 0.6.2
I'll take the latest bzr.dev, however I think I don't need sftp cause my I 
mount the server dir with NFS. I think local transport is the one that get 
used in that case, right?

> The main developer (Martin Pool), went on vacation just before he was
> going to release 0.7, which has lots of improvements.
>
> The push that is present in bzrtools is a little bit dangerous, as it
> just does an rsync push. It does do some checks to help prevent you from
> overwriting stuff accidentally, but it isn't really designed around a
> shared branch.
>
> You might grab the latest bzr.dev. We now have a built-in push command,
> and if you install paramiko (http://www.lag.net/paramiko/) you will also
> get sftp support. (The only limitation is that it won't update the
> remote working tree).
>
> > Another thing I'm really interested in is the support for plugins.
> > Now bzr would be really perfect to me if it could support through a
> > plugin this use case.
> > First lemme say that it's fantastic to have only one .bzr directory.
> > My ideal use of bzr would be to have two branches, one on a backed up
> > server, the other on my laptop. The second would be a clone of the first.
> > However in those branches I would not only keep sources, or in general
> > textual files, but also binary files.
> > Except in rare case I would not be interested to enable revision control
> > for those binary files, however I would like them to be known by bzr so
> > that they can be synched between server and laptop.
> > I know it's kinda a mix between rsync or unison and a rcs, but that would
> > be great for me.
> > Do you think it's feasible? Or does it already exist?
>
> Well, there are a few things here. First, bzr handles binary files just
> fine. It never modifies file contents, so you don't have to worry about
> keyword expansion or something like that.

When you say never you mean also for textual files? There's no $Id$ in bzr?

> Its delta compression on binary files is relatively poor. It just hasn't
> been something we focused on. (Our storage splits on newlines, which is
> valid for even binary files, but is far from optimal).
>
> I'm not sure how you would make files "not revision controlled, but
> known by the revision control system".

I mean I don't want the rcs to make copy of the file kept under .bzr with all 
deltas. In my case I've big binary files, that are likely to never change, 
but you never know.
But I want them to belong to the branch, so that if I modify one of those 
files or I add a new one, after I do bzr push, the file is sent to 
parent/remote branch.

Another example that comes to my mind is this:
I've a lot of images that are automatically generated with gnuplot, or they 
are in .svg and are converted to some raster format.
In one philosophy one could think that it's wrong to store into the branch 
something that is automatically generated.
However it's really convenient because those images are linked into some 
documents and sometimes the thing I want to do is read/modify the document 
without worrying if I have all the sw stack installed to generate the images.
In this situation I would keep the most up to date version of the images in 
the branch without keeping all their revisions.
They would be like cached files.

I hope I've described the idea better this time.
What do you think?

> If you wanted, you could take 
> either bzrtools' push, or my rsync plugin
> (http://bzr.arbash-meinel.com/plugins/bzr-rsync/)
>
> It would be pretty simple to add a new file: .rsyncinclude
> Right now my rsync plugin pays attention to .bzrignore and .rsyncexclude
>
> By adding support for .rsyncinclude, you could put whatever binary files
> you wanted in there, and then when you do 'bzr rpush' it would invoke
> rsync to copy over all of the version controlled files, and then your
> binary files.
>
> Is that what you were hoping for?
>
> > Thanks
>
> John
> =:->

-- 
Marco Canini




More information about the bazaar mailing list