summaryrefslogtreecommitdiffstats
path: root/src/pyfedpkg/__init__.py
diff options
context:
space:
mode:
authorJesse Keating <jkeating@redhat.com>2010-09-20 14:05:26 -0700
committerJesse Keating <jkeating@redhat.com>2010-09-20 14:05:26 -0700
commit3810d8d56a046206628c9d906d561e2931367bf2 (patch)
treee15601ef8d1c1f92ba28a0f3f769e1f1a9af0384 /src/pyfedpkg/__init__.py
parent53146ca4838576cb7383f2218d8ad3c51d9c564d (diff)
downloadfedora-packager-3810d8d56a046206628c9d906d561e2931367bf2.tar.gz
fedora-packager-3810d8d56a046206628c9d906d561e2931367bf2.tar.xz
fedora-packager-3810d8d56a046206628c9d906d561e2931367bf2.zip
Handle paths with push/pull
Diffstat (limited to 'src/pyfedpkg/__init__.py')
-rw-r--r--src/pyfedpkg/__init__.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py
index 9e15057..bb7449f 100644
--- a/src/pyfedpkg/__init__.py
+++ b/src/pyfedpkg/__init__.py
@@ -676,18 +676,22 @@ 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"""
+def pull(path=None):
+ """Pull changes from the main repository using optional path"""
+ if not path:
+ path = os.getcwd()
cmd = ['git', 'pull']
- _run_command(cmd)
+ _run_command(cmd, cwd=path)
return
-def push():
- """Push changes to the main repository"""
+def push(path=None):
+ """Push changes to the main repository using optional path"""
+ if not path:
+ path = os.getcwd()
cmd = ['git', 'push']
- _run_command(cmd)
+ _run_command(cmd, cwd=path)
return
def sources(path, outdir=None):