monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: viewmtn requires python2.4?


From: Bruce Stephens
Subject: [Monotone-devel] Re: viewmtn requires python2.4?
Date: Mon, 13 Feb 2006 16:53:49 +0000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Chad Walstrom <address@hidden> writes:

> Bruce Stephens <address@hidden>  wrote:
>> Yes, I know.  But it doesn't have libapache2-mod-python2.4, because
>> python 2.4 isn't the default yet.
>
> Exactly.  I've taken it as standard practice to develop my Python
> scripts to whatever is in Debian stable, since that is the platform I
> prefer to run my servers on.  It makes things a lot easier. ;-)  If
> viewmtn doesn't use too many 2.4-isms, perhaps it wouldn't be much
> effort to backport it to 2.3.

The only hard one I noticed is trivial to fix:

--- wrapper.py  a3b890f3aa3d092d6ab1c8e9d3d401e83ddfe316
+++ wrapper.py  2e8d1467108543adbc75fcecddd18782f0d442e9
@@ -106,7 +106,8 @@
            manifest = mt.manifest(manifest_id)
            dir_seen = {} # would use a set, but need python2.4 really
            for file_id, filename in manifest:
-               fsp = filename.rsplit('/', 1)
+               fsp = filename.split('/')
+               fsp = [fsp[-1],fsp[:-1]]
                if len(fsp) == 2 and not dir_seen.has_key(fsp[1]):
                    dir_seen[fsp[1]] = True
            rv['file_count'] = len(manifest)

However, I think there's something more subtle, somewhere, because I
can't seem to get syntax highlighted diffs.  When I click on the diff
link, I get up to a horizontal line, and then the browser just waits.
I can click on the download diff and see the text...

Oh wait, it's working today.

Nope, my mistake: it seems to work for smallish diffs, but not big
ones.  So I fear there's some subtle problem in buffering in
run_command, or possibly some bug in python 2.3's popen2.  I vaguely
recall grahame mentioning something about that.

However, everything else seems to work fine, including the little bits
of DHTML.  Likely this could be resolved if you were willing to write
the diff to a temporary file or something.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]