From 1ddc27888bfc0b02c4adfc6da642c22483694767 Mon Sep 17 00:00:00 2001 From: Robert Hencke Date: Tue, 8 Mar 2011 12:23:06 -0500 Subject: [PATCH] codereview.py: do not suggest hg change -d if current user is not CL author R=golang-dev, rsc1, rsc CC=golang-dev https://golang.org/cl/4253064 --- lib/codereview/codereview.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index fa703c711f4..78e7e1b30b9 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -1558,7 +1558,10 @@ def sync_changes(ui, repo): cl.files = Sub(cl.files, extra) cl.Flush(ui, repo) if not cl.files: - ui.warn("CL %s has no files; suggest hg change -d %s\n" % (cl.name, cl.name)) + if not cl.copied_from: + ui.warn("CL %s has no files; delete with hg change -d %s\n" % (cl.name, cl.name)) + else: + ui.warn("CL %s has no files; delete locally with hg change -D %s\n" % (cl.name, cl.name)) return def upload(ui, repo, name, **opts):