summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg/__init__.py
diff options
context:
space:
mode:
authorJochen Schmitt <Jochen@herr-schmitt.de>2010-09-16 20:05:47 +0200
committerJesse Keating <jkeating@redhat.com>2010-09-20 13:18:25 -0700
commitabd8e620a19b31a995a57f546988f794fa233b05 (patch)
tree50cdbdc827d9ff2be02f0decf4032066cbd86d87 /src/pyfedpkg/__init__.py
parentf9443e37b7ca3863ba79f9603d074bcd7c749abe (diff)
downloadfedora-packager-abd8e620a19b31a995a57f546988f794fa233b05.tar.gz
fedora-packager-abd8e620a19b31a995a57f546988f794fa233b05.tar.xz
fedora-packager-abd8e620a19b31a995a57f546988f794fa233b05.zip
Move pull and push function out of PackageModule
Hello Jesse, I have move the pull() and push() function in the __init__.py module out of the PackageModule class. Best Regards: Jochen Schmitt
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r--src/pyfedpkg/__init__.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 790cb93..a49f4ed 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -638,6 +638,20 @@ def new(path=None):
log.debug('Diffing from tag %s' % tag)
return repo.git.diff('-M', tag)
+def pull():
+ """Pull changes from the main repository"""
+
+ cmd = ['git', 'pull']
+ _run_command(cmd)
+ return
+
+def push():
+ """Push changes to the main repository"""
+
+ cmd = ['git', 'push']
+ _run_command(cmd)
+ return
+
def sources(path, outdir=None):
"""Download source files"""
@@ -1544,20 +1558,6 @@ class PackageModule:
_run_command(cmd, shell=True)
return
- def pull(self):
- """Pull changes from the main repository"""
-
- cmd = ['git', 'pull']
- _run_command(cmd)
- return
-
- def push(self):
- """Push changes to the main repository"""
-
- cmd = ['git', 'push']
- _run_command(cmd)
- return
-
def srpm(self, hashtype=None):
"""Create an srpm using hashtype from content in the module