summaryrefslogtreecommitdiff
path: root/examples/zeitgeist-git.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-04-30 21:46:34 +0200
committerGuido Günther <agx@sigxcpu.org>2010-04-30 21:46:34 +0200
commitb28c2775f2159923407e473e4a8ed294713336d2 (patch)
treed4008c732da25d5a86bd148188379641b7ceda2d /examples/zeitgeist-git.py
parentf7a085abb2f604376a4c6f6513fba5f972bf18bd (diff)
downloadgit-buildpackage-b28c2775f2159923407e473e4a8ed294713336d2.tar.gz
git-buildpackage-b28c2775f2159923407e473e4a8ed294713336d2.tar.bz2
git-buildpackage-b28c2775f2159923407e473e4a8ed294713336d2.zip
zeitgeist hook: don't fail on umlauts
Diffstat (limited to 'examples/zeitgeist-git.py')
-rwxr-xr-xexamples/zeitgeist-git.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/zeitgeist-git.py b/examples/zeitgeist-git.py
index 9c76fad4..03106e2d 100755
--- a/examples/zeitgeist-git.py
+++ b/examples/zeitgeist-git.py
@@ -56,8 +56,9 @@ def get_repo():
repo = None
uri = subprocess.Popen(['git', 'config', '--get', 'remote.origin.url'],
stdout=subprocess.PIPE).communicate()[0]
+
if uri:
- uri = unicode(uri.strip())
+ uri = uri.strip().decode(sys.getfilesystemencoding())
repo = unicode(uri.rsplit('/', 1)[1])
repo = repo.rsplit(u'.git', 1)[0]
return repo, uri
@@ -69,7 +70,7 @@ def main(argv):
# FIXME: I'd be great if zeitgeist would allow for more detail:
# * branch
# * log summary (git log -1 --format=%s HEAD)
- curdir = os.path.abspath(os.curdir)
+ curdir = os.path.abspath(os.curdir).decode(sys.getfilesystemencoding())
uri = u"file://%s" % curdir
repo, origin = get_repo()