- fixed pull logic

Sat, 01 Nov 2014 11:51:48 +0200

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sat, 01 Nov 2014 11:51:48 +0200
changeset 52
24ca8de770ac
parent 51
b0209b707fa2
child 53
e2b958a7e083

- fixed pull logic

cobalt.py file | annotate | diff | comparison | revisions
--- a/cobalt.py	Thu Oct 30 04:38:24 2014 +0200
+++ b/cobalt.py	Sat Nov 01 11:51:48 2014 +0200
@@ -342,32 +342,27 @@
 	#done
 
 	if len (commit_data) > 0:
-		pull_args = ['pull']
-
 		for commit in commit_data:
 			pull_args.append ('-r');
 			pull_args.append (commit[0]);
 		#done
 
 		try:
-			zanrepo.hg_command (*pull_args)
+			zanrepo.hg_command ('pull', *pull_args)
 
 			# Also pull these commits to the zandronum main repository
 			if usestable:
 				devrepo = hgapi.Repo ('zandronum')
-				pull_args.insert (1, '../zandronum-stable')
-				devrepo.hg_command (*pull_args)
+				devrepo.hg_command ('pull', '../zandronum-stable', *pull_args)
 			#fi
 
 			# Pull everything into sandboxes too
 			if not usesandbox:
 				devrepo = hgapi.Repo ('zandronum-sandbox')
-				pull_args.insert (1, '../%s' % repo_name)
-				devrepo.hg_command (*pull_args)
+				devrepo.hg_command ('pull', '../%s' % repo_name, *pull_args)
 
 				devrepo = hgapi.Repo ('zandronum-sandbox-stable')
-				pull_args.insert (1, '../%s' % repo_name)
-				devrepo.hg_command (*pull_args)
+				devrepo.hg_command ('pull', '../%s' % repo_name, *pull_args)
 			#fi
 		except Exception as e:
 			chanlog ('Warning: unable to pull: %s' % `e`)

mercurial