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

Re: [PATCH] Locking test for non-existent files

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-04-05 15:03:49 CEST

Alexander Thomas wrote:
> + error_msg = "'foo' is not under version control"
> + for line in error:
> + if string.find(line, error_msg) != -1:

Simplify (and avoid a deprecated function):
        if line.find(error_msg) != -1:

> + break
> + else:
> + print "%s not found in: %s" % (error_msg, str(error))

Simplify:
        print error_msg, "not found in:", error

But - eww - don't quote one error message inside another error message without
marking the quote as a quote - e.g. by using quotation marks! Otherwise the
result could come out something like this:

   'foo' is not under version control not found in: ['file not found']

... which would be totally confusing to anyone who is not looking at the test
source code.

But thanks for providing a new test.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 5 15:05:07 2005

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