#6845 Google code cross-linking syntax

v1.1.0
closed
General
2015-08-20
2013-11-05
No

Google code supports r123 syntax for links, e.g. http://code.google.com/p/umple/issues/detail?can=1&colspec=ID%20Type%20Component%20Diffic%20Status%20Priority%20Owner%20Summary&id=315

And also "issue 123" syntax for links, e.g. http://code.google.com/p/umple/issues/detail?can=1&colspec=ID%20Type%20Component%20Diffic%20Status%20Priority%20Owner%20Summary&id=318

We should convert these into some sort of link when we import. They currently end up as plain text.

Discussion

  • Cory Johns - 2013-11-08
    • status: open --> in-progress
    • assigned_to: Cory Johns
     
  • Cory Johns - 2013-11-08
    • status: in-progress --> code-review
     
  • Cory Johns - 2013-11-08

    allura:cj/6845

     
  • Dave Brondsema

    Dave Brondsema - 2013-11-11
    • status: code-review --> in-progress
    • QA: Dave Brondsema
     
  • Dave Brondsema

    Dave Brondsema - 2013-11-11

    I think there should be a comment (or named bool var) to reflect the import of not href.netloc.

    Can we apply this to wiki pages too? E.g. http://code.google.com/p/testdave/wiki/Test Those aren't plain text though...

    I also note that http://code.google.com/p/support/wiki/WikiSyntax#Links_to_issues_and_revisions says issue PROJECTNAME:123 is supported. I assume that isn't too common and am ok with not supporting it. Maybe links on wiki pages aren't worth doing either, if its difficult.

     
  • Cory Johns - 2013-11-12
    • status: in-progress --> code-review
    • Size: --> 2
     
  • Cory Johns - 2013-11-12

    allura:cj/6845 (force-pushed)
    googlecodewikiimporter:cj/6845

     
  • Dave Brondsema

    Dave Brondsema - 2013-11-12
    • status: code-review --> in-progress
     
  • Dave Brondsema

    Dave Brondsema - 2013-11-12

    I like the comments & var names. "un-link all others" piqued my curiosity, don't we want to always preserve all links?

    I got an error on a link to example.com:

      File "/home/dbrondsema/dbrondsema-1019/forge/ForgeImporters/forgeimporters/google/__init__.py", line 62, in _as_markdown
        target_project = href.path.split('/')[2]
    IndexError: list index out of range
    

    And I get this error on a wiki import:

      File "/home/dbrondsema/dbrondsema-1019/forge/ForgeImporters/forgeimporters/base.py", line 121, in import_tool
        mount_point=mount_point, mount_label=mount_label, **kw)
      File "/nfs/home/dbrondsema/googlecodewikiimporter/googlecodewikiimporter/importer.py", line 247, in import_tool
        for page in self.get_pages(extractor):
      File "/nfs/home/dbrondsema/googlecodewikiimporter/googlecodewikiimporter/importer.py", line 266, in get_pages
        yield GoogleCodeWikiPage(name, url)
    TypeError: __init__() takes exactly 4 arguments (3 given)
    
     
  • Cory Johns - 2013-11-13

    AFAIK, the only other things that would be linked are URLs, which will be linked by Markdown anyway. shrug We can preserve them if we want; there shouldn't be any harm.

    I'll fix those errors.

     
  • Dave Brondsema

    Dave Brondsema - 2013-11-13

    I forgot about Markdown autolinking :)

     
  • Cory Johns - 2013-11-13
    • status: in-progress --> code-review
     
  • Cory Johns - 2013-11-13

    allura:cj/6845
    googlecodewikiimporter:cj/6845

     
  • Dave Brondsema

    Dave Brondsema - 2013-11-13
    • status: code-review --> closed
     

Log in to post a comment.