bzr and perforce

Matt McClure mlm at aya.yale.edu
Sun Nov 16 10:28:07 GMT 2008


Hi Josh,

Thanks for posting to the list.

On Sat, Nov 15, 2008 at 7:08 PM, Josh Matthews <josh at joshmatthews.net> wrote:
> bzr fast-import takes the piped output of some frontend (in this case, git
> fast-import, unless I'm mistaken).

I think I misunderstood you the first time.  Yes, bzr fast-import
takes the output from a front-end.  If you were migrating from Git to
Bazaar, you could use the `git fast-*export*` front-end.  To my
knowledge, Bazaar-Perforce is the first project to provide such a
front-end for Perforce.  Git-p4 was doing most of the work, but it
piped the stream directly to `git fast-import` instead of emitting it
on stdout.

> And I tried both git-p4, and git
> fast-import directly, I believe (it was sometime in September, so I don't
> remember that well).  Anyways, I'll investigate bzr-p4 some more at work
> next week and see what the results are like.
>
> I've also been contemplating some stop-gap measures that would allow for
> two-way communication with a perforce server.  Currently, my idea is to use
> tailor to import the repo and keep it in sync.  Then I could write a bzr
> command (p4submit) that would scan through all commits since the last
> p4submit, find any that aren't marked as p4 changelists, and apply the diffs
> to the original files in the local perforce workspace.  Then it could p4
> submit the changed files with a commit message, and theoretically tailor
> would then have no problems updating.

The process you describe is very similar to what git-p4 does, and what
I imagine the first two-way support in Bazaar-Perforce will do, though
I don't intend to use Tailor.  The bzr2p4 tool in Bazaar-Perforce can
submit changes to Perforce, as you describe.  It's missing a reliable
way to determine which incremental changes it should submit.  I have
only used it for complete one-way migrations from Bazaar to Perforce
in the test suite.

> Simply going through these thought excercises makes me appreciate how
> wonderfully easy bzr-svn makes life.

It's nice to have a proof point like bzr-svn that shows how much
better the situation could be for Perforce.

Matt



More information about the bazaar mailing list