summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/forall.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py
index b22e22a1..acbf18bc 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -34,6 +34,17 @@ pwd is the project's working directory.
34 34
35REPO_PROJECT is set to the unique name of the project. 35REPO_PROJECT is set to the unique name of the project.
36 36
37REPO_PATH is the path relative the the root of the client.
38
39REPO_REMOTE is the name of the remote system from the manifest.
40
41REPO_LREV is the name of the revision from the manifest, translated
42to a local tracking branch. If you need to pass the manifest
43revision to a locally executed git command, use REPO_LREV.
44
45REPO_RREV is the name of the revision from the manifest, exactly
46as written in the manifest.
47
37shell positional arguments ($1, $2, .., $#) are set to any arguments 48shell positional arguments ($1, $2, .., $#) are set to any arguments
38following <command>. 49following <command>.
39 50
@@ -70,6 +81,12 @@ not redirected.
70 for project in self.GetProjects(args): 81 for project in self.GetProjects(args):
71 env = dict(os.environ.iteritems()) 82 env = dict(os.environ.iteritems())
72 env['REPO_PROJECT'] = project.name 83 env['REPO_PROJECT'] = project.name
84 env['REPO_PATH'] = project.relpath
85 env['REPO_REMOTE'] = project.remote.name
86 env['REPO_LREV'] = project\
87 .GetRemote(project.remote.name)\
88 .ToLocal(project.revision)
89 env['REPO_RREV'] = project.revision
73 90
74 p = subprocess.Popen(cmd, 91 p = subprocess.Popen(cmd,
75 cwd = project.worktree, 92 cwd = project.worktree,