diff pylons_app/lib/utils.py @ 593:d8778cde98f0

added limits to single file diffs changed changeset to use .size for cut off
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 05 Oct 2010 18:25:08 +0200
parents 48be953851fc
children
line wrap: on
line diff
--- a/pylons_app/lib/utils.py	Tue Oct 05 17:56:06 2010 +0200
+++ b/pylons_app/lib/utils.py	Tue Oct 05 18:25:08 2010 +0200
@@ -251,11 +251,14 @@
         region_invalidate(_full_changelog_cached, None, *args)
         
 class EmptyChangeset(BaseChangeset):
+    """
+    An dummy empty changeset.
+    """
     
     revision = -1
     message = ''
     author = ''
-    
+    date = ''
     @LazyProperty
     def raw_id(self):
         """
@@ -268,6 +271,15 @@
     def short_id(self):
         return self.raw_id[:12]
 
+    def get_file_changeset(self, path):
+        return self
+    
+    def get_file_content(self, path):
+        return u''
+    
+    def get_file_size(self, path):
+        return 0
+    
 def repo2db_mapper(initial_repo_list, remove_obsolete=False):
     """
     maps all found repositories into db