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

Re: Script help for docs

From: Simon Large <simon.tortoisesvn_at_googlemail.com>
Date: Wed, 30 Jun 2010 00:25:20 +0100

On 29 June 2010 20:30, Kevin Grover <kevin_at_kevingrover.net> wrote:
> Here's a version in Python.  It's pretty crude, but it ran:

Hi Kevin,

Works great on my machine here. A few comments below:

> H:\dl\src\tsvn-trunk>python chkidd.py doc\source\en
> src\Resources\TortoiseProcENG.rc src\Resources\TortoiseMergeENG.rc

I don't believe we need to check multiple RC files in this instance,
although that is just a matter of calling with only one RC.
TortoiseProcENG.rc relates only to the TortoiseSVN xml set, and
TortoiseMergeENG.rc relates only to the TortoiseMerge xml set, so I
would call the script once for each set.

> # IDDs not found in XML files for src\Resources\TortoiseProcENG.rc
> src\Resources\TortoiseProcENG.rc:1571:0: IDDS_AUTOTEXTTESTDLG

Trivial print bug, that should read IDD_AUTO... corrected in attached file.

> the command line I used assumed the python files are in the root directory
> (of the checked out trunk), but you can run if from anywhere as long as the
> python path is correct.
>
> I tried to run it on some of the other RC files (not in the Resources
> directory) and got errors: they were NOT UTF-16.  I can make the script
> smarter about picking an encoding, but I did not know how to do that off the
> top of my head, so I skipped it.

All our RC files are UTF-16 now because of international chars.

> The fileutil.py is from something else I did a while ago, over half of it is
> not really needed for this application.
>
> If this is close to what you want, feel free to let me know what you'd like
> changed and I'll update it -- I'll also clean it up and prehaps add some
> better error checking.

I added the trivial extension to check the other way for orphan
HIDD_refs which no longer exist in the .RC file, as mentioned in the
TODO at the top. Also in the attachment.

> Feel free to included it in in your repository.

Are you OK with it being GPL, including your credit of course?

> Stupid Assumptions:
> * writen for python 2.5.2 (should work on 2.6.x)

Works for me :-) I'm still using Python 2.5.1.

> * only looks for *.xml files

That is fine for this purpose.

> * Does not try to figure out context (comments) for RCFiles or XML Files
> when look for IDs

I don't think that matters here. We don't generally comment things out.

> * Minimal error checking

It is a developers tool, used in a very restricted way so I don't
think it needs to be fully user-proof. I may even wrap it in a .bat
file to make sure it gets called with the right paths.

> * Needs to be cleaned up and documented

That would be great. Thanks.

Simon

-- 
:       ___
:  oo  // \\      "De Chelonian Mobile"
: (_,\/ \_/ \     TortoiseSVN
:   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
:   /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2627513
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].

Received on 2010-06-30 01:25:31 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.