# HG changeset patch # User Bjoern Ricks # Date 1296640269 0 # Node ID 991bc01ae668c0eaced270caa96a49e6256787ea # Parent 822a4d31efdabcbcbb4aca7e4a79f7c956c9a130 log used git repo and branch diff -r 822a4d31efda -r 991bc01ae668 treepkg/git.py --- 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):