Wed Jan 17 23:02:12 UTC 2007 jonathan.buchanan@gmail.com * The DARCS_DONT_ESCAPE_8BIT environment variable is now set using os.environ before running darcs and restored to its original state after running darcs - makes darcsweb work on Windows diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi --- old-darcsweb/darcsweb.cgi 2015-10-29 08:13:25.000000000 +0000 +++ new-darcsweb/darcsweb.cgi 2015-10-29 08:13:25.000000000 +0000 @@ -587,9 +587,18 @@ """Runs darcs on the repodir with the given params, return a file object with its output.""" os.chdir(config.repodir) - cmd = 'DARCS_DONT_ESCAPE_8BIT=1 ' + config.darcspath + "darcs " + params + try: + original_8bit_setting = os.environ['DARCS_DONT_ESCAPE_8BIT'] + except KeyError: + original_8bit_setting = None + os.environ['DARCS_DONT_ESCAPE_8BIT'] = '1' + cmd = config.darcspath + "darcs " + params inf, outf = os.popen4(cmd, 't') darcs_runs.append(params) + if original_8bit_setting == None: + del(os.environ['DARCS_DONT_ESCAPE_8BIT']) + else: + os.environ['DARCS_DONT_ESCAPE_8BIT'] = original_8bit_setting return outf