summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2015-03-18 08:21:34 +1100
committerChris Johns <chrisj@rtems.org>2015-03-18 08:21:34 +1100
commitb0f9e30fa46a8025b76bf86321ebe585de8972f4 (patch)
tree6d41e695fa3fde9c57df29696f2e5874a064116a
parent7f7d388af88f56139d7c6a832b551c5366adcefc (diff)
downloadrtems-source-builder-b0f9e30fa46a8025b76bf86321ebe585de8972f4.tar.bz2
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.
-rw-r--r--rtems/config/tools/rtems-gcc-4.9-newlib-git-1.cfg2
-rw-r--r--rtems/config/tools/rtems-tools-1.cfg2
-rw-r--r--source-builder/sb/download.py12
-rw-r--r--source-builder/sb/git.py3
4 files changed, 13 insertions, 6 deletions
diff --git a/rtems/config/tools/rtems-gcc-4.9-newlib-git-1.cfg b/rtems/config/tools/rtems-gcc-4.9-newlib-git-1.cfg
index 98caa2f..0e92b70 100644
--- a/rtems/config/tools/rtems-gcc-4.9-newlib-git-1.cfg
+++ b/rtems/config/tools/rtems-gcc-4.9-newlib-git-1.cfg
@@ -35,7 +35,7 @@
#
# Newlib is from CVS and this is via a git mirror. No hash on GIT
#
-%source set newlib git://sourceware.org/git/newlib.git?fetch?reset=hard?branch=master?checkout=%{newlib_version}
+%source set newlib git://sourceware.org/git/newlib.git?fetch?reset=hard?merge?branch=master?checkout=%{newlib_version}
#
# The gcc/newlib build instructions. We use 4.9 Release 1.
diff --git a/rtems/config/tools/rtems-tools-1.cfg b/rtems/config/tools/rtems-tools-1.cfg
index f40a9e1..aebf3c5 100644
--- a/rtems/config/tools/rtems-tools-1.cfg
+++ b/rtems/config/tools/rtems-tools-1.cfg
@@ -30,7 +30,7 @@
%define rtems_tools_version HEAD
%define rtems_tools_git_checkout %{nil}
%endif
- %source set rtems-tools git://git.rtems.org/rtems-tools.git?fetch?reset=hard?branch=master%{rtems_tools_git_checkout}
+ %source set rtems-tools git://git.rtems.org/rtems-tools.git?fetch?reset=hard?merge?branch=master%{rtems_tools_git_checkout}
#
# The RTEMS Tools build instructions. We use GIT Release 1.
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index 17d1d7e..16aa251 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -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:
diff --git a/source-builder/sb/git.py b/source-builder/sb/git.py
index d115845..19fbed0 100644
--- a/source-builder/sb/git.py
+++ b/source-builder/sb/git.py
@@ -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)