changeset 571:7d5abf0bba91

Pull needs the local dir Also use the repo to pull and not the workincopy object
author Bjoern Ricks <bricks@intevation.de>
date Fri, 02 Sep 2011 11:50:37 +0000
parents 44c0f8404983
children b8acd77fca60
files treepkg/git.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/git.py	Fri Sep 02 11:46:29 2011 +0000
+++ b/treepkg/git.py	Fri Sep 02 11:50:37 2011 +0000
@@ -78,7 +78,7 @@
 
     def update(self, localdir):
         """Runs git pull on the localdir."""
-        self.pull()
+        self.pull(localdir)
         output = capture_output(cmdexpand("git branch"), cwd=localdir)
         branches = output.splitlines()
         cur_branch = None
@@ -203,11 +203,12 @@
     def __init__(self, url, pattern, localdir):
         self.url = url
         self.pattern = pattern
-        repo = GitRepository(url)
-        self.workingcopy = GitWorkingCopy(repo, localdir)
+        self.localdir = localdir
+        self.repo = GitRepository(url)
+        self.workingcopy = GitWorkingCopy(self.repo, localdir)
 
     def list_tags(self):
-        self.workingcopy.pull()
+        self.repo.pull(localdir)
         tags = self.workingcopy.list_tags(self.pattern)
         return sorted(tags)
 
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)