From acdb8d3120d740ba7ec373aa00f3eecc2361a7d2 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Mon, 24 Dec 2007 05:26:42 -0800 Subject: [PATCH] Allow pushing tags Signed-off by: David Aguilar --- ugitlibs/cmds.py | 10 +++++++--- ugitlibs/pushcontroller.py | 5 +++-- ui/PushDialog.ui | 11 +++++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ugitlibs/cmds.py b/ugitlibs/cmds.py index d08fcd0..cad3ad1 100644 --- a/ugitlibs/cmds.py +++ b/ugitlibs/cmds.py @@ -282,12 +282,16 @@ def git_ls_tree(rev): output.append((mode, objtype, sha1, filename,) ) return output -def git_push(remote, local_branch, remote_branch, force=False): - argv = ['git', 'push', remote] +def git_push(remote, local_branch, remote_branch, nonff=False, tags=False): + argv = ['git', 'push'] + if tags: + argv.append('--tags') + argv.append(remote) + if local_branch == remote_branch: argv.append(local_branch) else: - if force and local_branch: + if nonff and local_branch: argv.append('+%s:%s' % ( local_branch, remote_branch )) else: argv.append('%s:%s' % ( local_branch, remote_branch )) diff --git a/ugitlibs/pushcontroller.py b/ugitlibs/pushcontroller.py index b24e9f7..4beed94 100644 --- a/ugitlibs/pushcontroller.py +++ b/ugitlibs/pushcontroller.py @@ -63,11 +63,12 @@ class GitPushController(QObserver): remote = self.model.get_remote() local_branch = self.model.get_local_branch() remote_branch = self.model.get_remote_branch() - force = self.view.allowNonFFCheckBox.isChecked() + nonff = self.view.allowNonFFCheckBox.isChecked() + tags = self.view.tagsCheckBox.isChecked() status, output = cmds.git_push(remote, local_branch, remote_branch, - force=force) + nonff=nonff, tags=tags) qtutils.show_command(self.view, output) if not status: diff --git a/ui/PushDialog.ui b/ui/PushDialog.ui index 606fbdb..99762a4 100644 --- a/ui/PushDialog.ui +++ b/ui/PushDialog.ui @@ -79,14 +79,21 @@ + + + Send Tags + + + + Qt::Horizontal - 91 - 26 + 40 + 20 -- 2.11.4.GIT