# HG changeset patch # User Bjoern Ricks # Date 1314956862 0 # Node ID e188e780977bed02dc404fa058d479305c6dfe84 # Parent 1f7746e2288e7fd66a0f2d2b49c68841f25501e7 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 diff -r 1f7746e2288e -r e188e780977b treepkg/git.py --- a/treepkg/git.py Fri Sep 02 09:43:21 2011 +0000 +++ b/treepkg/git.py Fri Sep 02 09:47:42 2011 +0000 @@ -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"""