Mercurial > hg > gut
comparison gut/main.py @ 3:4d38d14cf1d4
pass the pipe argument
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 16 Jul 2010 16:00:56 -0700 |
parents | 54b30e8f6f82 |
children | 190ce22e7e83 |
comparison
equal
deleted
inserted
replaced
2:54b30e8f6f82 | 3:4d38d14cf1d4 |
---|---|
78 f = file(output) # write the output to a patch file | 78 f = file(output) # write the output to a patch file |
79 return log | 79 return log |
80 | 80 |
81 def branch(self): | 81 def branch(self): |
82 """print what branch you're on""" | 82 """print what branch you're on""" |
83 output = call(['git', 'branch'], output=False) | 83 output = call(['git', 'branch'], output=False, pipe=True) |
84 if self.simulate: | 84 if self.simulate: |
85 return | 85 return |
86 for line in output['stdout'].splitlines(): | 86 for line in output['stdout'].splitlines(): |
87 if line.startswith('*'): | 87 if line.startswith('*'): |
88 return line[1:].strip() | 88 return line[1:].strip() |