From 49d415f26bc90328b350ac664f7ae71fa18e6c94 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 25 Jun 2019 13:31:13 +0200 Subject: [PATCH] [DEV] add pull command --- island/commands.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/island/commands.py b/island/commands.py index 8b39c88..1a7282a 100644 --- a/island/commands.py +++ b/island/commands.py @@ -295,6 +295,17 @@ def fetch(path_repository, remote_name, prune=True): generic_display_error(return_value, "fetch") return return_value +def pull(path_repository, remote_name, prune=True): + if remote_name == None or remote_name == "": + raise "Missing remote_name" + cmd = 'git pull ' + remote_name + if prune == True: + cmd += " --prune" + debug.verbose("execute : " + cmd) + return_value = multiprocess.run_command(cmd, cwd=path_repository) + generic_display_error(return_value, "pull") + return return_value + def push(path_repository, remote_name, elements): if remote_name == None or remote_name == "": raise "Missing remote_name"