summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorOrgad Shaneh <orgads@gmail.com>2012-12-31 16:46:08 +0200
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-04-11 07:22:35 +0000
commitc9c4272b77e79d12c78b5650b0cb7781fad17950 (patch)
treebb8212d930b6beda7474b690211f7bab330dcdbb /contrib
parent0ee021b543390d88699b414cb12bf692de145cd0 (diff)
TrivialRebase: Pipe subprocesses directly
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/trivial_rebase.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/trivial_rebase.py b/contrib/trivial_rebase.py
index d81c946821..4728499378 100755
--- a/contrib/trivial_rebase.py
+++ b/contrib/trivial_rebase.py
@@ -142,10 +142,10 @@ class TrivialRebase:
def GetPatchId(self, revision):
git_show_cmd = ['git', 'show', revision]
patch_id_cmd = ['git', 'patch-id']
- patch_id_process = subprocess.Popen(patch_id_cmd, stdout=subprocess.PIPE,
- stdin=subprocess.PIPE)
git_show_process = subprocess.Popen(git_show_cmd, stdout=subprocess.PIPE)
- return patch_id_process.communicate(git_show_process.communicate()[0])[0]
+ patch_id_process = subprocess.Popen(patch_id_cmd, stdout=subprocess.PIPE,
+ stdin=git_show_process.stdout)
+ return patch_id_process.communicate()[0]
def SuExec(self, as_user, cmd):
suexec_cmd = ['ssh', '-l', "Gerrit Code Review", '-p', self.port, self.server, '-i',