questions on development(7)

Mike Meyer mwm-keyword-freebsdhackers2.e313df at mired.org
Tue Nov 13 19:56:18 PST 2007


On Tue, 13 Nov 2007 21:45:30 +0200 Giorgos Keramidas <keramida at freebsd.org> wrote:
> > I wonder if ther is a way we could broadcast changes to the p4 'head'
> > branch so that people could keep their own p4 servers up to date.
> 
> Unfortunately, no.  Perforce is not easy to 'mirror' around the world,
> but it's ok.

Actually, it is easy. Well, sort of, as whether or not what you're
doing is a mirror depends on how you want to define 'mirror'.  It
looks and acts like a read-only local copy, but it isn't. Instead,
your server fetches the bits it needs from the remote server on
demand.

> For a determined person, it should be fairly easy to set
> up a local mirror of any part of the FreeBSD src tree, using one of
> the distributed SCMs.  They have *great* support for mirroring clones
> of the original repository, and most of them have fairly good support
> for incremental updates over the wire --- transferring the minimal
> number of bits and bytes over a slow connection, they can keep an up to
> date local clone of a remote tree.
> 
> I don't know of anything which can do the same for Perforce depots;
> which is unlucky, because it would help me *tremendously* in my every
> day ${realjob} too.   If anyone wants help with setting up Mercurial to
> do something like this, however, I'm all for it and I will help in any
> way I can.

What you want to do is set up the master (where you are mirroring
from) as a remote depot on your local server. You then treat the
appropriate part of that as the "vendor branch". You treat it just
like you'd treat a vendor branch most other SCMs - except you don't
have to "import new vendor code". You need local changes? Create a
local branch of the vendor branch, and work there. You need to merge
vendor changes into your branch? You do it just like you would if it
were in the local repository. You want to grovel through the change
logs of the vendor branch? Those are there as well, just like they are
in a distributed SCM.

It isn't the same as having a local repository in a distributed SCM,
so the advantages and disadvantages are different. Whether or not
it'll do the job you want depends on the exact nature of the job. But
I've been happy doing things this way.

     <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


More information about the freebsd-hackers mailing list