From bf230dffe7d107a3ac6699da4806574b0399bca1 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sun, 6 Apr 2008 03:40:36 -0700 Subject: [PATCH] cmds: teach checkout and remote about the dispatcher Signed-off-by: David Aguilar --- ugit/git.py | 6 ------ ugit/models.py | 6 +++--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ugit/git.py b/ugit/git.py index 604abb0..6d5029b 100644 --- a/ugit/git.py +++ b/ugit/git.py @@ -97,9 +97,6 @@ def cherry_pick(revs, commit=False): return '\n'.join(cherries) -def checkout(*args): - return git('checkout', *args) - def commit_with_msg(msg, amend=False): """Creates a git commit.""" @@ -301,9 +298,6 @@ def push(remote, local_branch, remote_branch, ffwd=True, tags=False): branch_arg = '+%s:%s' % ( local_branch, remote_branch ) return git('push', remote, branch_arg, with_status=True, tags=tags) -def remote(*args): - return git('remote', without_stderr=True, *args).splitlines() - def remote_url(name): return gitcmd.config('remote.%s.url' % name, get=True) diff --git a/ugit/models.py b/ugit/models.py index 0cfea0b..c11065e 100644 --- a/ugit/models.py +++ b/ugit/models.py @@ -263,9 +263,9 @@ class Model(model.Model): def get_all_branches(self): return (self.get_local_branches() + self.get_remote_branches()) - def set_remote(self,remote): + def set_remote(self, remote): if not remote: return - self.set_param('remote',remote) + self.set_param('remote', remote) branches = utils.grep( '%s/\S+$' % remote, git.branch(remote=True), squash=False) self.set_remote_branches(branches) @@ -347,7 +347,7 @@ class Model(model.Model): self.set_branch(git.current_branch()) self.set_unstaged(self.get_modified() + self.get_untracked()) - self.set_remotes(git.remote()) + self.set_remotes(git.remote().splitlines()) self.set_remote_branches(git.branch(remote=True)) self.set_local_branches(git.branch(remote=False)) self.set_tags(git.tag().splitlines()) -- 2.11.4.GIT