- retval = None
- if options.pretend:
- if vcs == "cvs":
- print "(cvs -q commit -F %s %s)" % \
- (commitmessagefile, " ".join(myfiles))
- if vcs == "svn":
- print "(svn commit -F %s %s)" % \
- (commitmessagefile, " ".join(myfiles))
- elif vcs == "git":
- print "(git commit -F %s %s)" % \
- (commitmessagefile, " ".join(myfiles))
- else:
- if vcs == "cvs":
- retval = spawn(["cvs", "-q", "commit",
- "-F", commitmessagefile] + myfiles,
- env=os.environ)
- if vcs == "svn":
- retval = spawn(["svn", "commit",
- "-F", commitmessagefile] + myfiles,
- env=os.environ)
- elif vcs == "git":
- retval = spawn(["git", "commit", "-F",
- commitmessagefile] + myfiles,
- env=os.environ)
+ commit_cmd = [vcs]
+ commit_cmd.extend(vcs_global_opts)
+ commit_cmd.append("commit")
+ commit_cmd.extend(vcs_local_opts)
+ commit_cmd.extend(["-F", commitmessagefile])
+ commit_cmd.extend(myfiles)
+