#6463 Create code importer for Google Code

v1.0.0
closed
SCM
2016-12-05
2013-07-15
Cory Johns
No

During project import, SCM needs to be included. Since Google Code only supports a single repository at a time, we should just have a single Code Importer that checks the project to discover the repo type and passes that information to the appropriate SCM tool's clone_from_url method.

One way to discover the repo type would be to load https://code.google.com/p/%s/source/browse/ and get the text of the item id="crumb_root", which will be one of " git/ ", " hg/ ", or " svn/ ".

Discussion

  • Tim Van Steenburgh

    • status: open --> in-progress
    • assigned_to: Tim Van Steenburgh
     
  • Tim Van Steenburgh

    • status: in-progress --> code-review
     
  • Tim Van Steenburgh

    forge:tv/6463

     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23

    How do I invoke it? I don't see any new admin options, and it doesn't run when I do a google code import from /p/import_project/google-code/ Does it need a [allura.importers] entry?

    We can't add a hard dependency on ForgeHg. Could ForgeHg have its own importer? Something good (not hacky) would be best here, since other importers may need to dynamically select the right SCM tool too. (Yet another entry point?) Somewhat similarly, we also need to gracefully not support svn & git imports if those tools are not set up.

     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23
     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23

    Thinking a bit more about this, I don't think we need anything fancy & fully dynamic like new entry points for SCM types. Since Google Code only has SVN, git and hg, we can reference those tools directly. Just catch ImportErrors so they're all optional.

     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23
    • status: code-review --> in-progress
    • QA: Dave Brondsema
     
  • Tim Van Steenburgh

    • status: in-progress --> code-review
     
  • Tim Van Steenburgh

    Rebased to master and force-pushed.

    Added import guards and entry point, and moved get_repo_type() under the Extractor per Cory's suggestion.

     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23
    • status: code-review --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23
    • http://code.google.com/p/msysgit/ which doesn't have a current git repo, still gets a repo pulled in.
    • why are we pulling in only trunk for SVN repos? Seems like the whole thing would be better, and perhaps even necessary to get a valid whole repo.
    • I'd rather see 'code' instead of 'source' for the mount point & label, so it matches what happens with new regular projects
     
  • Tim Van Steenburgh

    • status: in-progress --> code-review
     
  • Tim Van Steenburgh

    New commit on forge:tv/6463

     
  • Dave Brondsema

    Dave Brondsema - 2013-07-23
    • status: code-review --> closed
     
  • topstarnetwork

    topstarnetwork - 2016-12-05

    Hello, is the google code importer avalable? All I found in the allura plugins is only the google wiki importer but I also need to import the full project such as the source code. Thanks.

     
    • Dave Brondsema

      Dave Brondsema - 2016-12-05

      The other Google Code importers are included in Allura core (not separate plugins), however they were built to import from the regular Google Code site, and do not work with the archived format that Google Code is in now.

      If you want to import a code repo, it is still possible. For Git & Hg repos you can just get a local copy and push it up to an empty repo on Allura. For SVN you can import it server-side, or get your own SVN service running and then use the Allura web interface to import from there.

       

Log in to post a comment.