def update(): """ Updates vim repository and plugins. """ # git pull with cd('.vim'): git_pull() # plugins update cmd = 'vim +NeoBundleUpdate +qa!' run(cmd)
def pull(self, args=None): # Update the root folder first root_config = git_get_current_branch(self.root_dir) if not root_config: print("Not a git repository") else: git_fetch(self.root_dir, root_config) git_pull(self.root_dir, root_config) config = self.get_project_config() for m in config["modules"]: git_fetch(self.root_dir, m) git_pull(self.root_dir, m)
def clone(self, args=None): # Update the root folder first root_config = git_get_current_branch(self.root_dir) if not root_config: print("Not a git repository") else: git_fetch(self.root_dir, root_config) git_checkout(self.root_dir, root_config) git_pull(self.root_dir, root_config) config = self.get_project_config(reload=True) for m in config["modules"]: module_dir = os.path.join(self.root_dir, m["folder"]) if os.path.exists(module_dir): git_fetch(self.root_dir, m) git_checkout(self.root_dir, m) git_pull(self.root_dir, m)
def pull(root, config, args=None): for m in config["modules"]: git_pull(root_dir, m)