From 1b5a4a0c5de5fdaa4f8907357a0aa80e365dd199 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 22 Aug 2009 18:50:45 -0700 Subject: [PATCH] forall: Silently skip missing projects If a project is missing locally, it might be OK to skip over it and continue running the same command in other projects. Bug: REPO-43 Change-Id: I64f97eb315f379ab2c51fc53d24ed340b3d09250 Signed-off-by: Shawn O. Pearce (cherry picked from commit d4cd69bdef28c5a9287c85c48a18ce621eba689d) --- subcmds/forall.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subcmds/forall.py b/subcmds/forall.py index 8209c806..d3e70ae1 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -169,6 +169,12 @@ terminal and are not redirected. else: cwd = project.worktree + if not os.path.exists(cwd): + if (opt.project_header and opt.verbose) \ + or not opt.project_header: + print >>sys.stderr, 'skipping %s/' % project.relpath + continue + if opt.project_header: stdin = subprocess.PIPE stdout = subprocess.PIPE