[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: 'make check' with packing

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Thu, 1 Jan 2009 13:55:10 +0200 (Jerusalem Standard Time)

Good morning Arfrever,

I agree with most of your comments, except these two:

Arfrever Frehtes Taifersar Arahesis wrote on Thu, 1 Jan 2009 at 07:21 +0100:
> 2008-12-31 23:09:03 Daniel Shahaf napisaƂ(a):
> > + # read it
> > + format_file_path = get_fsfs_format_file_path(path)
> > + contents = file_read(format_file_path, 'rb')
> > +
> > + # tweak it
> > + new_contents = "".join([transform_line(line) + "\n"
> > + for line in contents.split("\n")])
>
> You could use contents.splitlines() instead of contents.split("\n").
>

No, because I don't want to split on '\r', since it isn't allowed in the
format file.

> > + # post-commit hooks, which would override this one. :-(
> > + if fsfs_packing:
> > + create_python_hook_script(get_post_commit_hook_path(path),
> > + "import subprocess\n"
> > + "import sys\n"
> > + "command = %s\n"
> > + "sys.stderr.write('Running %%s' %% `command`)\n"
>
> "sys.stderr.write('Running %%s' %% repr(command))\n"
> (`` has been removed in Python 3.)
>

Agreed, and you'll see that I use repr() elsewhere. But here I used ``
because I intended to remove this line before committing.

>
>

The others I'll fix; thanks for pointing them out.

Daniel

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=998350
Received on 2009-01-01 13:24:13 CET

This is an archived mail posted to the Subversion Dev mailing list.