Exemplo n.º 1
0
 def refresh_repositories(self, msg, args):
     config = RepoConfig(REPOSITORY_CONFIG_FILE)
     branches = config.get_repository(REPOSITORY_NAME)["branches"]
     for branch in branches:
         cmd = GitCommand(branch["path"])
         cmd.pull()
         yield ("{} had been updated.".format((branch["path"])))
Exemplo n.º 2
0
 def _get_git_commander(self, repo):
     return GitCommand(repo, self._git_path)
Exemplo n.º 3
0
 def checkout_branch(self, repository_name, branch_name):
     branch_item = self._get_repo_path(repository_name, branch_name)
     cmd = GitCommand(branch_item['path'])
     cmd.checkout(branch_item['value'])
     cmd.pull()
     return branch_item
Exemplo n.º 4
0
#/usr/bin/env python3
from gitutil.configure import Configuration
from gitutil.commands import GitCommand
import os

REPOSITORY_CONFIG_FILE = os.getenv("REPOSITORY_CONFIG_FILE")
REPOSITORY_NAME = os.getenv("REPOSITORY")
config = Configuration(REPOSITORY_CONFIG_FILE)

for branch in config["branches"]:
    cmd = GitCommand(branch["path"])
    cmd.pull()