Changeset - 56cdbcf0678a
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-12-18 18:44:33
marcin@python-works.com
made update repoinfo script more failsafe when dealing with database entries not synced with filesystem
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/update_repoinfo.py
Show inline comments
 
@@ -70,13 +70,14 @@ class UpdateCommand(BasePasterCommand):
 

	
 
        if repo_update_list:
 
            repo_list = Repository.query().filter(Repository.repo_name.in_(repo_update_list))
 
        else:
 
            repo_list = Repository.getAll()
 
        for repo in repo_list:
 
            last_change = repo.scm_instance.last_change
 
            last_change = (repo.scm_instance.last_change if repo.scm_instance
 
                           else datetime.datetime.utcfromtimestamp(0))
 
            repo.update_last_change(last_change)
 

	
 
    def update_parser(self):
 
        self.parser.add_option('--update-only',
 
                          action='store',
 
                          dest='repo_update_list',
0 comments (0 inline, 0 general)