allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [17/18] git commit: [#7257] factor up the common index_id method
Date Fri, 09 May 2014 21:42:37 GMT
[#7257] factor up the common index_id method


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

Branch: refs/heads/db/7257
Commit: 812f0762667425ccfebffe298f5ffaad843e2dd9
Parents: fc5f460
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Fri May 9 21:41:41 2014 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri May 9 21:41:48 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/search.py     | 6 +++++-
 Allura/allura/model/artifact.py | 9 +--------
 Allura/allura/model/project.py  | 7 -------
 3 files changed, 6 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/812f0762/Allura/allura/lib/search.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/search.py b/Allura/allura/lib/search.py
index 2a80113..89daac4 100644
--- a/Allura/allura/lib/search.py
+++ b/Allura/allura/lib/search.py
@@ -46,7 +46,11 @@ class SearchIndexable(object):
 
         Used for SOLR ID, shortlinks, and possibly elsewhere.
         """
-        raise NotImplementedError
+        id = '%s.%s#%s' % (
+            self.__class__.__module__,
+            self.__class__.__name__,
+            self._id)
+        return id.replace('.', '/')
 
     def index(self):
         """

http://git-wip-us.apache.org/repos/asf/allura/blob/812f0762/Allura/allura/model/artifact.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/artifact.py b/Allura/allura/model/artifact.py
index 143c44a..659d04c 100644
--- a/Allura/allura/model/artifact.py
+++ b/Allura/allura/model/artifact.py
@@ -77,7 +77,7 @@ class Artifact(MappedClass, SearchIndexable):
                 log.debug('Not updating mod_date')
             if c.project and not skip_last_updated:
                 c.project.last_updated = datetime.utcnow()
- 
+
     type_s = 'Generic Artifact'
 
     # Artifact base schema
@@ -297,13 +297,6 @@ class Artifact(MappedClass, SearchIndexable):
         else:
             return self.app_config.load()(self.project, self.app_config)
 
-    def index_id(self):
-        id = '%s.%s#%s' % (
-            self.__class__.__module__,
-            self.__class__.__name__,
-            self._id)
-        return id.replace('.', '/')
-
     def index(self):
         project = self.project
         return dict(

http://git-wip-us.apache.org/repos/asf/allura/blob/812f0762/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 3182ded..431d986 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -991,13 +991,6 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject):
         else:
             return 'busy'
 
-    def index_id(self):
-        id = '%s.%s#%s' % (
-            self.__class__.__module__,
-            self.__class__.__name__,
-            self._id)
-        return id.replace('.', '/')
-
     def index(self):
         provider = plugin.ProjectRegistrationProvider.get()
         try:


Mime
View raw message