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/03/27 16:22:52 UTC

[1/2] git commit: [#2835] add --tasks option to reindex cmd, so macros work

Updated Branches:
  refs/heads/db/42cc_2835_content_preview bcc5f812a -> c0a7418f6


[#2835] add --tasks option to reindex cmd, so macros work


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

Branch: refs/heads/db/42cc_2835_content_preview
Commit: ec1341e0506ad50c4b5c409891313a35f450404d
Parents: bcc5f81
Author: Dave Brondsema <db...@geek.net>
Authored: Wed Mar 27 14:36:25 2013 +0000
Committer: Dave Brondsema <db...@geek.net>
Committed: Wed Mar 27 14:36:25 2013 +0000

----------------------------------------------------------------------
 Allura/allura/command/show_models.py |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ec1341e0/Allura/allura/command/show_models.py
----------------------------------------------------------------------
diff --git a/Allura/allura/command/show_models.py b/Allura/allura/command/show_models.py
index 6934424..eaaa2ed 100644
--- a/Allura/allura/command/show_models.py
+++ b/Allura/allura/command/show_models.py
@@ -42,6 +42,10 @@ class ReindexCommand(base.Command):
                       help='Solr needs artifact references to already exist.')
     parser.add_option('--refs', action='store_true', dest='refs',
                       help='Update artifact references and shortlinks')
+    parser.add_option('--tasks', action='store_true', dest='tasks',
+                      help='Run each individual index operation as a background task.  '
+                           'Note: this is often better, since tasks have "request" objects '
+                           'which are needed for some markdown macros to run properly')
 
     def command(self):
         from allura import model as M
@@ -91,15 +95,18 @@ class ReindexCommand(base.Command):
                     M.main_orm_session.flush()
                     M.artifact_orm_session.clear()
                     try:
-                        allura.tasks.index_tasks.add_artifacts(ref_ids,
-                                                               update_solr=self.options.solr,
-                                                               update_refs=self.options.refs)
+                        add_artifacts = allura.tasks.index_tasks.add_artifacts
+                        if self.options.tasks:
+                            add_artifacts = add_artifacts.post
+                        add_artifacts(ref_ids,
+                                       update_solr=self.options.solr,
+                                       update_refs=self.options.refs)
                     except CompoundError, err:
                         base.log.exception('Error indexing artifacts:\n%r', err)
                         base.log.error('%s', err.format_error())
                     M.main_orm_session.flush()
                     M.main_orm_session.clear()
-        base.log.info('Reindex done')
+        base.log.info('Reindex %s', 'queued' if self.options.tasks else 'done')
 
 class EnsureIndexCommand(base.Command):
     min_args=1


[2/2] git commit: [#2835] update help text

Posted by br...@apache.org.
[#2835] update help text


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

Branch: refs/heads/db/42cc_2835_content_preview
Commit: c0a7418f6552f3aa224eb383019ac79f5aedba91
Parents: ec1341e
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Mar 27 14:50:37 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Mar 27 14:50:37 2013 +0000

----------------------------------------------------------------------
 ForgeWiki/forgewiki/templates/wiki/search_help.txt |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0a7418f/ForgeWiki/forgewiki/templates/wiki/search_help.txt
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/templates/wiki/search_help.txt b/ForgeWiki/forgewiki/templates/wiki/search_help.txt
index 4a337b8..dc2d380 100644
--- a/ForgeWiki/forgewiki/templates/wiki/search_help.txt
+++ b/ForgeWiki/forgewiki/templates/wiki/search_help.txt
@@ -1,8 +1,6 @@
-<h1>Searching wiki</h1>
-<p>Searches use wiki page title and inner text for matching.<p>
-<p>You can also use 'Search comments?' and 'Search history?' checkboxes to include comments and history of pages editing in the search results.</p>
+<h1>Searching the wiki</h1>
+<p>Searches use wiki page title and body text for matching.<p>
+<p>To search for an exact phrase, put it in quotes.  Example: "getting started docs"</p>
+<p>To exclude a word or phrase, put a dash in front of it.  Example: docs -help</p>
+<p>You can also use 'Search comments?' and 'Search history?' checkboxes to include comments and previous revisions of pages in the search results.</p>
 
-<p>If you want to see all the page with given label, you may use url like this (there is no UI for this):</p>
-<div class="codehilite">
-<pre>/p/yourproject/wiki/search/?q=labels_t:label&amp;parser=standard</pre>
-</div>