[Treepkg-commits] r525 - trunk/treepkg

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 2 11:47:42 CEST 2011


Author: bricks
Date: 2011-09-02 11:47:42 +0200 (Fri, 02 Sep 2011)
New Revision: 525

Modified:
   trunk/treepkg/git.py
Log:
Use local-master as default local branch name if no branch is set in the config
If a branch is set use branch name also as local branch name


Modified: trunk/treepkg/git.py
===================================================================
--- trunk/treepkg/git.py	2011-09-02 09:43:21 UTC (rev 524)
+++ trunk/treepkg/git.py	2011-09-02 09:47:42 UTC (rev 525)
@@ -36,15 +36,17 @@
                     defaults to master
         """
         self.url = url
-        self.local_branch = "local"
-        self.branch = branch
         if not branch:
+            # as default track master as local-master
+            self.local_branch = "local-master"
             self.branch = "master"
+        else:
+            self.local_branch = branch
+            self.branch = branch
         if ":" in self.branch:
             branches = self.branch.split(":")
             self.local_branch = branches[0]
             self.branch = branches[1]
-        # use master as default
 
     def checkout(self, localdir):
         """Clones the repository at url into the localdir"""



More information about the Treepkg-commits mailing list