# HG changeset patch # User Bjoern Ricks # Date 1296642362 0 # Node ID 70fa7debabed0f107c682332ab0dfd4d235d464c # Parent 149d18aca4f7b9c3fbddd3674fe18df45ea687bd checkout git branch on update this may be necessary if a treepkg config has changed and a branch is used instead of master diff -r 149d18aca4f7 -r 70fa7debabed treepkg/git.py --- a/treepkg/git.py Wed Feb 02 10:00:48 2011 +0000 +++ b/treepkg/git.py Wed Feb 02 10:26:02 2011 +0000 @@ -28,9 +28,12 @@ run.call(cmdexpand("git checkout -q --track -b local $branch", **locals()), cwd=localdir) -def update(localdir, revision=None): +def update(localdir, branch=None): """Runs git pull on the localdir.""" run.call(cmdexpand("git pull -q"), cwd=localdir) + if branch: + run.call(cmdexpand("git checkout -q $branch", branch=branch), + cwd=localdir) def export(src, dest): """Exports the local branch from src to dest"""