[yocto] [[AUH] 11/17] utils/git.py: Add method for apply patches into a branch.
Paul Eggleton
paul.eggleton at linux.intel.com
Thu Nov 26 12:28:34 PST 2015
On Wednesday 25 November 2015 18:00:40 Aníbal Limón wrote:
> Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
> ---
> modules/utils/git.py | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/modules/utils/git.py b/modules/utils/git.py
> index 48ed46d..d7f5713 100644
> --- a/modules/utils/git.py
> +++ b/modules/utils/git.py
> @@ -61,6 +61,9 @@ class Git(object):
> def create_patch(self, out_dir):
> return self._cmd("format-patch -M10 -1 -o " + out_dir)
>
> + def apply_patch(self, patch_file):
> + return self._cmd("am %s" % patch_file)
> +
> def status(self):
> return self._cmd("status --porcelain")
Just a warning (which may not apply in your situation, not sure) - you may
need to do extra cleanup beyond git am --abort if this fails; see:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e0b9a96002bb23e7c2c8a8c9c4d2431461fd6cb7
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
More information about the yocto
mailing list