incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [2/2] git commit: [#6740] Attach tool-specific extra notes to the ToolImporter for more flexibility
Date Mon, 14 Oct 2013 19:49:46 GMT
[#6740] Attach tool-specific extra notes to the ToolImporter for more flexibility

Signed-off-by: Cory Johns <cjohns@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/fb125424
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/fb125424
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/fb125424

Branch: refs/heads/cj/6740
Commit: fb1254240a6aedf918c98f7355fa0c621282d7b6
Parents: f13654d
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Mon Oct 14 19:43:34 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Mon Oct 14 19:49:07 2013 +0000

----------------------------------------------------------------------
 ForgeImporters/forgeimporters/base.py                       | 1 +
 ForgeImporters/forgeimporters/github/templates/project.html | 8 --------
 ForgeImporters/forgeimporters/github/wiki.py                | 4 ++++
 ForgeImporters/forgeimporters/google/code.py                | 4 ++++
 ForgeImporters/forgeimporters/google/templates/project.html | 5 +----
 ForgeImporters/forgeimporters/google/tracker.py             | 1 +
 ForgeImporters/forgeimporters/templates/project_base.html   | 9 ++++++++-
 7 files changed, 19 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/base.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/base.py b/ForgeImporters/forgeimporters/base.py
index bd2592b..0a28ea6 100644
--- a/ForgeImporters/forgeimporters/base.py
+++ b/ForgeImporters/forgeimporters/base.py
@@ -335,6 +335,7 @@ class ToolImporter(object):
     target_app = None  # app or list of apps
     source = None  # string description of source, must match project importer
     controller = None
+    extra_notes = ''
 
     @staticmethod
     def by_name(name):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/github/templates/project.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/templates/project.html b/ForgeImporters/forgeimporters/github/templates/project.html
index c726b10..6f4a067 100644
--- a/ForgeImporters/forgeimporters/github/templates/project.html
+++ b/ForgeImporters/forgeimporters/github/templates/project.html
@@ -52,11 +52,3 @@
         </div>
     </div>
 {% endblock %}
-
-{% block extra_notes %}
-<br/>
-<br/>
-The wiki importer does not support all formats; currently, only Markdown
-and MediaWiki are supported.  Additionally, links to internal files or
-images (those in the wiki repository) are not supported.
-{% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/github/wiki.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/github/wiki.py b/ForgeImporters/forgeimporters/github/wiki.py
index 8caa2b2..16b011f 100644
--- a/ForgeImporters/forgeimporters/github/wiki.py
+++ b/ForgeImporters/forgeimporters/github/wiki.py
@@ -112,6 +112,10 @@ class GitHubWikiImporter(ToolImporter):
     source = 'GitHub'
     tool_label = 'Wiki'
     tool_description = 'Import your wiki from GitHub'
+    extra_notes = 'The wiki importer does not support all formats; currently, '\
+                  'only Markdown and MediaWiki are supported.  Additionally, '\
+                  'links to internal files or images (those in the wiki '\
+                  'repository) are not supported.'
     tool_option = {"import_history": "Import history"}
 
     mediawiki_exts = ['.wiki', '.mediawiki']

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/google/code.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/code.py b/ForgeImporters/forgeimporters/google/code.py
index 8ff16a8..d4f90eb 100644
--- a/ForgeImporters/forgeimporters/google/code.py
+++ b/ForgeImporters/forgeimporters/google/code.py
@@ -150,6 +150,10 @@ class GoogleRepoImporter(ToolImporter):
     controller = GoogleRepoImportController
     tool_label = 'Source Code'
     tool_description = 'Import your SVN, Git, or Hg repo from Google Code'
+    extra_notes = 'Only the first (default) source repository is imported. '\
+                  'It is recommended that you add a README file to your '\
+                  'repository, if one is not already present, as it will be '\
+                  'displayed by default when browsing your repository.'
 
     def import_tool(self, project, user, project_name=None, mount_point=None,
             mount_label=None, **kw):

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/google/templates/project.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/templates/project.html b/ForgeImporters/forgeimporters/google/templates/project.html
index 271e965..353c056 100644
--- a/ForgeImporters/forgeimporters/google/templates/project.html
+++ b/ForgeImporters/forgeimporters/google/templates/project.html
@@ -44,10 +44,7 @@
 {% endblock %}
 
 {% block extra_notes %}
-<br/>
-<br/>
 Not all project data can be imported at this time.  The full description
 on the Project Home cannot be automatically converted, due to size limit
-differences.  Only the first (default) source repository is imported,
-and private tickets are not imported.
+differences. {{ super() }}
 {% endblock %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/google/tracker.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/tracker.py b/ForgeImporters/forgeimporters/google/tracker.py
index ddf5d35..1481772 100644
--- a/ForgeImporters/forgeimporters/google/tracker.py
+++ b/ForgeImporters/forgeimporters/google/tracker.py
@@ -91,6 +91,7 @@ class GoogleCodeTrackerImporter(ToolImporter):
     target_app = ForgeTrackerApp
     controller = GoogleCodeTrackerImportController
     tool_label = 'Issues'
+    extra_notes = 'Private tickets are not imported.'
 
     field_types = defaultdict(lambda: 'string',
             milestone='milestone',

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/fb125424/ForgeImporters/forgeimporters/templates/project_base.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/templates/project_base.html b/ForgeImporters/forgeimporters/templates/project_base.html
index 6a797d2..3908415 100644
--- a/ForgeImporters/forgeimporters/templates/project_base.html
+++ b/ForgeImporters/forgeimporters/templates/project_base.html
@@ -140,7 +140,14 @@
     <div style="margin:5px">
       You'll receive an email after each tool import finishes.
       Import time varies depending on the amount of data being imported.
-      {% block extra_notes %}{% endblock %}
+      <br/><br/>
+      {% block extra_notes %}
+        {% for name, tool_importer in importer.tool_importers.iteritems() %}
+          {% if tool_importer.extra_notes %}
+            {{tool_importer.extra_notes}}
+          {% endif %}
+        {% endfor %}
+      {% endblock %}
     </div>
 
     <input type="submit" value="Import"/>


Mime
View raw message