Converting panda CVS repository to Git

Made panda3d mirror on github :mrgreen:
github.com/rndbit/panda3d

Would it be too much effort running both VCS in parallel? I bet there are easy to use automatic tools, maybe even ready-to-use hooks.

If this is no option, I say a poll is the democratic way.

from what I read git<->hg interoperability is rather good. running git mirror of hg seems much easier than get mirror of CVS.

Which conversion tool did you use? Are you going to update the github mirror from time to time?

I can probably maintain a git mirror if and when we migrate to Mercurial, since it’ll be relatively easy to convert between the two.

I think CVS is preventing some people to contribute (me included) because it’s horrible to use, expecially for the missing global repository revision.
Is there any plan? Are there any migration tasks anyone can contribute to?

I’m spending my spare time on this. It’s not easy to convert because there are so many weird things that one can do with branches and tags in CVS, and we’ve done all of them in the Panda3D repository. I may have to resort to writing my own conversion tool.

Note that it’s very easy to do a simple conversion that will seem OK at first glance, such as what you might get when you do “hg convert panda3d”. But it’s a lot more difficult to get all of the tags and branches to behave correctly, since CVS versions per-file instead of per-repository. (Imagine each file in CVS being a separate repository with its own version history.)

If you would like to work with an existing mirror of the repository for now, I’m happy to accept patches generated by “git format-patch”.

i used cvs2svn. i made notes of my actions in form of shell script too.

mkdir panda3d-cvs
cd panda3d-cvs
rsync -av rsync://panda3d.cvs.sourceforge.net/cvsroot/panda3d/* .
cvs2git --encoding=utf-8 --fallback-encoding=ascii --dumpfile=../panda3d.dump --blobfile=../panda3d.blob --username=panda3d-team .
cd ..
mkdir panda3d-git
cd panda3d-git
git init
git fast-import --export-marks=../panda3d-marks.dat < ../panda3d.blob
git fast-import --import-marks=../panda3d-marks.dat < ../panda3d.dump
git gc --prune=now
git checkout

I i will keep it updated as soon as i figure how to carry out such incremental updates. Thanks to nature of cvs it is not exactly straightforward.

so you sided with mercurial? since hg<->git conversion is pretty good you can do conversion through git if it yields better result than converting directly to hg. like cvs → git → hg.

I’ve ran cvs2hg using the same encoding as the post above. Here is the fruit of that labor: croxis.net/panda3d/pandahg.7z

The hg folder is hg/.hg

Hi,
is there any update on the migration to another revision system? From time to time, I also need to modify/add few lines to the panda code. If, for example, I could just issue a git pull request, it would be easy to contribute these back to the community. In addition, it would be easier to rebase my local changes onto the current state of the panda code.
It really feels like any other system than cvs would significantly lower the entrance barrier for new developers :wink:
Best
Timo

I think that nowadays it is at least strange for an open source project to have a CVS repository.
My team used CVS and we switched to SVN long time ago.
SVN was better then CVS in many ways, but DVCS systems are really a different story and it is a real “level up”.
And not only because of distributed structure - tools like github.com make the development process to be much more social.
There is a good example of moving from SVN to Git of the open source project. This is Yii (PHP framework) and it was hosted on Google Code. The question of moving to DVCS was several times discussed on a forum and core developers agreed that this would be good to do, but of cause they were busy with code.
Then there was a “loud” forum post and things changed and Yii moved to github.
The post called “Yii is closed open source” - yiiframework.com/forum/index … en-source/. I think most of it is also true for current Panda situation.
With github it is 100 times easier to contriute to the OS project and it is 100 times easier for core developers to review, discuss and merge contributions.

Regarding the Git vs Hg - I used both and I think it is pointless to try to choose one or another based on features. Both have equal power and you need to learn each one to use effectively. Both work well on Linux and Windows.
So it is better to think on code hosting and compare not git and hg, but github.com and bitbucket.org (or other code hostings).
I did not used bitbucket extensively and can not compare them, but github is very good and it’s collaboration features and tools are especially great for an open source project.

You’re preaching to the choir. I’m probably the one who has the most to gain from migrating. We just need to get all the details worked out, and get everybody comfortable with the system before we feel confident enough to migrate.

Please don’t get me wrong. I am a newcomer here and maybe just a random stranger. Even not a game developer.
But what I see here is a topic which is half year old and still no visible progress.
What I am trying to say is that moving to git will bring new possibilities for panda and the most complex thing is to make a decision.
Once you decide to move it is a matter of hours and not months to actually do this:

  • Convert repository and make sure your commit history transferred and accessible (most complex part)
  • Learn basics of the selected DVCS system
  • Done!

To start you do not need learn all the features of git or hg but just several commands like these (for git):

$ (you are on master branch and want to add a new feature)
# create local branch
$ git checkout -b my-new-feature
# create remote branch and bind local branch to the appropriate remote branch
$ git push -u origin my-new-feature
# do your changes
#...
# add changes
$ git add .
# commit locally
$ git commit -m "My new feature"
# send changes to the server
$ git push origin HEAD

And that’s all. Everything else can be done via github UI - review the change, create pull request (request for merging the feature branch to master branch) and merge it if it is OK. I am referring git and github here, but I believe the same is true for hg/bitbucket.
You can make a simple guide for all team members, so even not experienced with git person can do that right.
I went through this by myself (SVN to Git) and it worked well - the transfer was painless.

As I said in my previous post, DVCS are much more social than CVS/SVN and you can get not only contributions to the panda core, but for related things as well - sample apps, tests, documentation. And for documentation - it may be worth to convert it to some markup format and keep it in the main repository. Yes, this is additional work that may seem to be not necessary but it will give some valuable advantages - people can contribute to it and also you can update the docs along with your code and publish new version of documentation along with new version of panda.

Again please no offence and I do not try to give an advice to you - all above is just my opinion and my thoughts and my intentions are good.

Sorry for digging up this thread. Last night I was trying to get some useful revision log from cvs and ended up totally demotivated. Then I read this thread and thought, it’s time to push it forward :wink:

At first I have to admit I’m a git user, but the decision is not easy, because hg is a good versioning system, too. Both are very modern and have a whole lot of features for huge projects (both were designed for the linux kernel). There is no real killer-feature in one system that’s totally missing in the other one. Both have powerful branching features, as I read in this thread, git has a very large user community, but hg on the other side has a strong community of python users. So I searched for some comparisons between the two systems, and found this one, which is very detailed and accurate: alblue.bandlem.com/2011/03/mercu … rison.html

For the “tl;dr”-people: it should be enough, to read the conclusion and maybe have a look at the performance comparison. They’re both pretty equal, git is slightly faster with the checkout command (which is used for branch switching), hg can create diff files to the previous revision a litttle bit faster. In the article I read hg has no corresponding feature to the git index, which may be the only downside of hg (because the git index is actually very useful though it first seems unnecessary for users coming from other versioning systems). I think git integration in Windows shouldn’t be a huge issue any longer, especially with the gitextensions-thing from above.

My personal conclusion: It would be great if you choose git, especially because of the index. I haven’t used hg much therefore my conclusion may be weak in some points because it’s only based on stuff I read in the internet but not on personal experience. But to me it would be totally okay if you decide using hg (there are good reasons for that one too). My only wish: Change fast, using cvs is horrible.

Regards

We’ve pretty much decided on git behind the scenes. Though we all agree that hg perhaps matches Panda’s philosophy and user base a bit better, it’s undeniable that git is more popular, and that’s probably more important in an environment where it’s important to reach the broadest developer audience possible. We can maintain a public hg mirror for those interested.

I maintain an experimental incremental git conversion of the cvs trunk at:
github.com/panda3d/incremental
Not guaranteed to be compatible with the final migration, so use at your own risk. More information about the migration will follow (at its own pace).

Is there anything which the community could help with for the migration?

I am extremely excited about the move to GitHub. I think it’s a great idea.

Did anyone else try a personal conversion? Been trying for almost four hours straight now and it’s driving me crazy.

If I use “sudo git cvsimport -d :pserver:anonymous@panda3d.cvs.sourceforge.net:/cvsroot/panda3d panda3d -C panda3d.git”, I end up receiving a “permission denied” message.

Importing it locally doesn’t work either. It tells me that it can’t find CVSROOT. If I rename the directory CVS to CVSROOT, it tells me it can’t find the module “panda3d”.

I know there already is an incremental Github mirror in place. I’d still like to try it myself, so any help would be appreciated.

You need to first rsync a local backup of the CVS repo, and then do hacks on it to alter the structure so cvsimport will like it. I don’t have time right now to explain every specific step (feel free to e-mail me later about it if you have questions), but I’ll just paste the relevant section of the buildbot script I used for automating the process:

rm -rf newroot
rsync --delete -av rsync://panda3d.cvs.sourceforge.net/cvsroot/panda3d p3droot
mkdir newroot newroot/panda3d
cp -r p3droot/panda3d/CVSROOT newroot/CVSROOT
echo > newroot/CVSROOT/modules

for dir in Attic contrib direct dmodels doc dtool makepanda models panda pandaapp pandatool ppremake; do
    cp -r p3droot/panda3d/$dir newroot/panda3d/$dir
done

(Note that this is an untested translation to Bash from the original Python.)

Now here’s the part where it actually runs cvsimport:

Thanks, rdb.

I just tried cvs2svn (which would be the ideal solution, since I’m mirroring between svn and github, which worked quite nicely for other repositories before).

Unfortunately, it tells me I’m missing RCS files.

Where exactly am I supposed to find the actual CVSROOT directory and is it necessary to use rsync?
The command I’m running to create a local clone of the CVS repo is the following:

cvs -d :pserver:anonymous@panda3d.cvs.sourceforge.net:/cvsroot/panda3d co -P panda3d