[meld] Support push in Git (bgo#698509)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Support push in Git (bgo#698509)
- Date: Mon, 29 Apr 2013 20:19:42 +0000 (UTC)
commit 33330a13ba15b1f9bdacdea6367ab73c4de3629f
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue Apr 30 06:04:04 2013 +1000
Support push in Git (bgo#698509)
meld/vc/git.py | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index c3579a7..666d33d 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -78,17 +78,22 @@ class Vc(_vc.CachedVc):
return location
def commit_command(self, message):
- return [self.CMD,"commit","-m",message]
+ return [self.CMD, "commit", "-m", message]
+
def diff_command(self):
return [self.CMD, "diff", "--relative", "HEAD"]
+
def update_command(self):
- return [self.CMD,"pull"]
+ return [self.CMD, "pull"]
+
def add_command(self):
- return [self.CMD,"add"]
+ return [self.CMD, "add"]
+
def remove_command(self, force=0):
- return [self.CMD,"rm"]
+ return [self.CMD, "rm"]
+
def revert_command(self):
- return [self.CMD,"checkout"]
+ return [self.CMD, "checkout"]
# Prototyping VC interface version 2
@@ -96,6 +101,10 @@ class Vc(_vc.CachedVc):
command = [self.CMD, 'pull']
runner(command, [], refresh=True, working_dir=self.root)
+ def push(self, runner):
+ command = [self.CMD, 'push']
+ runner(command, [], refresh=True, working_dir=self.root)
+
def revert(self, runner, files):
exists = [f for f in files if os.path.exists(f)]
missing = [f for f in files if not os.path.exists(f)]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]