def _input(cmd, file_desc):
p = popen2.Popen3(cmd)
- for line in file_desc:
+ while True:
+ line = file_desc.readline()
+ if not line:
+ break
p.tochild.write(line)
p.tochild.close()
if p.wait():
"""
write_string(head_link, val)
+def rev_parse(git_id):
+ """Parse the string and return an SHA1 id
+ """
+ return _output(['git-rev-parse', git_id]).strip()
+
def add(names):
"""Add the files or recursively add the directory contents
"""