monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] hg2mtn 0.0.20070824


From: Thomas Keller
Subject: Re: [Monotone-devel] hg2mtn 0.0.20070824
Date: Sat, 25 Aug 2007 01:48:41 +0200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

Patrick Georgi schrieb:
> As it's one of my first large python project "from scratch", it's probably 
> full of no-nos of python design. Patches welcome and accepted!

I'm a Python novice myself, so I can't give you much advice (despite I
don't like "tmp"-named variables very much in any language ;). However,
by skimming through your code I found this:

# FIXME: handle renamed files
ofctx = parentcontext.filectx(file)
oldid = sha.new(ofctx.data()).hexdigest()

This looks like you're hashing the old file contents for each patch you
are going to feed into mtn, right? Wouldn't it be better to use some
kind of cache here, since if you process the revisions forwardly, you
should already know all the fileids from previous revisions, don't you?
Maybe this could speed up the thing a bit more.

And yeah, a little code cleanup and some explaining comments would be
nice ;)

Thomas.                 

-- 
only dead fish swim with the stream: http://thomaskeller.biz/blog
Am Anfang war das Wort: http://www.schäuble-muss-weg.de

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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