You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/11/13 20:15:47 UTC

[1/3] git commit: [#6845] Preserve links in GC ticket import and fixed Index error on non-GC links

Updated Branches:
  refs/heads/master 1989f48e2 -> d1aa716b2


[#6845] Preserve links in GC ticket import and fixed Index error on non-GC links

Signed-off-by: Cory Johns <cj...@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d1aa716b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d1aa716b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d1aa716b

Branch: refs/heads/master
Commit: d1aa716b2df39fc137081fae6bcb893d95b61706
Parents: a069ca4
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Nov 13 18:23:19 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Nov 13 19:15:29 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/google/__init__.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d1aa716b/ForgeImporters/forgeimporters/google/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/__init__.py b/ForgeImporters/forgeimporters/google/__init__.py
index 7a75eaf..60f96c3 100644
--- a/ForgeImporters/forgeimporters/google/__init__.py
+++ b/ForgeImporters/forgeimporters/google/__init__.py
@@ -59,7 +59,8 @@ def _as_markdown(tag, project_name):
             href = urlparse(fragment['href'])
             qs = parse_qs(href.query)
             gc_link = not href.netloc or href.netloc == 'code.google.com'
-            target_project = href.path.split('/')[2]
+            path_parts = href.path.split('/')
+            target_project = path_parts[2] if gc_link and len(path_parts) >= 3 else ''
             internal_link = target_project == project_name
             if gc_link and internal_link and 'id' in qs:
                 # rewrite issue 123 project-internal issue links
@@ -74,8 +75,8 @@ def _as_markdown(tag, project_name):
                         urljoin('https://code.google.com/p/%s/issues/' % project_name, fragment['href']),
                     )
             else:
-                # un-link all others
-                fragment = h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)
+                # convert all other links to Markdown syntax
+                fragment = '[%s](%s)' % (fragment.text, fragment['href'])
         elif getattr(fragment, 'name', None) == 'i':
             # preserve styling of "(No comment was entered for this change.)" messages
             fragment = '*%s*' % h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)


[2/3] git commit: [#6845] Preserve inter-project links when importing from GC

Posted by br...@apache.org.
[#6845] Preserve inter-project links when importing from GC

Signed-off-by: Cory Johns <cj...@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a069ca45
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a069ca45
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a069ca45

Branch: refs/heads/master
Commit: a069ca45307c1e4aafee00d0620130221017ddce
Parents: 7ed59a1
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Nov 12 18:13:26 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Nov 13 19:15:29 2013 +0000

----------------------------------------------------------------------
 .../forgeimporters/google/__init__.py           | 36 +++++++++++++++-----
 .../tests/data/google/test-issue.html           |  2 +-
 .../tests/google/functional/test_tracker.py     |  4 +--
 .../tests/google/test_extractor.py              |  6 ++--
 4 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a069ca45/ForgeImporters/forgeimporters/google/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/__init__.py b/ForgeImporters/forgeimporters/google/__init__.py
index 261b9f9..7a75eaf 100644
--- a/ForgeImporters/forgeimporters/google/__init__.py
+++ b/ForgeImporters/forgeimporters/google/__init__.py
@@ -52,21 +52,41 @@ def _as_text(node, chunks=None):
             _as_text(n, chunks)
     return ''.join(chunks)
 
-def _as_markdown(tag):
+def _as_markdown(tag, project_name):
     fragments = []
     for fragment in tag:
         if getattr(fragment, 'name', None) == 'a':
             href = urlparse(fragment['href'])
             qs = parse_qs(href.query)
-            if not href.netloc and 'id' in qs:
+            gc_link = not href.netloc or href.netloc == 'code.google.com'
+            target_project = href.path.split('/')[2]
+            internal_link = target_project == project_name
+            if gc_link and internal_link and 'id' in qs:
+                # rewrite issue 123 project-internal issue links
                 fragment = '[%s](#%s)' % (fragment.text, qs['id'][0])
-            elif not href.netloc and 'r' in qs:
+            elif gc_link and internal_link and 'r' in qs:
+                # rewrite r123 project-internal revision links
                 fragment = '[r%s]' % qs['r'][0]
+            elif gc_link:
+                # preserve GC-internal links (probably issue PROJECT:123 inter-project issue links)
+                fragment = '[%s](%s)' % (
+                        h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True),
+                        urljoin('https://code.google.com/p/%s/issues/' % project_name, fragment['href']),
+                    )
             else:
+                # un-link all others
                 fragment = h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)
         elif getattr(fragment, 'name', None) == 'i':
+            # preserve styling of "(No comment was entered for this change.)" messages
             fragment = '*%s*' % h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)
+        elif getattr(fragment, 'name', None) == 'b':
+            # preserve styling of issue template
+            fragment = '**%s**' % h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)
+        elif getattr(fragment, 'name', None) == 'br':
+            # preserve forced line-breaks
+            fragment = '\n'
         else:
+            # convert all others to plain MD
             fragment = h.plain2markdown(str(fragment), preserve_multiple_spaces=True, has_html_entities=True)
         fragments.append(fragment)
     return ''.join(fragments).strip()
@@ -203,7 +223,7 @@ class GoogleCodeProjectExtractor(ProjectExtractor):
         return bs.text
 
     def get_issue_description(self):
-        return _as_markdown(self.page.find(id='hc0').pre)
+        return _as_markdown(self.page.find(id='hc0').pre, self.project_name)
 
     def get_issue_created_date(self):
         return self.page.find(id='hc0').find('span', 'date').get('title')
@@ -211,7 +231,7 @@ class GoogleCodeProjectExtractor(ProjectExtractor):
     def get_issue_mod_date(self):
         comments = self.page.findAll('div', 'issuecomment')
         if comments:
-            last_update = Comment(comments[-1])
+            last_update = Comment(comments[-1], self.project_name)
             return last_update.created_date
         else:
             return self.get_issue_created_date()
@@ -250,7 +270,7 @@ class GoogleCodeProjectExtractor(ProjectExtractor):
 
     def iter_comments(self):
         for comment in self.page.findAll('div', 'issuecomment'):
-            yield Comment(comment)
+            yield Comment(comment, self.project_name)
 
 class UserLink(object):
     def __init__(self, tag):
@@ -283,10 +303,10 @@ def _get_attachments(tag):
         return []
 
 class Comment(object):
-    def __init__(self, tag):
+    def __init__(self, tag, project_name):
         self.author = UserLink(tag.find('span', 'author').find(True, 'userlink'))
         self.created_date = tag.find('span', 'date').get('title')
-        self.body = _as_markdown(tag.find('pre'))
+        self.body = _as_markdown(tag.find('pre'), project_name)
         self._get_updates(tag)
         self.attachments = _get_attachments(tag)
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a069ca45/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/data/google/test-issue.html b/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
index 374c0e8..c6bce0a 100644
--- a/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
+++ b/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
@@ -452,7 +452,7 @@ Last comment
 <a name="c4" href="/p/allura-google-importer/issues/detail?id=6#c4">#4</a>
 <a class="userlink" href="/u/101557263855536553789/">john...@gmail.com</a></span>
 <pre>
-Oh, I forgot one
+Oh, I forgot one (with an inter-project reference to <a href="/p/other-project/issues/detail?id=1">issue other-project:1</a>)
 </pre>
 <div class="updates">
 <div class="round4"></div>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a069ca45/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py b/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
index 2e52be6..c22f7d0 100644
--- a/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
@@ -41,7 +41,7 @@ class TestGCTrackerImporter(TestCase):
     def _make_extractor(self, html):
         with mock.patch.object(base.h, 'urlopen') as urlopen:
             urlopen.return_value = ''
-            extractor = google.GoogleCodeProjectExtractor('my-project', 'project_info')
+            extractor = google.GoogleCodeProjectExtractor('allura-google-importer', 'project_info')
         extractor.page = BeautifulSoup(html)
         extractor.url = "http://test/issue/?id=1"
         return extractor
@@ -241,7 +241,7 @@ class TestGCTrackerImporter(TestCase):
                     'text': (
                             '*Originally posted by:* [john...@gmail.com](http://code.google.com/u/101557263855536553789/)\n'
                             '\n'
-                            'Oh, I forgot one\n'
+                            'Oh, I forgot one \\(with an inter\\-project reference to [issue other\\-project:1](https://code.google.com/p/other-project/issues/detail?id=1)\\)\n'
                             '\n'
                             '**Labels:** OpSys-OSX'
                         ),

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a069ca45/ForgeImporters/forgeimporters/tests/google/test_extractor.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/test_extractor.py b/ForgeImporters/forgeimporters/tests/google/test_extractor.py
index 032e122..78bde81 100644
--- a/ForgeImporters/forgeimporters/tests/google/test_extractor.py
+++ b/ForgeImporters/forgeimporters/tests/google/test_extractor.py
@@ -124,7 +124,7 @@ class TestGoogleCodeProjectExtractor(TestCase):
     def _make_extractor(self, html):
         from BeautifulSoup import BeautifulSoup
         with mock.patch.object(base.ProjectExtractor, 'urlopen'):
-            extractor = google.GoogleCodeProjectExtractor('my-project')
+            extractor = google.GoogleCodeProjectExtractor('allura-google-importer')
         extractor.page = BeautifulSoup(html)
         extractor.get_page = lambda pagename: extractor.page
         extractor.url="http://test/source/browse"
@@ -278,7 +278,7 @@ class TestGoogleCodeProjectExtractor(TestCase):
                     'author.name': 'john...@gmail.com',
                     'author.url': 'http://code.google.com/u/101557263855536553789/',
                     'created_date': 'Thu Aug  8 15:36:57 2013',
-                    'body': 'Oh, I forgot one',
+                    'body': 'Oh, I forgot one \\(with an inter-project reference to [issue other-project:1](https://code.google.com/p/other-project/issues/detail?id=1)\\)',
                     'updates': {'Labels:': 'OpSys-OSX'},
                     'attachments': [],
                 },
@@ -390,7 +390,7 @@ class TestComment(TestCase):
     def test_init(self):
         from BeautifulSoup import BeautifulSoup
         html = BeautifulSoup(self.html)
-        comment = google.Comment(html.find('div', 'issuecomment'))
+        comment = google.Comment(html.find('div', 'issuecomment'), 'pychess')
         self.assertEqual(comment.updates, {
             u'Summary:': u'Make PyChess keyboard accessible',
             u'Status:': u'Accepted',


[3/3] git commit: [#6845] Handle issue X and rX references in GC tracker importer

Posted by br...@apache.org.
[#6845] Handle issue X and rX references in GC tracker importer

Signed-off-by: Cory Johns <cj...@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7ed59a15
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7ed59a15
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7ed59a15

Branch: refs/heads/master
Commit: 7ed59a15b5257a62ad42aea46482af2eaebe5dff
Parents: 1989f48
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Fri Nov 8 23:11:59 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Nov 13 19:15:29 2013 +0000

----------------------------------------------------------------------
 .../forgeimporters/google/__init__.py           | 25 ++++++++++++++---
 ForgeImporters/forgeimporters/google/tracker.py |  2 +-
 .../tests/data/google/test-issue.html           |  4 ++-
 .../tests/google/functional/test_tracker.py     |  6 ++++-
 .../tests/google/test_extractor.py              | 28 +++++++++++---------
 .../forgeimporters/tests/google/test_tracker.py |  2 +-
 6 files changed, 47 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ed59a15/ForgeImporters/forgeimporters/google/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/__init__.py b/ForgeImporters/forgeimporters/google/__init__.py
index ae595e8..261b9f9 100644
--- a/ForgeImporters/forgeimporters/google/__init__.py
+++ b/ForgeImporters/forgeimporters/google/__init__.py
@@ -52,6 +52,25 @@ def _as_text(node, chunks=None):
             _as_text(n, chunks)
     return ''.join(chunks)
 
+def _as_markdown(tag):
+    fragments = []
+    for fragment in tag:
+        if getattr(fragment, 'name', None) == 'a':
+            href = urlparse(fragment['href'])
+            qs = parse_qs(href.query)
+            if not href.netloc and 'id' in qs:
+                fragment = '[%s](#%s)' % (fragment.text, qs['id'][0])
+            elif not href.netloc and 'r' in qs:
+                fragment = '[r%s]' % qs['r'][0]
+            else:
+                fragment = h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)
+        elif getattr(fragment, 'name', None) == 'i':
+            fragment = '*%s*' % h.plain2markdown(fragment.text, preserve_multiple_spaces=True, has_html_entities=True)
+        else:
+            fragment = h.plain2markdown(str(fragment), preserve_multiple_spaces=True, has_html_entities=True)
+        fragments.append(fragment)
+    return ''.join(fragments).strip()
+
 def csv_parser(page):
     lines = page.readlines()
     if not lines:
@@ -184,7 +203,7 @@ class GoogleCodeProjectExtractor(ProjectExtractor):
         return bs.text
 
     def get_issue_description(self):
-        return _as_text(self.page.find(id='hc0').pre).strip()
+        return _as_markdown(self.page.find(id='hc0').pre)
 
     def get_issue_created_date(self):
         return self.page.find(id='hc0').find('span', 'date').get('title')
@@ -267,7 +286,7 @@ class Comment(object):
     def __init__(self, tag):
         self.author = UserLink(tag.find('span', 'author').find(True, 'userlink'))
         self.created_date = tag.find('span', 'date').get('title')
-        self.body = _as_text(tag.find('pre')).strip()
+        self.body = _as_markdown(tag.find('pre'))
         self._get_updates(tag)
         self.attachments = _get_attachments(tag)
 
@@ -287,7 +306,7 @@ class Comment(object):
                 u'{updates}'
             ).format(
                 author=self.author,
-                body=h.plain2markdown(self.body, preserve_multiple_spaces=True, has_html_entities=True),
+                body=self.body,
                 updates='\n'.join(
                         '**%s** %s' % (k,v)
                         for k,v in self.updates.items()

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ed59a15/ForgeImporters/forgeimporters/google/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/tracker.py b/ForgeImporters/forgeimporters/google/tracker.py
index 59b50bc..080ea90 100644
--- a/ForgeImporters/forgeimporters/google/tracker.py
+++ b/ForgeImporters/forgeimporters/google/tracker.py
@@ -184,7 +184,7 @@ class GoogleCodeTrackerImporter(ToolImporter):
                 u'{body}').format(
                     creator=issue.get_issue_creator(),
                     owner=owner_line,
-                    body=h.plain2markdown(issue.get_issue_description(), preserve_multiple_spaces=True, has_html_entities=True),
+                    body=issue.get_issue_description(),
                 )
         ticket.add_multiple_attachments(issue.get_issue_attachments())
 

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ed59a15/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/data/google/test-issue.html b/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
index 693ca1d..374c0e8 100644
--- a/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
+++ b/ForgeImporters/forgeimporters/tests/data/google/test-issue.html
@@ -280,6 +280,8 @@ Test *Issue* for testing
     if p.count &gt; 5:
         print "Not &lt; 5 &amp; != 5"
 
+References: <a href="/p/allura-google-importer/issues/detail?id=1">issue 1</a>, <a href="/p/allura-google-importer/source/detail?r=2">r2</a>
+
 That's all
 
 
@@ -384,7 +386,7 @@ Test *comment* is a comment
 <a name="c2" href="/p/allura-google-importer/issues/detail?id=6#c2">#2</a>
 <a class="userlink" href="/u/101557263855536553789/">john...@gmail.com</a></span>
 <pre>
-Another comment
+Another comment with references: <a href="/p/allura-google-importer/issues/detail?id=2">issue 2</a>, <a href="/p/allura-google-importer/source/detail?r=1">r1</a>
 </pre>
 </div>
 <div class="cursor_off vt issuecomment" id="hc3">

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ed59a15/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py b/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
index 528c2b6..2e52be6 100644
--- a/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/google/functional/test_tracker.py
@@ -125,6 +125,8 @@ class TestGCTrackerImporter(TestCase):
                 '&nbsp;&nbsp;&nbsp; if p\\.count &gt; 5:\n'
                 '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Not &lt; 5 &amp; \\!= 5"\n'
                 '\n'
+                'References: [issue 1](#1), [r2]\n'
+                '\n'
                 'That\'s all'
             )
         self.assertEqual(ticket.status, 'Started')
@@ -178,6 +180,8 @@ class TestGCTrackerImporter(TestCase):
                 '&nbsp;&nbsp;&nbsp; if p.count &gt; 5:\n'
                 '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Not &lt; 5 &amp; \\!= 5"\n'
                 '\n'
+                'References: [issue 1](#1), [r2]\n'
+                '\n'
                 'That\'s all'
             )
 
@@ -217,7 +221,7 @@ class TestGCTrackerImporter(TestCase):
                     'text': (
                             '*Originally posted by:* [john...@gmail.com](http://code.google.com/u/101557263855536553789/)\n'
                             '\n'
-                            'Another comment\n\n'
+                            'Another comment with references: [issue 2](#2), [r1]\n\n'
                         ),
                 },
                 {

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ed59a15/ForgeImporters/forgeimporters/tests/google/test_extractor.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/test_extractor.py b/ForgeImporters/forgeimporters/tests/google/test_extractor.py
index c2c800a..032e122 100644
--- a/ForgeImporters/forgeimporters/tests/google/test_extractor.py
+++ b/ForgeImporters/forgeimporters/tests/google/test_extractor.py
@@ -170,22 +170,24 @@ class TestGoogleCodeProjectExtractor(TestCase):
         self._p_soup.stop()
         self.assertEqual(gpe.get_issue_summary(), 'Test "Issue"')
         assert_equal(gpe.get_issue_description(),
-                'Test *Issue* for testing\n'
+                'Test \\*Issue\\* for testing\n'
                 '\n'
-                '  1. Test List\n'
-                '  2. Item\n'
+                '&nbsp; 1. Test List\n'
+                '&nbsp; 2. Item\n'
                 '\n'
-                '**Testing**\n'
+                '\\*\\*Testing\\*\\*\n'
                 '\n'
-                ' * Test list 2\n'
-                ' * Item\n'
+                ' \\* Test list 2\n'
+                ' \\* Item\n'
                 '\n'
-                '# Test Section\n'
+                '\\# Test Section\n'
                 '\n'
-                '    p = source.test_issue.post()\n'
-                '    p.count = p.count *5 #* 6\n'
-                '    if p.count &gt; 5:\n'
-                '        print "Not &lt; 5 &amp; != 5"\n'
+                '&nbsp;&nbsp;&nbsp; p = source.test\\_issue.post\\(\\)\n'
+                '&nbsp;&nbsp;&nbsp; p.count = p.count \\*5 \\#\\* 6\n'
+                '&nbsp;&nbsp;&nbsp; if p.count &gt; 5:\n'
+                '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Not &lt; 5 &amp; \\!= 5"\n'
+                '\n'
+                'References: [issue 1](#1), [r2]\n'
                 '\n'
                 'That\'s all'
             )
@@ -252,7 +254,7 @@ class TestGoogleCodeProjectExtractor(TestCase):
                     'author.name': 'john...@gmail.com',
                     'author.url': 'http://code.google.com/u/101557263855536553789/',
                     'created_date': 'Thu Aug  8 15:35:15 2013',
-                    'body': 'Test *comment* is a comment',
+                    'body': 'Test \\*comment\\* is a comment',
                     'updates': {'Status:': 'Started', 'Labels:': '-OpSys-Linux OpSys-Windows'},
                     'attachments': ['at2.txt'],
                 },
@@ -260,7 +262,7 @@ class TestGoogleCodeProjectExtractor(TestCase):
                     'author.name': 'john...@gmail.com',
                     'author.url': 'http://code.google.com/u/101557263855536553789/',
                     'created_date': 'Thu Aug  8 15:35:34 2013',
-                    'body': 'Another comment',
+                    'body': 'Another comment with references: [issue 2](#2), [r1]',
                     'updates': {},
                     'attachments': [],
                 },

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7ed59a15/ForgeImporters/forgeimporters/tests/google/test_tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/tests/google/test_tracker.py b/ForgeImporters/forgeimporters/tests/google/test_tracker.py
index 6e877f6..604eafd 100644
--- a/ForgeImporters/forgeimporters/tests/google/test_tracker.py
+++ b/ForgeImporters/forgeimporters/tests/google/test_tracker.py
@@ -166,7 +166,7 @@ class TestTrackerImporter(TestCase):
             dt.strptime.side_effect = lambda s,f: s
             importer.process_fields(ticket, issue)
             self.assertEqual(ticket.summary, 'summary')
-            self.assertEqual(ticket.description, '*Originally created by:* creator\n*Originally owned by:* owner\n\nmy \*description\* fool')
+            self.assertEqual(ticket.description, '*Originally created by:* creator\n*Originally owned by:* owner\n\nmy *description* fool')
             self.assertEqual(ticket.status, 'status')
             self.assertEqual(ticket.created_date, 'created_date')
             self.assertEqual(ticket.mod_date, 'mod_date')