Mercurial > treepkg > treepkg
comparison treepkg/git.py @ 444:cb061f0474ba
Always call checkout index with a trailing / to force the creation of the dest
directory.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Mon, 09 Aug 2010 12:24:56 +0000 |
parents | dd2bd0ccd674 |
children | bee2e5f6cf8d |
comparison
equal
deleted
inserted
replaced
443:464b2947af23 | 444:cb061f0474ba |
---|---|
35 """Runs git pull on the localdir.""" | 35 """Runs git pull on the localdir.""" |
36 run.call(cmdexpand("git pull -q"), cwd=localdir) | 36 run.call(cmdexpand("git pull -q"), cwd=localdir) |
37 | 37 |
38 def export(src, dest): | 38 def export(src, dest): |
39 """Exports the local branch from src to dest""" | 39 """Exports the local branch from src to dest""" |
40 dest = os.path.normpath(dest) + os.sep | |
40 run.call(cmdexpand("git checkout-index -a -f --prefix=$dest", **locals()), | 41 run.call(cmdexpand("git checkout-index -a -f --prefix=$dest", **locals()), |
41 cwd=src) | 42 cwd=src) |
42 | 43 |
43 def last_changed_revision(git_working_copy): | 44 def last_changed_revision(git_working_copy): |
44 """Return the SHA1 sum of the latest commit""" | 45 """Return the SHA1 sum of the latest commit""" |