[Treepkg-commits] r508 - trunk/treepkg

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Feb 2 10:51:10 CET 2011


Author: bricks
Date: 2011-02-02 10:51:09 +0100 (Wed, 02 Feb 2011)
New Revision: 508

Modified:
   trunk/treepkg/git.py
Log:
log used git repo and branch


Modified: trunk/treepkg/git.py
===================================================================
--- trunk/treepkg/git.py	2011-02-01 09:00:11 UTC (rev 507)
+++ trunk/treepkg/git.py	2011-02-02 09:51:09 UTC (rev 508)
@@ -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):



More information about the Treepkg-commits mailing list