changeset 545:991bc01ae668

log used git repo and branch
author Bjoern Ricks <bricks@intevation.de>
date Wed, 02 Feb 2011 09:51:09 +0000
parents 822a4d31efda
children 149d18aca4f7
files treepkg/git.py
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/git.py	Tue Feb 01 09:00:11 2011 +0000
+++ b/treepkg/git.py	Wed Feb 02 09:51:09 2011 +0000
@@ -104,8 +104,14 @@
            Revision number included for compatibility
         """
         gitdir = os.path.join(self.localdir, ".git")
+        branch = self.repository.branch
+        if not branch:
+            branch = "master"
         if os.path.exists(gitdir):
-            self.log_info("Updating the working copy in %r", self.localdir)
+            self.log_info("Updating the working copy in %r for repo " \
+                    "%s and branch %s", self.localdir,
+                    self.repository.repository,
+                    branch)
             update(self.localdir, self.repository.branch)
         else:
             # TODO: better check if localdir contains files
@@ -114,8 +120,8 @@
                         " files. Can't checkout from %s" % (self.localdir,
                             self.repository.url))
             self.log_info("The working copy in %r doesn't exist yet."
-                          "  Checking out from %r",
-                          self.localdir, self.repository.url)
+                          "  Checking out branch %s from %r",
+                          self.localdir, branch, self.repository.url)
             self.repository.checkout(self.localdir)
 
     def export(self, destdir):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)