options = []
- if command is "revno":
+ if command == "revno":
bzrcmd = "%s revno %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
else:
if ud.revision:
options.append("-r %s" % ud.revision)
- if command is "fetch":
+ if command == "fetch":
bzrcmd = "%s co %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
- elif command is "update":
+ elif command == "update":
bzrcmd = "%s pull %s --overwrite" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid bzr command %s" % command)
options = []
- if command is "revno":
+ if command == "revno":
bzrcmd = "%s revno %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
else:
if ud.revision:
options.append("-r %s" % ud.revision)
- if command is "fetch":
+ if command == "fetch":
bzrcmd = "%s co %s %s://%s" % (basecmd, " ".join(options), proto, bzrroot)
- elif command is "update":
+ elif command == "update":
bzrcmd = "%s pull %s --overwrite" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid bzr command %s" % command, ud.url)
else:
hgroot = ud.user + "@" + host + ud.path
- if command is "info":
+ if command == "info":
return "%s identify -i %s://%s/%s" % (basecmd, proto, hgroot, ud.module)
options = [];
if ud.revision:
options.append("-r %s" % ud.revision)
- if command is "fetch":
+ if command == "fetch":
cmd = "%s clone %s %s://%s/%s %s" % (basecmd, " ".join(options), proto, hgroot, ud.module, ud.module)
- elif command is "pull":
+ elif command == "pull":
# do not pass options list; limiting pull to rev causes the local
# repo not to contain it and immediately following "update" command
# will crash
cmd = "%s pull" % (basecmd)
- elif command is "update":
+ elif command == "update":
cmd = "%s update -C %s" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid hg command %s" % command, ud.url)
coroot = self._strip_leading_slashes(ud.path)
- if command is "fetch":
+ if command == "fetch":
osccmd = "%s %s co %s/%s %s" % (basecmd, config, coroot, ud.module, " ".join(options))
- elif command is "update":
+ elif command == "update":
osccmd = "%s %s up %s" % (basecmd, config, " ".join(options))
else:
raise FetchError("Invalid osc command %s" % command, ud.url)
if ud.pswd:
options.append("--password %s" % ud.pswd)
- if command is "info":
+ if command == "info":
svncmd = "%s info %s %s://%s/%s/" % (basecmd, " ".join(options), proto, svnroot, ud.module)
else:
suffix = ""
options.append("-r %s" % ud.revision)
suffix = "@%s" % (ud.revision)
- if command is "fetch":
+ if command == "fetch":
svncmd = "%s co %s %s://%s/%s%s %s" % (basecmd, " ".join(options), proto, svnroot, ud.module, suffix, ud.module)
- elif command is "update":
+ elif command == "update":
svncmd = "%s update %s" % (basecmd, " ".join(options))
else:
raise FetchError("Invalid svn command %s" % command, ud.url)
if self.state is runQueuePrepare:
self.rqexe = RunQueueExecuteDummy(self)
- if self.rqdata.prepare() is 0:
+ if self.rqdata.prepare() == 0:
self.state = runQueueComplete
else:
self.state = runQueueSceneInit
collect the process exit codes and close the information pipe.
"""
result = os.waitpid(-1, os.WNOHANG)
- if result[0] is 0 and result[1] is 0:
+ if result[0] == 0 and result[1] == 0:
return None
task = self.build_pids[result[0]]
del self.build_pids[result[0]]