
RCS file: RCS/tren.py,v
Working file: tren.py
head: 1.239
branch:
locks: strict
	tundra: 1.239
access list:
symbolic names:
keyword substitution: kv
total revisions: 140;	selected revisions: 140
description:
Part Of The 'tren' Project
----------------------------
revision 1.239	locked by: tundra;
date: 2010/10/07 17:34:23;  author: tundra;  state: Exp;  lines: +2 -2
Minor comment cleanup.
----------------------------
revision 1.238
date: 2010/09/07 18:24:18;  author: tundra;  state: Exp;  lines: +11 -11
Changed how slice parsing takes place to allow constructs like -T3:-4 to work.
----------------------------
revision 1.237
date: 2010/08/30 02:06:42;  author: tundra;  state: Exp;  lines: +7 -5
Fixed bug in case-insensitive replacement introduced by last checkin.
----------------------------
revision 1.236
date: 2010/08/30 01:52:23;  author: tundra;  state: Exp;  lines: +17 -17
Fixed bugs introduced by -T logic.  This removed the 'name' variable from ProcessRenameRequests().
----------------------------
revision 1.235
date: 2010/08/27 17:08:01;  author: tundra;  state: Exp;  lines: +2 -2
Minor comment change.
----------------------------
revision 1.234
date: 2010/08/27 16:13:01;  author: tundra;  state: Exp;  lines: +2 -2
BUGFIX: Backups were being incorrectly named and created.
----------------------------
revision 1.233
date: 2010/08/27 15:39:21;  author: tundra;  state: Exp;  lines: +2 -3
Fixed oldname intialization bug introduced during -T implementation.
----------------------------
revision 1.232
date: 2010/08/27 15:28:55;  author: tundra;  state: Exp;  lines: +32 -23
Finished implementing -T option.
----------------------------
revision 1.231
date: 2010/08/26 18:50:09;  author: tundra;  state: Exp;  lines: +128 -45
First cut at renaming target substring selection (-T).  Still incomplete.
----------------------------
revision 1.230
date: 2010/08/25 20:16:17;  author: tundra;  state: Exp;  lines: +2 -2
Added -e to command line string template in usage output.
----------------------------
revision 1.229
date: 2010/08/25 20:14:14;  author: tundra;  state: Exp;  lines: +21 -7
Implemented /NAMESOFAR/ renaming token.
----------------------------
revision 1.228
date: 2010/08/25 19:47:35;  author: tundra;  state: Exp;  lines: +11 -2
Fixed problem wherein nonexistent files or wildcards named as rename targets would be silently ignored.
----------------------------
revision 1.227
date: 2010/08/25 19:26:25;  author: tundra;  state: Exp;  lines: +2 -6
Fixed misleading comment.
----------------------------
revision 1.226
date: 2010/08/25 18:54:38;  author: tundra;  state: Exp;  lines: +14 -1
Implemented debug support for showing the sequence of renaming steps.
----------------------------
revision 1.225
date: 2010/08/25 18:08:41;  author: tundra;  state: Exp;  lines: +2 -1
Sorted list of case conversion options displayed when user enters one that is invalid.
----------------------------
revision 1.224
date: 2010/08/25 18:04:39;  author: tundra;  state: Exp;  lines: +106 -86
Finished implementing case conversion renaming request support.
----------------------------
revision 1.223
date: 2010/08/20 01:18:23;  author: tundra;  state: Exp;  lines: +26 -2
Added support for case conversion function dispatch table and command validation of such requests.
----------------------------
revision 1.222
date: 2010/08/19 19:22:04;  author: tundra;  state: Exp;  lines: +12 -2
Put in basic scaffolding for forced case conversions.
----------------------------
revision 1.221
date: 2010/08/12 02:58:08;  author: tundra;  state: Exp;  lines: +2 -2
Removed trailing period from renaming information message.
----------------------------
revision 1.220
date: 2010/08/10 14:36:25;  author: tundra;  state: Exp;  lines: +2 -2
Fixed $TREN parsing to use shlex.split instead of splitting on spaces.
----------------------------
revision 1.219
date: 2010/08/10 13:27:02;  author: tundra;  state: Exp;  lines: +3 -2
Fixed bug in include file processing - line is now parsed with shlex.split().
----------------------------
revision 1.218
date: 2010/06/25 22:39:46;  author: tundra;  state: Exp;  lines: +65 -6
Implemented TRENINCL path search support for include files.
----------------------------
revision 1.217
date: 2010/04/07 18:36:55;  author: tundra;  state: Exp;  lines: +6 -6
Ordered alphabet entries by name.
Mac/Win fix so that backup files would not be saved under new name when only change was character case.
Fixed SRT parsing so it properly distinguishes between a bad token name and a bad alphabet name.
----------------------------
revision 1.216
date: 2010/04/05 20:35:28;  author: tundra;  state: Exp;  lines: +3 -3
Minor change to alphabet error messages.
----------------------------
revision 1.215
date: 2010/04/02 19:43:56;  author: tundra;  state: Exp;  lines: +3 -3
Minor cleanup.
----------------------------
revision 1.214
date: 2010/03/30 21:02:35;  author: tundra;  state: Exp;  lines: +21 -23
Corrected ComputeSeqString() to properly count and roll over no matter whether fmt or incr is longer.
ComputeSeqString() now also properly preserves out-of-alphabet characters in the fmt string unless a carry propagates into that position.
Reorganized ComputeSeqString() slightly.
----------------------------
revision 1.213
date: 2010/03/29 20:37:26;  author: tundra;  state: Exp;  lines: +8 -1
Fixed bug that crashed program if specified environment variable did not exist.
----------------------------
revision 1.212
date: 2010/03/28 19:52:04;  author: tundra;  state: Exp;  lines: +24 -10
Implemented -b option to suppress backups during forced renaming.
----------------------------
revision 1.211
date: 2010/03/23 21:15:55;  author: tundra;  state: Exp;  lines: +5 -1
Added Binary alphabet.
----------------------------
revision 1.210
date: 2010/03/23 19:33:57;  author: tundra;  state: Exp;  lines: +2 -2
Update to usage information.
----------------------------
revision 1.209
date: 2010/03/23 18:50:10;  author: tundra;  state: Exp;  lines: +2 -2
Updated the help screen.
----------------------------
revision 1.208
date: 2010/03/23 17:53:29;  author: tundra;  state: Exp;  lines: +16 -4
Corrected test mode so it properly tracks existing and newly created files as they would occur.
----------------------------
revision 1.207
date: 2010/03/19 17:50:22;  author: tundra;  state: Exp;  lines: +10 -12
Applied glob expansion of targets to all OSs.
----------------------------
revision 1.206
date: 2010/03/19 16:25:57;  author: tundra;  state: Exp;  lines: +3 -3
Minor change to usage information.
----------------------------
revision 1.205
date: 2010/03/19 02:57:35;  author: tundra;  state: Exp;  lines: +8 -2
Fixed trailing separator bug in pathname that made Windows report differently on root directory file renames.
----------------------------
revision 1.204
date: 2010/03/19 02:07:02;  author: tundra;  state: Exp;  lines: +77 -16
Implemented remainder of win32all support.
----------------------------
revision 1.203
date: 2010/03/19 00:59:27;  author: tundra;  state: Exp;  lines: +2 -2
Minor cleanup to usage infrormation.
----------------------------
revision 1.202
date: 2010/03/18 23:41:46;  author: tundra;  state: Exp;  lines: +22 -21
Abstracted out the strings returned for /USER/ and /GROUP/ on Windows systems when win32all not present.
Cleaned up eTOKUNKNOWN to make it more consistent with other, similar messages(s).
----------------------------
revision 1.201
date: 2010/03/18 21:54:30;  author: tundra;  state: Exp;  lines: +90 -7
Put in basic framework for handling user- and group names for both Posix and Windows systems.
Added logic for Windows to do glob expansion of the command line file argument list.
----------------------------
revision 1.200
date: 2010/03/18 17:40:31;  author: tundra;  state: Exp;  lines: +15 -3
Added *WDAY file time renaming tokens.
----------------------------
revision 1.199
date: 2010/03/18 16:09:06;  author: tundra;  state: Exp;  lines: +6 -7
Tightened up use of FILETIMETOKS when computing nDATE orders in __init__().
----------------------------
revision 1.198
date: 2010/03/17 21:12:05;  author: tundra;  state: Exp;  lines: +116 -22
Implemented ADATE, CDATE, and MDATE sequence renaming token support.
----------------------------
revision 1.197
date: 2010/03/17 15:16:48;  author: tundra;  state: Exp;  lines: +35 -18
Implemented sort views, ORDERBYGROUP and ORDERBYUSER.
----------------------------
revision 1.196
date: 2010/03/16 21:28:12;  author: tundra;  state: Exp;  lines: +11 -12
Got rid of TOKFILALPHA and SORTBYALPHA.  Replaced with SORTBYFNAME to make file- and sequence renaming token names consistent.
----------------------------
revision 1.195
date: 2010/03/16 21:00:20;  author: tundra;  state: Exp;  lines: +3 -3
Fixed bug that caused pathname to be improperly calculated when the the constructure first populated RenameTargets classes.
----------------------------
revision 1.194
date: 2010/03/16 20:43:04;  author: tundra;  state: Exp;  lines: +25 -3
Implemented command line alphabet loading, -A option.
----------------------------
revision 1.193
date: 2010/03/15 16:47:42;  author: tundra;  state: Exp;  lines: +16 -14
Cleaned up renaming token error messages and fixed bug that happened on null format fields.
----------------------------
revision 1.192
date: 2010/03/13 20:57:13;  author: tundra;  state: Exp;  lines: +3 -3
Changed HEXLOWER and HEXUPPER strings to follow naming conventions of other alphabets.
----------------------------
revision 1.191
date: 2010/03/13 20:53:25;  author: tundra;  state: Exp;  lines: +62 -38
Retooled Sequence renaming token parsing to require an alphabet specification.
----------------------------
revision 1.190
date: 2010/03/13 19:59:52;  author: tundra;  state: Exp;  lines: +59 -15
Created dictionary of built-in alphabets and the supporting literals to access it.
Changed DumpList() so it does not require to caller to provide a message handler - it's only used for debug output anyway.
----------------------------
revision 1.189
date: 2010/03/12 22:19:29;  author: tundra;  state: Exp;  lines: +23 -6
Further cleanup of sequence generation.
Changed rollover warning to a InfoMsg() call.
----------------------------
revision 1.188
date: 2010/03/12 03:04:12;  author: tundra;  state: Exp;  lines: +102 -3
First cut at a working formatting system for Sequence renaming tokens.  Currently hardwared to count in base 10.
----------------------------
revision 1.187
date: 2010/03/11 03:22:09;  author: tundra;  state: Exp;  lines: +6 -2
Fixed bug caused by updating self.NewNames when not in test mode.
----------------------------
revision 1.186
date: 2010/03/11 02:49:28;  author: tundra;  state: Exp;  lines: +55 -12
Implemented -a interactive ask mode.
----------------------------
revision 1.185
date: 2010/03/10 23:37:27;  author: tundra;  state: Exp;  lines: +11 -3
Fixed bug that allowed the RAND precision specification to be one character too long.
Fixed testmode so that it now properly reports any backup renamings the program *would* do even when the filenames are newly generated by the program itself.
----------------------------
revision 1.184
date: 2010/03/10 22:18:20;  author: tundra;  state: Exp;  lines: +26 -1
Implemented the /RAND/ replacement token.
----------------------------
revision 1.183
date: 2010/03/10 19:09:13;  author: tundra;  state: Exp;  lines: +6 -5
Fixed bug that cause the program to ignore iterated changes to the original name.
----------------------------
revision 1.182
date: 2010/03/10 18:29:25;  author: tundra;  state: Exp;  lines: +32 -4
Implemented basic sequence replacement tokens and their reverses, but without formatting field support.
----------------------------
revision 1.181
date: 2010/03/10 01:02:07;  author: tundra;  state: Exp;  lines: +5 -5
Slight code reorganization.
----------------------------
revision 1.180
date: 2010/03/10 00:50:14;  author: tundra;  state: Exp;  lines: +61 -25
Restructured the literals so that both the File Attribute and Sequence renaming tokens use same strings where they are common.
This is also going to be used to index into self.SortViews when doing sequence lookups.
Added code to catch the (illegal) situation where a user tries to rename the root of the file tree.
Made the rest of the 'stat' variables available as File Attribute renaming tokens.
----------------------------
revision 1.179
date: 2010/03/09 23:01:57;  author: tundra;  state: Exp;  lines: +2 -2
Fixed typo that broke renaming token handling.
----------------------------
revision 1.178
date: 2010/03/09 22:56:36;  author: tundra;  state: Exp;  lines: +65 -68
Factored the Tile Time renaming token processing code and made it table drive.
Setup scaffolding for Sequence renaming token handling.
----------------------------
revision 1.177
date: 2010/03/09 01:17:57;  author: tundra;  state: Exp;  lines: +8 -8
Fixed bug in literal constants for mtime renaming tokens.
----------------------------
revision 1.176
date: 2010/03/09 01:12:16;  author: tundra;  state: Exp;  lines: +112 -19
Redid existing Time Renaming Tokens and implemented all the remaining ones.
----------------------------
revision 1.175
date: 2010/03/08 21:02:35;  author: tundra;  state: Exp;  lines: +22 -2
Implemented CDATE renaming token.
----------------------------
revision 1.174
date: 2010/03/08 19:29:52;  author: tundra;  state: Exp;  lines: +27 -14
Fixed bug in Command Execution token processing that prevented the use of absolute path references.
----------------------------
revision 1.173
date: 2010/03/08 16:41:23;  author: tundra;  state: Exp;  lines: +95 -54
Changed renaming templates: g -> GID, G -> GNAME, L -> LEN, F -> FNAME, u -> UID, U -> UNAME.
Upped MAXINCLUDES to 1000.
Cleaned up Usage() output.
Removed extraneous "]' option that was previously accepted by getopt() as legal.
Factored out the getopt() string as a literal at the top of the program.
Fixed bug in ProcessIncludes() so include symbol ignored if in context of a previous option argument.
----------------------------
revision 1.172
date: 2010/03/06 16:26:17;  author: tundra;  state: Exp;  lines: +21 -3
Implmenented UID, Uname, GID, and Gname renaming tokens.
----------------------------
revision 1.171
date: 2010/03/06 15:57:21;  author: tundra;  state: Exp;  lines: +8 -3
Implemented File Length renaming token.
----------------------------
revision 1.170
date: 2010/03/06 01:38:28;  author: tundra;  state: Exp;  lines: +19 -3
Implemented Filename renaming token.
----------------------------
revision 1.169
date: 2010/03/06 01:31:07;  author: tundra;  state: Exp;  lines: +8 -8
Slight error message cleanup.
----------------------------
revision 1.168
date: 2010/03/06 01:25:46;  author: tundra;  state: Exp;  lines: +9 -3
Implemented logic to catch unknown renaming token types.
Slight edits to token-related error messages.
----------------------------
revision 1.167
date: 2010/03/06 01:18:02;  author: tundra;  state: Exp;  lines: +38 -4
Implemented /`cmd`/ command execution renaming tokens.
----------------------------
revision 1.166
date: 2010/03/05 21:54:36;  author: tundra;  state: Exp;  lines: +27 -3
Implemented actual renaming token substitution logic.
Implemented /$ENVVAR/ renaming token support.
----------------------------
revision 1.165
date: 2010/03/05 19:05:23;  author: tundra;  state: Exp;  lines: +43 -5
Added code to __ResolveRenameTokens() to detect renaming tokens in a string, determine their contents, and flag missing delimiters.
----------------------------
revision 1.164
date: 2010/02/27 00:31:57;  author: tundra;  state: Exp;  lines: +11 -7
Cosmetic cleanup in preparation for rename token processing.
Changed regex processing to use match.span() rather than match.start() and match.end().
----------------------------
revision 1.163
date: 2010/02/26 20:11:29;  author: tundra;  state: Exp;  lines: +16 -31
Consolidated all test mode reporting down into __RenameIt() so that -t will also show any required backup operations.
----------------------------
revision 1.162
date: 2010/02/26 18:56:41;  author: tundra;  state: Exp;  lines: +22 -11
Fixed a bug that occured when multiple renames iterated over the same filename.
----------------------------
revision 1.161
date: 2010/02/26 18:15:15;  author: tundra;  state: Exp;  lines: +67 -40
First cut at regex-based matching.
-E option removed.  All ErrorMsg calls terminate program immediately now.
----------------------------
revision 1.160
date: 2010/02/26 06:40:00;  author: tundra;  state: Exp;  lines: +21 -5
Added more bounds checking for individual replacement instance values.
----------------------------
revision 1.159
date: 2010/02/26 00:24:54;  author: tundra;  state: Exp;  lines: +16 -6
Changed renaming logic to only rename the instances specified on the command line via -i.
----------------------------
revision 1.158
date: 2010/02/26 00:08:44;  author: tundra;  state: Exp;  lines: +98 -39
Changed -i parsing logic to look for python-style indexes or slice ranges.
----------------------------
revision 1.157
date: 2010/02/25 20:04:39;  author: tundra;  state: Exp;  lines: +31 -17
Began implementing new logic for selecting replacement "instances".
This means -G and -g are no longer necessary.
----------------------------
revision 1.156
date: 2010/02/24 00:00:35;  author: tundra;  state: Exp;  lines: +9 -38
Changed Rename() to ProcessRenameRequests().
Got rid of the whole name/ext/all target paradigm, thereby eliminating -a, -b, -e, and -L options.
----------------------------
revision 1.155
date: 2010/02/18 00:49:45;  author: tundra;  state: Exp;  lines: +25 -18
Simplified test mode reporting to only show top level renames and not any consequence backups or skips.
Implemented live file renaming.
----------------------------
revision 1.154
date: 2010/02/17 22:07:53;  author: tundra;  state: Exp;  lines: +60 -74
Moved checks for existing targets from Rename() to RenameIt().
Made check for existing target recursive so existing backups would get backed up.
Implemented min/max new filename length enforcement.
Restructured Rename() so it didn't have to iterate twice over the work queue.
----------------------------
revision 1.153
date: 2010/02/17 20:07:53;  author: tundra;  state: Exp;  lines: +113 -78
Began restructuring Rename() and added a new supporting RenameIt() method.
----------------------------
revision 1.152
date: 2010/02/17 16:31:35;  author: tundra;  state: Exp;  lines: +17 -14
Added -P option to allow user to specify their own escape character.
----------------------------
revision 1.151
date: 2010/02/12 18:29:38;  author: tundra;  state: Exp;  lines: +54 -22
Cleaned up and added more forced renaming logic.
Changed -l to -L.
Added framework for -P, to change the default escape string.
Added check to disallow an null string as an argument to -L, -P, -R, and -S.
----------------------------
revision 1.150
date: 2010/02/05 21:35:47;  author: tundra;  state: Exp;  lines: +11 -13
More cosmetic cleanup.
----------------------------
revision 1.149
date: 2010/02/05 21:25:31;  author: tundra;  state: Exp;  lines: +2 -3
Changed -v so it dumps and *continues* - this allows its output to be included in a rename output log.
----------------------------
revision 1.148
date: 2010/02/05 21:22:44;  author: tundra;  state: Exp;  lines: +7 -4
Minor cosmetic cleanup.
----------------------------
revision 1.147
date: 2010/02/05 21:13:07;  author: tundra;  state: Exp;  lines: +78 -27
Added logic for dumping test output.
Added InfoMsg().
Began implementing logic for forced renaming of existing targets.
Added -S option to override forced renaming suffix.
----------------------------
revision 1.146
date: 2010/02/05 19:20:25;  author: tundra;  state: Exp;  lines: +37 -22
Modified ErrorMsg to accept and optional EXIT argument.  This gets rid of most of the sys.exit(1)s that littered the code.
Added length constraint checks to newly calculated file/dir names.
----------------------------
revision 1.145
date: 2010/02/05 18:05:53;  author: tundra;  state: Exp;  lines: +85 -52
Rewrote ProcessIncludes() to properly detect all legal forms of the include option on the command line.
----------------------------
revision 1.144
date: 2010/02/05 05:42:45;  author: tundra;  state: Exp;  lines: +27 -28
Cleaned up renaming logic to handle old and new stings that contain spaces.
Fixed problem with debug option not being properly detected in all cases.
----------------------------
revision 1.143
date: 2010/02/05 03:48:17;  author: tundra;  state: Exp;  lines: +15 -20
Cleaned up the rename code further when handling -r =something.
----------------------------
revision 1.142
date: 2010/02/05 03:00:24;  author: tundra;  state: Exp;  lines: +26 -9
Added code to observe reqested case sensitivity when renaming.
Added code to handle the case when the old replacement string is null.
----------------------------
revision 1.141
date: 2010/02/04 19:55:27;  author: tundra;  state: Exp;  lines: +24 -6
Retooled the renaming algorithm in preparation for adding case-insensitivity.
----------------------------
revision 1.140
date: 2010/02/03 23:56:38;  author: tundra;  state: Exp;  lines: +6 -5
Fixed rename logic to only affect the filename portion of the fully qualified pathname string.
----------------------------
revision 1.139
date: 2010/02/03 23:43:20;  author: tundra;  state: Exp;  lines: +71 -10
Built basic scaffolding for renaming files.
Changed -1 option to -G.
Implemented support for -G, -g.
----------------------------
revision 1.138
date: 2010/02/03 01:04:08;  author: tundra;  state: Exp;  lines: +13 -6
Modified the contents of ORDERBYCMDLINE and ORDERBYALPHA to use fully qualified filenames.
----------------------------
revision 1.137
date: 2010/02/02 23:20:01;  author: tundra;  state: Exp;  lines: +175 -145
Retooled the way RenameTargets is structured and populated.
Added a separate method to dump RenameTargets for debugging.
Cleaned up bug in ProcessIncludes() that occurred in you included another include without trailing whitespace (-Ix).
Added EXTDELIM, MAXLINELEN, & RENSEP to the ProgramOptions table (like the other options), and adjusted code thoughout to reflect this.
----------------------------
revision 1.136
date: 2010/02/02 18:31:42;  author: tundra;  state: Exp;  lines: +89 -48
Restructured RenRequests to be a single dictionary that now lives in the RenameTargets class.
The old and new strings now appear in the RenRequests dictionary with keys "OLD" and "NEW" respectively.
Defined symbolic constants for accessing state and old, new strings rather than embedding literal strings all over the code.
----------------------------
revision 1.135
date: 2010/02/02 17:53:55;  author: tundra;  state: Exp;  lines: +2 -2
Changed TGTSEQFLG to a null string so it doesn't show up in debug output.
----------------------------
revision 1.134
date: 2010/02/02 17:49:53;  author: tundra;  state: Exp;  lines: +4 -4
More cleanup of debug output for command line and environment info.
----------------------------
revision 1.133
date: 2010/02/02 17:41:21;  author: tundra;  state: Exp;  lines: +55 -98
Repackaged program options into the ProgramOptions dictionary instead of being separate global variables.
Cleaned up dump output and integrated the work previously done in DumpRenameObj() into the constructor of the object itself.
----------------------------
revision 1.132
date: 2010/02/01 23:08:22;  author: tundra;  state: Exp;  lines: +45 -4
Implemented GetOldNew to properly parse a -r old=new arg, honoring RENSEP.
----------------------------
revision 1.131
date: 2010/01/30 22:10:13;  author: tundra;  state: Exp;  lines: +15 -8
Slight code cleanup and abstraction.
Added -R option.
----------------------------
revision 1.130
date: 2010/01/30 20:04:58;  author: tundra;  state: Exp;  lines: +5 -3
Changed how environment variable and homepage strings are calculated.
----------------------------
revision 1.129
date: 2010/01/30 20:00:40;  author: tundra;  state: Exp;  lines: +6 -3
Cleaned up Usage() copyright info and added homepage information.
----------------------------
revision 1.128
date: 2010/01/30 19:48:27;  author: tundra;  state: Exp;  lines: +2 -2
Minor edit to copyright message.
----------------------------
revision 1.127
date: 2010/01/30 19:41:15;  author: tundra;  state: Exp;  lines: +9 -3
Fixed problem when user specified -I without a space before the filename following as in -Ifile.
----------------------------
revision 1.126
date: 2010/01/30 19:13:04;  author: tundra;  state: Exp;  lines: +2 -2
Minor cosmetic change to Usage() output.
----------------------------
revision 1.125
date: 2010/01/30 18:43:36;  author: tundra;  state: Exp;  lines: +7 -6
Added program version info to DumpState() output.
General DumpState() cleanup.
----------------------------
revision 1.124
date: 2010/01/30 18:27:51;  author: tundra;  state: Exp;  lines: +3 -2
Fixed minor typo in Usage().
Added MAXLINELEN to DumpState() output.
----------------------------
revision 1.123
date: 2010/01/30 18:20:44;  author: tundra;  state: Exp;  lines: +106 -137
Catch os.stat() attempts on nonexistent files.
Removed program version number from error and debug output lines.
Added -w to allow user to set length of diagnostic output and reorganized code as needed to do this everywhere.
Removed pair-target command line processing and went back to the standard CLI semantics.
----------------------------
revision 1.122
date: 2010/01/29 21:18:35;  author: tundra;  state: Exp;  lines: +20 -13
Further slight restructuring of renaming request code.
----------------------------
revision 1.121
date: 2010/01/29 21:07:17;  author: tundra;  state: Exp;  lines: +43 -12
Factored out a common routine, DumpList(), for dumping any list, using any output handler.
Setup the basic structure for parsing renaming requests.
----------------------------
revision 1.120
date: 2010/01/29 18:52:29;  author: tundra;  state: Exp;  lines: +5 -1
Added deletion of unneeded objects at the end of RenameTargets.__init__()
----------------------------
revision 1.119
date: 2010/01/29 18:32:04;  author: tundra;  state: Exp;  lines: +63 -21
Added remainder of os.stat() info to RenameTargets for potential sequence renaming token use.
Added alpha-order of command line rename targets for potential sequence renaming token use.
----------------------------
revision 1.118
date: 2010/01/29 00:17:13;  author: tundra;  state: Exp;  lines: +26 -3
More factoring of RenameTargets sequence generations.
Added atime and mtime to tracked sequences.
----------------------------
revision 1.117
date: 2010/01/28 23:50:25;  author: tundra;  state: Exp;  lines: +39 -55
Factored and cleaned up sequence building logic in RenameTargets.
Cleaned up DumpRenameObj() accordingly.
----------------------------
revision 1.116
date: 2010/01/28 22:55:52;  author: tundra;  state: Exp;  lines: +61 -27
Added code to sort entries alphabetically if more than one has same ctime or size.
Added code to store ascending and descending sequence numbers by ctime and size for each rename target.
----------------------------
revision 1.115
date: 2010/01/27 23:32:30;  author: tundra;  state: Exp;  lines: +33 -18
Fixed sequence list construction to preserve all files that share idential ctimes/sizes.
Further cleanup of DumpRenameObj().
Make sure to only construct/delete a RenameTarget object if there are actual arguments to process.
----------------------------
revision 1.114
date: 2010/01/27 18:04:55;  author: tundra;  state: Exp;  lines: +25 -1
Added logic to dump sequence information from rename objects.
----------------------------
revision 1.113
date: 2010/01/27 17:34:57;  author: tundra;  state: Exp;  lines: +48 -6
Added logic to more cleanly handle long error and debug messages.
----------------------------
revision 1.112
date: 2010/01/26 23:02:40;  author: tundra;  state: Exp;  lines: +87 -3
Began constructing the renaming targets object and associated debug support.
----------------------------
revision 1.111
date: 2010/01/26 01:23:14;  author: tundra;  state: Exp;  lines: +2 -4
Got rid of superfluous DumpState() at end of option parsing.
----------------------------
revision 1.110
date: 2010/01/26 01:15:08;  author: tundra;  state: Exp;  lines: +125 -85
Reintroduced ability to get debug dump as often as we like with multiple command line '-d's.
Reorganized and cleaned up the code and debugging logic.
----------------------------
revision 1.109
date: 2010/01/25 23:23:30;  author: tundra;  state: Exp;  lines: +40 -14
Cleanup of debug structure and logic.
----------------------------
revision 1.108
date: 2010/01/25 22:21:26;  author: tundra;  state: Exp;  lines: +93 -49
Added logic to subdivide command line into "opts... targets..." pairs.
----------------------------
revision 1.107
date: 2010/01/23 01:12:16;  author: tundra;  state: Exp;  lines: +6 -7
Provided more detailed reporting of command line getopt errors.
Harmonized the -I missing argument error with the above.
----------------------------
revision 1.106
date: 2010/01/23 01:00:00;  author: tundra;  state: Exp;  lines: +5 -2
Added code to handle comments in include files.
----------------------------
revision 1.105
date: 2010/01/23 00:38:55;  author: tundra;  state: Exp;  lines: +14 -2
Limited number of includes to 50 to catch circular references.
----------------------------
revision 1.104
date: 2010/01/22 20:33:06;  author: tundra;  state: Exp;  lines: +74 -18
Changed -F to -I.
Implemented $TREN handling.
Implemented -I include processing.
Added command line and environment diagnostic output to DumpState().
----------------------------
revision 1.103
date: 2010/01/22 00:58:04;  author: tundra;  state: Exp;  lines: +18 -18
Added -d to getopts list.
Added command line parsing and toggle/option processing.
----------------------------
revision 1.102
date: 2010/01/22 00:41:23;  author: tundra;  state: Exp;  lines: +159 -15
Added state variables/toggles.
Implemented PrintStderr() and PrintStdout() for all printing operations.
Changed Usage() and ErrorMsg() to use these printing primitives instead of 'print'.
Added dDEBUG, ColumnPad(), DebugMsg(), DumpState(), and the -d flag.
----------------------------
revision 1.101
date: 2010/01/14 22:30:06;  author: tundra;  state: Exp;  lines: +3 -17
Fixed minor bugs from template used to create skeleton code.
Removed references to tconfpy and config file parsing.
----------------------------
revision 1.100
date: 2010/01/14 18:24:02;  author: tundra;  state: Exp;
Initial Version
----------------------------
=============================================================================
