Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

barbie (2653)

barbie
  reversethis-{ku. ... m} {ta} {eibrab}
http://barbie.missbarbell.co.uk/

Leader of Birmingham.pm [pm.org] and a CPAN author [cpan.org]. Co-organised YAPC::Europe in 2006 and the 2009 QA Hackathon, responsible for the YAPC Conference Surveys [yapc-surveys.org] and the QA Hackathon [qa-hackathon.org] websites. Also the current caretaker for the CPAN Testers websites and data stores.

If you really want to find out more, buy me a Guinness ;)

Links:
Memoirs of a Roadie [missbarbell.co.uk]
[pm.org]
CPAN Testers Reports [cpantesters.org]
YAPC Conference Surveys [yapc-surveys.org]
QA Hackathon [qa-hackathon.org]

Journal of barbie (2653)

Monday April 06, 2009
10:12 AM

CPAN to git helper

[ #38762 ]

As I have a lot of CPAN distributions I want to port to git, I decided to try and make things a little easier (and fun) along the way. As I don't have a previous VCS repo for my distributions (I once did, but it died a long time ago), I currently rely on snapshots and backing up the current workspace. The snapshots happen to be the tarballs I upload to CPAN, and are kept in the current workspace so they get backed up too.

This made for writing a simple tool to firstly create a new git repo, unwrap each snapshots in turn, importing the contents and removing obsolete files, then doing the same for the current workspace. I did think about adding some code to login to Github, create the new project and then push the master and tags to Github, but I think that might be going a bit too far for the moment.

Any road up, if you have a similar setup, and want to port your CPAN distributions to a git repo that can be moved to Github, my little script might go a long way to getting you off the ground. The usual disclaimers about me not being responsible for breaking your code apply :)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Unless I'm mistaken, the git-backpan-init [cpan.org] utility of Git::CPAN::Patch might be able to help you do that too.

    • Not quite. Mine adds the Github entries and also removes files that have since been made obsolete or moved.

      • I'm not sure what you've seen that program not do. I thought it would have each revision stored correctly, with each one only showing files that were in each versioned dist.

        I *think* it was inspired by my older program (but I could be wrong!) described here: http://rjbs.manxome.org/rubric/entry/1720 [manxome.org]

        Anyway, I hope we can all steal something from each other in the future!

        --
        rjbs
        • Yup, it was inspired by your script all right. :-)

          And I guess that while we're talking importing stuff to Github, we should probably also mention brian d foy's github_creator [github.com], for completeness' sake.