Changeset b0c2756 in rtems-source-builder


Ignore:
Timestamp:
Apr 16, 2013, 7:41:31 AM (6 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
fd5042a
Parents:
200f0a3
Message:

Clean up the git module.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/git.py

    r200f0a3 rb0c2756  
    6767
    6868    def clone(self, url, path):
    69         ec, output = self._run(['clone', url, path])
    70         if ec != 0:
    71             raise error.general('clone of %s failed: %s' % (url, output))
     69        ec, output = self._run(['clone', url, path], check = True)
    7270
    73     def fetch(self, url, path):
    74         ec, output = self._run(['fetch', url])
    75         if ec != 0:
    76             raise error.general('fetch of %s failed: %s' % (url, output))
     71    def fetch(self):
     72        ec, output = self._run(['fetch'], check = True)
    7773
    7874    def pull(self):
    79         ec, output = self._run(['pull'])
    80         if ec != 0:
    81             raise error.general('pull of %s failed: %s' % (url, output))
     75        ec, output = self._run(['pull'], check = True)
    8276
    8377    def reset(self, args):
    8478        if type(args) == str:
    8579            args = [args]
    86         ec, output = self._run(['reset'] + args)
    87         if ec != 0:
    88             raise error.general('pull of %s failed: %s' % (url, output))
     80        ec, output = self._run(['reset'] + args, check = True)
    8981
    9082    def branch(self):
     
    9789
    9890    def checkout(self, branch = 'master'):
    99         ec, output = self._run(['checkout', branch])
    100         return ec == 0
     91        ec, output = self._run(['checkout', branch], check = True)
    10192
    10293    def status(self):
Note: See TracChangeset for help on using the changeset viewer.