summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2011-01-09 17:29:50 -0800
committerShawn O. Pearce <sop@google.com>2011-01-09 17:29:50 -0800
commit71cab95b4cc6758d5f18f19412188d46d0a29190 (patch)
tree0699635c5d912ea523747be299766f5cab9180b3 /subcmds
parent9275fd43294e760e47736857113f32a2f189c6c6 (diff)
parentf18cb761731a791bf1b9ee8c6308bfce5c9d3e62 (diff)
downloadgit-repo-71cab95b4cc6758d5f18f19412188d46d0a29190.tar.gz
Merge branch 'stable'
* stable: Encode the environment variables passed to git Exit with statuscode 0 for repo help init
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/forall.py4
-rw-r--r--subcmds/sync.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py
index 6bd867e7..d3e70ae1 100644
--- a/subcmds/forall.py
+++ b/subcmds/forall.py
@@ -151,11 +151,11 @@ terminal and are not redirected.
151 first = True 151 first = True
152 152
153 for project in self.GetProjects(args): 153 for project in self.GetProjects(args):
154 env = dict(os.environ.iteritems()) 154 env = os.environ.copy()
155 def setenv(name, val): 155 def setenv(name, val):
156 if val is None: 156 if val is None:
157 val = '' 157 val = ''
158 env[name] = val 158 env[name] = val.encode()
159 159
160 setenv('REPO_PROJECT', project.name) 160 setenv('REPO_PROJECT', project.name)
161 setenv('REPO_PATH', project.relpath) 161 setenv('REPO_PATH', project.relpath)
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 7b77388b..16f1d189 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -271,7 +271,7 @@ uncommitted changes are present' % project.relpath
271 if branch.startswith(R_HEADS): 271 if branch.startswith(R_HEADS):
272 branch = branch[len(R_HEADS):] 272 branch = branch[len(R_HEADS):]
273 273
274 env = dict(os.environ) 274 env = os.environ.copy()
275 if (env.has_key('TARGET_PRODUCT') and 275 if (env.has_key('TARGET_PRODUCT') and
276 env.has_key('TARGET_BUILD_VARIANT')): 276 env.has_key('TARGET_BUILD_VARIANT')):
277 target = '%s-%s' % (env['TARGET_PRODUCT'], 277 target = '%s-%s' % (env['TARGET_PRODUCT'],
@@ -428,9 +428,9 @@ warning: Cannot automatically authenticate repo."""
428 % (project.name, rev) 428 % (project.name, rev)
429 return False 429 return False
430 430
431 env = dict(os.environ) 431 env = os.environ.copy()
432 env['GIT_DIR'] = project.gitdir 432 env['GIT_DIR'] = project.gitdir.encode()
433 env['GNUPGHOME'] = gpg_dir 433 env['GNUPGHOME'] = gpg_dir.encode()
434 434
435 cmd = [GIT, 'tag', '-v', cur] 435 cmd = [GIT, 'tag', '-v', cur]
436 proc = subprocess.Popen(cmd, 436 proc = subprocess.Popen(cmd,