开发者

Is there a bi-directional bridge between p4 and git?

开发者 https://www.devze.com 2023-03-15 02:22 出处:网络
Is there a good (reliable and automated) method for moving git changes between perforce and git for multiple users? git-p4 seems to handle the single user case well but I\'m looking for a multi user o

Is there a good (reliable and automated) method for moving git changes between perforce and git for multiple users? git-p4 seems to handle the single user case well but I'm looking for a multi user option.

We are currently moving from many different source control systems to one; git. We may either need to move from git to perforce and provide a good way to showcase git to the perforce. For ether case a bi-direction bridge between the two will be essential.

Is there something out there that provides bidirectional traffic between git and p4 for multiple 开发者_JS百科users?


Frankly, you're better off just migrating to Git, and perhaps checking in the git repository itself to perforce if you have a requirement for one reason or another to use perforce.

git <-> perforce bridges are problematic, especially in a distributed environment. Either have one person act as a gatemaster - or have each person sync with perforce individually and not with each other.

--------- UPDATED ---------------

It looks like Perforce has provided 'Perforce Fusion' - see http://www.perforce.com/product/components/git-fusion

This may be a workable solution, and they have a free trial.


I have not heard of a solution. When faced with something like this, I usually go to a scripted solution and try not to bother bringing in the exact history. Usually anything marked as a release from the past 5 releases and all previous major releases. Keep the old repositories around in case you do need to look at a specific commit, but that's only on an as-needed basis.

Hope this helps a bit.

Good luck!


I enhanced git-p4 so that it uses git notes (https://github.com/ermshiperete/git-p4). This has the advantage that the git repo can be shared by multiple people. However, it still doesn't allow complete automation because every developer has to submit his/her own changes to p4.

The way I set it up is that a script on the server checks if any new changes have been checked in to p4. If so it does a git-p4 sync and pushes the changes to the git repo (including the git-p4 notes). Developers working with git pull the master branch and the git-p4 notes branch from the git repo, make their changes and submit them to the local git repo. They then do a git p4 submit and afterwards push master + git-p4 notes branch to the remote git repo.

This works fairly well, although occasionally the server script checking p4 chokes - which I blame on my script. However, this is a band-aid solution and I hope we can move entirely to git soon.

0

精彩评论

暂无评论...
验证码 换一张
取 消