17 messages in com.perforce.perforce-user[p4] Preventing case-sensitivity mess...
FromSent OnAttachments
Noel Llopis24 Dec 2003 04:29 
Noel Yap24 Dec 2003 04:50 
Oren Shemesh24 Dec 2003 05:15 
jab24 Dec 2003 07:03 
Noel Llopis24 Dec 2003 10:51 
Noel Yap24 Dec 2003 12:37 
Chuck Karish24 Dec 2003 13:16 
Noel Llopis24 Dec 2003 13:27 
Noel Yap24 Dec 2003 13:36 
Noel Yap24 Dec 2003 13:51 
Chuck Karish26 Dec 2003 08:24 
Arnt Gulbrandsen30 Dec 2003 02:48 
Alen Ladavac30 Dec 2003 03:22 
Grills, Jeff30 Dec 2003 16:48 
Stephen Ng31 Dec 2003 05:18.py
jab31 Dec 2003 06:46 
Stephen Ng31 Dec 2003 09:55 
Subject:[p4] Preventing case-sensitivity mess with Windows clients
From:Stephen Ng (step@lumigent.com)
Date:12/31/2003 09:55:40 AM
List:com.perforce.perforce-user

Jab,

You raise a very good point.

The first version of this script was *much* slower--it did several "p4 files" per submitted file (one for each of the ancestor directories that the submitted file lived in). A largish (3000 files) branch took many hours.

The version I sent out caches the directory names in memory (for the duration of the changelist). Since large changelists usually involve files which are in the same directories, this can be a significant speedup.

With this change, the 3000 file changelist that took hours before now takes about 30 seconds. Of course, YMMV.

I had considered storing the cache of directory names on the disk (so that they would persist in between changelists), but caching them in memory seemed simpler, safer, and fast enough.

I welcome any sugggestions for speed-ups or refinements to the script!

--Steve

-----Original Message----- From: jab [mailto:jab at pobox.com] Sent: Wednesday, December 31, 2003 9:47 AM To: Stephen Ng Cc: perforce-user at perforce.com Subject: Re: [p4] Preventing case-sensitivity mess with Windows clients

That's a very useful one.

I would caution anyone reading this thread to be careful about imitating this Python program (or worse, the one I wrote on this topic - in the triggers examples on the Perforce web site). If you want to use these, make *very* sure that you pay attention to the places where your trigger runs "p4" commands because they could generate a fair bit of overhead while running the triggers. For a small installation, this might be a non-issue; for a larger installation, you might need to make a cache of filenames in /tmp on the server machine, updated every N hours, that's used for reference instead of a live "p4 files" invocation.

This python script also reminds me to update those examples. Steve's written the code in a far more readable way than I did! :-)

-jab

On Dec 31, 2003, at 5:19 AM, Stephen Ng wrote:

I wrote a python program to check for case consistency; if you want to try it out it's attached to this message.

--Steve <CheckC.py>