Example #1
0
 def gitopen(self, s, err=None):
     if err == subprocess.PIPE:
         (sin, so, se) = util.popen3('GIT_DIR=%s %s' % (self.path, s))
         return so
     elif err == subprocess.STDOUT:
             return self.popen_with_stderr(s)
     else:
         return util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
Example #2
0
 def gitopen(self, s, err=None):
     if err == subprocess.PIPE:
         (sin, so, se) = util.popen3('GIT_DIR=%s %s' % (self.path, s))
         return so
     elif err == subprocess.STDOUT:
             return self.popen_with_stderr(s)
     else:
         return util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
Example #3
0
 def gitpipe(self, s):
     prevgitdir = os.environ.get('GIT_DIR')
     os.environ['GIT_DIR'] = self.path
     try:
         return util.popen3(s)
     finally:
         if prevgitdir is None:
             del os.environ['GIT_DIR']
         else:
             os.environ['GIT_DIR'] = prevgitdir
Example #4
0
 def gitpipe(self, s):
     prevgitdir = os.environ.get('GIT_DIR')
     os.environ['GIT_DIR'] = self.path
     try:
         return util.popen3(s)
     finally:
         if prevgitdir is None:
             del os.environ['GIT_DIR']
         else:
             os.environ['GIT_DIR'] = prevgitdir
Example #5
0
 def gitopen(self, s, noerr=False):
     prevgitdir = os.environ.get('GIT_DIR')
     os.environ['GIT_DIR'] = self.path
     try:
         if noerr:
             (stdin, stdout, stderr) = util.popen3(s)
             return stdout
         else:
             return util.popen(s, 'rb')
     finally:
         if prevgitdir is None:
             del os.environ['GIT_DIR']
         else:
             os.environ['GIT_DIR'] = prevgitdir
Example #6
0
 def gitopen(self, s, noerr=False):
     prevgitdir = os.environ.get('GIT_DIR')
     os.environ['GIT_DIR'] = self.path
     try:
         if noerr:
             (stdin, stdout, stderr) = util.popen3(s)
             return stdout
         else:
             return util.popen(s, 'rb')
     finally:
         if prevgitdir is None:
             del os.environ['GIT_DIR']
         else:
             os.environ['GIT_DIR'] = prevgitdir
Example #7
0
 def gitopen(self, s, err=None):
     prevgitdir = os.environ.get('GIT_DIR')
     os.environ['GIT_DIR'] = self.path
     try:
         if err == subprocess.PIPE:
             (stdin, stdout, stderr) = util.popen3(s)
             return stdout
         elif err == subprocess.STDOUT:
             return self.popen_with_stderr(s)
         else:
             return util.popen(s, 'rb')
     finally:
         if prevgitdir is None:
             del os.environ['GIT_DIR']
         else:
             os.environ['GIT_DIR'] = prevgitdir
Example #8
0
 def gitopen(self, s, err=None):
     prevgitdir = os.environ.get('GIT_DIR')
     os.environ['GIT_DIR'] = self.path
     try:
         if err == subprocess.PIPE:
             (stdin, stdout, stderr) = util.popen3(s)
             return stdout
         elif err == subprocess.STDOUT:
             return self.popen_with_stderr(s)
         else:
             return util.popen(s, 'rb')
     finally:
         if prevgitdir is None:
             del os.environ['GIT_DIR']
         else:
             os.environ['GIT_DIR'] = prevgitdir
Example #9
0
 def gitopen(self, s, noerr=False):
     if noerr:
         (sin, so, se) = util.popen3('GIT_DIR=%s %s' % (self.path, s))
         return so
     else:
         return util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
Example #10
0
 def gitopen(self, s, noerr=False):
     if noerr:
         (sin, so, se) = util.popen3('GIT_DIR=%s %s' % (self.path, s))
         return so
     else:
         return util.popen('GIT_DIR=%s %s' % (self.path, s), 'rb')
Example #11
0
 def gitpipe(self, s):
     return util.popen3('GIT_DIR=%s %s' % (self.path, s))
Example #12
0
 def gitpipe(self, s):
     return util.popen3('GIT_DIR=%s %s' % (self.path, s))