Add merge to the git and download modules to merge after a fetch.

Update the RTEMS tools and newlib-git to merge after the fetch.
This commit is contained in:
Chris Johns
2015-03-18 08:21:34 +11:00
parent 7f7d388af8
commit b0f9e30fa4
4 changed files with 13 additions and 6 deletions

View File

@@ -423,10 +423,6 @@ def _git_downloader(url, local, config, opts):
log.notice('git: checkout: %s => %s' % (us[0], _as[1]))
if _do_download(opts):
repo.checkout(_as[1])
elif _as[0] == 'pull':
log.notice('git: pull: %s' % (us[0]))
if _do_download(opts):
repo.pull()
elif _as[0] == 'submodule':
if len(_as) != 2:
raise error.general('invalid git submodule: %s' % (_as))
@@ -437,6 +433,14 @@ def _git_downloader(url, local, config, opts):
log.notice('git: fetch: %s -> %s' % (us[0], rlp))
if _do_download(opts):
repo.fetch()
elif _as[0] == 'merge':
log.notice('git: merge: %s' % (us[0]))
if _do_download(opts):
repo.merge()
elif _as[0] == 'pull':
log.notice('git: pull: %s' % (us[0]))
if _do_download(opts):
repo.pull()
elif _as[0] == 'reset':
arg = []
if len(_as) > 1:

View File

@@ -78,6 +78,9 @@ class repo:
def fetch(self):
ec, output = self._run(['fetch'], check = True)
def merge(self):
ec, output = self._run(['merge'], check = True)
def pull(self):
ec, output = self._run(['pull'], check = True)