Lines Matching refs:clname
1228 clname = p[1:]
1229 if clname == "default":
1232 if not GoodCLName(clname):
1233 raise hg_util.Abort("invalid CL name " + clname)
1234 cl, err = LoadCL(match_repo.ui, match_repo, clname, web=False)
1236 raise hg_util.Abort("loading CL " + clname + ": " + err)
1238 raise hg_util.Abort("no files in CL " + clname)
1403 def clpatch(ui, repo, clname, **opts):
1415 return clpatch_or_undo(ui, repo, clname, opts, mode="clpatch")
1418 def undo(ui, repo, clname, **opts):
1427 return clpatch_or_undo(ui, repo, clname, opts, mode="undo")
1430 def release_apply(ui, repo, clname, **opts):
1479 err = clpatch_or_undo(ui, repo, clname, opts, mode="backport")
1517 def clpatch_or_undo(ui, repo, clname, opts, mode):
1528 if re.match('^[0-9]{7,}$', clname):
1530 for r in hg_log(ui, repo, keyword="codereview.appspot.com/"+clname, limit=100, template="{node}\n").split():
1535 if n == clname:
1539 return "cannot find CL %s in local repository" % clname
1541 rev = repo[clname]
1543 return "unknown revision %s" % clname
1544 clname = rev2clname(rev)
1545 if clname == "":
1553 cl.desc = (undoHeader % (clname, vers)) + desc + undoFooter
1555 cl.desc = (backportHeader % (releaseBranch, line1(desc), clname, vers)) + desc + undoFooter
1566 cl, vers, patch, err = DownloadCL(ui, repo, clname)
1570 return "codereview issue %s has no diff" % clname
1590 return "codereview issue %s is out of date: %s (%s->%s)" % (clname, err, vers, id)
1607 return "codereview issue %s has no changed files" % clname
1683 def download(ui, repo, clname, **opts):
1692 cl, vers, patch, err = DownloadCL(ui, repo, clname)
1703 def file(ui, repo, clname, pat, *pats, **opts):
1715 if not GoodCLName(clname):
1716 return "invalid CL name " + clname
1719 cl, err = LoadCL(ui, repo, clname, web=False)
1723 return "cannot change non-local CL " + clname
2040 for clname in re.findall('(?m)^http://(?:[^\n]+)/([0-9]+)$', desc):
2041 if IsLocalCL(ui, repo, clname) and IsRietveldSubmitted(ui, clname, repo[rev].hex()):
2042 ui.warn("CL %s submitted as %s; closing\n" % (clname, repo[rev]))
2043 cl, err = LoadCL(ui, repo, clname, web=False)
2045 ui.warn("loading CL %s: %s\n" % (clname, err))
2363 def IsRietveldSubmitted(ui, clname, hex):
2364 dict = JSONGet(ui, "/api/" + clname + "?messages=true")
2380 def DownloadCL(ui, repo, clname):
2381 set_status("downloading CL " + clname)
2382 cl, err = LoadCL(ui, repo, clname, web=True)
2384 return None, None, None, "error loading CL %s: %s" % (clname, err)
2392 patchset = JSONGet(ui, "/api/" + clname + "/" + str(patchid))
2394 return None, None, None, "error loading CL patchset %s/%d" % (clname, patchid)
2402 diff = "/download/issue" + clname + "_" + str(patchid) + ".diff"
2409 return None, None, None, "cannot find owner for %s" % (clname)