[SCM] build.samba.org - branch master updated
Matthieu Patou
mat at samba.org
Tue Nov 9 15:58:22 MST 2010
The branch, master has been updated
via 1866e85 Return to the current directory after dealing with git revision calculation
from 2753253 add unit tests
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1866e854d84403690935efc4d04a6e96587d53fb
Author: Matthieu Patou <mat at matws.net>
Date: Wed Nov 10 01:58:37 2010 +0300
Return to the current directory after dealing with git revision calculation
-----------------------------------------------------------------------
Summary of changes:
buildfarm/history.py | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildfarm/history.py b/buildfarm/history.py
index 51e35f4..6ca1af8 100644
--- a/buildfarm/history.py
+++ b/buildfarm/history.py
@@ -51,7 +51,6 @@ class History(object):
def _git_diff(self, t, revision, tree):
"""show recent git entries"""
- os.chdir(os.path.join(UNPACKED_DIR, tree))
log = self._log(tree)
@@ -68,8 +67,16 @@ class History(object):
title = "GIT Diff in %s:%s for revision %s" % (
tree, t.branch, revision)
- cmd = "git diff %s^ %s ./" % (revision, revision)
- return (title, entry, tree, [(cmd, commands.getoutput("%s 2> /dev/null" % cmd))])
+ pwd = os.environ["PWD"]
+ ret = None
+ try:
+ os.chdir(os.path.join(UNPACKED_DIR, tree))
+ cmd = "git diff %s^ %s ./" % (revision, revision)
+ ret = (title, entry, tree, [(cmd, commands.getoutput("%s 2> /dev/null" % cmd))])
+
+ finally:
+ os.chdir(pwd)
+ return ret
def authors(self, tree):
log = self._log(tree)
--
build.samba.org
More information about the samba-cvs
mailing list