# HG changeset patch # User Jeff Hammel # Date 1297291937 28800 # Node ID 85052c5ab8f1cec3c8d772c6d81d764641440ab4 # Parent 9eded49afdadab3dbff2ae6bf58a26e0511b84b2 hopefully fix up git magic --work-tree magic diff -r 9eded49afdad -r 85052c5ab8f1 autobot/changes/poller.py --- a/autobot/changes/poller.py Wed Feb 09 12:19:34 2011 -0800 +++ b/autobot/changes/poller.py Wed Feb 09 14:52:17 2011 -0800 @@ -428,8 +428,10 @@ """commands needed to initialize the repository""" commands = [ [ 'clone', self.repourl, self.workdir ] ] if self.branch != 'master': - git_dir = self.workdir.rstrip('/') + '/.git' - commands.append(['--git-dir', git_dir, 'checkout', self.branch]) + git_dir = self.workdir.rstrip('/') + commands.append(['--git-dir', git_dir + '/.git', + '--work-tree', git_dir, + 'checkout', self.branch]) return commands def update(self, _): diff -r 9eded49afdad -r 85052c5ab8f1 autobot/process/factory.py --- a/autobot/process/factory.py Wed Feb 09 12:19:34 2011 -0800 +++ b/autobot/process/factory.py Wed Feb 09 14:52:17 2011 -0800 @@ -143,8 +143,10 @@ self.addStep(ShellCommand(command=['git', 'clone', git_source], **kwargs)) if branch and branch != 'master': - dirname = self.dirname('git', git_source) + '/.git' - self.addStep(ShellCommand(command=['git', '--git-dir', dirname, 'checkout', branch], + dirname = self.dirname('git', git_source) + self.addStep(ShellCommand(command=['git', '--git-dir', dirname + '/.git', + '--work-tree', dirname, + 'checkout', branch], **kwargs)) def dirname(self, type, repo):