changeset 4179:e81df731d2d2 gsoc-2009

some more porting to vcs agnostic stuff
author Pygi <pygi@users.sourceforge.net>
date Tue, 07 Jul 2009 15:16:36 +0000
parents 586fc0038729
children f6ab54a4cd6b
files scripts/notify-roundup/notify-roundup.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/notify-roundup/notify-roundup.py	Tue Jul 07 15:05:28 2009 +0000
+++ b/scripts/notify-roundup/notify-roundup.py	Tue Jul 07 15:16:36 2009 +0000
@@ -58,7 +58,6 @@
     elif vcs_type == 'hg':
         rev_type = sys.argv[3].split(':')
         revision = rev_type[1]
-        logger.debug(revision)
     else:
         logging.error('something wen\'t wrong')
         
@@ -196,7 +195,7 @@
         raise Unauthorised, "Can't edit items of class '%s'"%repos.klass
 
     # create the revision
-    svn_rev_id = db.svn_rev.create(repository=svn_repo_id, revision=repos.rev)
+    vcs_rev_id = db.vcs_rev.create(repository=vcs_repo_id, revision=repos.rev)
 
     # add the message to the spool
     date = roundup.date.Date(repos.date)
@@ -265,7 +264,7 @@
         self.rev = rev
         self.pool = pool
         
-        authors_calls = subprocess.call('hg log ' + self.repos_dir + ' --rev ' + self.rev + ' | grep user' , shell=True)
+        authors_calls = subprocess.call('hg log ' + self.repos_dir + ' --rev=tip | grep user' , shell=True)
         #authors_split = authors_calls.split(':')
         logger.debug('Author is:', authors_calls)
     
@@ -276,7 +275,7 @@
         re.I)
 
         # parse for Roundup item information
-        log = subprocess.call("/usr/bin/hg log " + self.repos_dir + " --rev=tip" + " | grep summary") or ''
+        log = subprocess.call('hg log ' + self.repos_dir + ' --rev=tip | grep summary', shell=True) or ''
         logger.debug('Log parsed:', log)
         for line in log.splitlines():
             m = issue_re.match(line)

Roundup Issue Tracker: http://roundup-tracker.org/