[PATCH] Branch and pull-- now with remote

Erik Bågfors zindar at gmail.com
Mon Jun 6 14:18:17 BST 2005


On 6/6/05, Martin Pool <mbp at sourcefrog.net> wrote:
> On  6 Jun 2005, duchier at ps.uni-sb.de wrote:
> > Martin Pool <mbp at sourcefrog.net> writes:
> >
> > >> Getting somewhat off-topic here.  When it comes to remote branches.  I
> > >> know you Martin has been talking about having inteligence on both
> > >> sides of the pipe. I think this would be a good idea, however, I also
> > >> think that it's needed to have support for remote dumb storage.
> > >
> > > Yes, I certainly want remote dumb storage.  Writing to remote dumb
> > > storage is a bit harder because of the need to get the locking and
> > > permissions right, but I think it can be done in this model.
> >
> > This is getting back to something I mentioned a while back (revlib server
> > ideas).  The point to keep in mind is that even when the backend is dumb, you
> > are talking to a smart server: it's just that the smart server is then running
> > in the client.
> >
> > I think that it is essential to not make the same mistake as arch: namely,
> > dumbing it all down to operations on a file system.  Let the interface to the
> > specific backend dumb things down where necessary, but leave open the
> > possibility of smarter backends.
> 
> Such a layer already exists in bzr through the Branch class.  I think
> Erik just said that he introduced a new subclass that operates over
> ssh.  You could easily have another one that e.g. looks things up in
> an SQL database.

Well, acctually, what I did was hack remotebranch to handle ssh as
well.  It was ugly.  I was thinking of doing a RemoteSSHBranch class
but it turned out that I had to copy most of RemoteBranch anyway.

> I wouldn't claim the abstraction is perfectly factored just yet but I
> think it's in approximately the right place.

I think having "Branches" with "BranchStorage" or various kinds, like
you suggested in another mail, is the way to go.  Then you only need
to define how to operate the storage and the rest of the branch-stuff
would be fixed automatically.

Cheers,
Erik




More information about the bazaar mailing list