# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#20 | 23173 | Sven Erik Knop | Fixed one problem - move/add now recognised | ||
#19 | 23167 | Sven Erik Knop |
Fix bug where a keyword argument contained '=' itself. The trigger accepts keyword arguments in the form key=value, for example port=server:1666 In the test case, I am passing in port as "rsh:p4d -r /path/to/root -vserver=3 -i", which gets split into three and not two strings. Fortunately, Python's string.split() has an optional argument limiting the number of splits. |
||
#18 | 19873 | Pascal Soccard | Replaced iteritems() method by compatible Python 3 items() method | ||
#17 | 19872 | Pascal Soccard | Fixed missing tabulations for previous fix | ||
#16 | 19871 | kwirth |
'user' is a reserved argument name in P4Python. Need to use 'mysuser' instead when testing if the current user is 'git-fusion-user'. As 'mysuser' is not a valid P4Python argument need to remove it after test and before other arguments are parsed. |
||
#15 | 15864 | Karl Wirth |
- Incorrect version shelved in update. This version includes Typo fix. |
||
#14 | 15860 | Karl Wirth |
Adding an example of how the 'git-fusion-user' can be excluded from the trigger. @sven_erik_knop |
||
#13 | 12221 | kwirth |
Adding usage example text. Example Usage: CheckCaseTrigger change-submit //... "python CheckCaseTrigger.py %changelist%" Sample output: Submit validation failed -- fix problems then use 'p4 submit -c 1234'. 'CheckCaseTrigger' validation failed: Your submission has been rejected because the following files are inconsistent in their use of case with respect to existing directories Your file: '//depot/dir/test' existing file/dir: '//depot/DIR' |
||
#12 | 8233 | Sven Erik Knop |
CheckCaseTrigger is now safe to be used with Python 3, ... that is, when P4Python 2013.1 comes out. There is currently a bug with charsets that prevents this trigger from working against non-Unicode servers. |
||
#11 | 8179 | Sven Erik Knop |
Added filefilter to the CheckCaseTrigger. A filefilter is added as an additional key on the command line: filefilter=path-to-my-filter-file It should contain valid Perforce depot syntax lines, which are treated as exceptions. Changed files that match any of the lines in the filefilter will be allowed to submit even if they break the case consistency. This is for cases where some files are Unix-specific and need to be able to store two files or directories that only differ by case - as an exception. Also fixed a tabbing problem in the P4Triggers.py file. |
||
#10 | 8178 | Sven Erik Knop |
Filter out move/delete as well as delete from the list of existing files. This solves the problem of a re-add to the deleted file if a differently spelled version is also present in the same directory, but with action "move/delete". Consider the following case: p4 add foo p4 submit -d foo p4 edit foo p4 move foo Foo p4 submit -d renamed p4 delete Foo p4 submit -d deleted p4 add Foo => this would fail because "foo" is present with an action of "move/delete". This is now fixed. |
||
#9 | 8165 | Sven Erik Knop |
Prevent triggering of case rejection if the offending file has been deleted at head revision. |
||
#8 | 8144 | Sven Erik Knop |
Filtering of renames in branches. Now the trigger lets case renames in branches pass, if the corresponding delete is in the same changelist. |
||
#7 | 8142 | Sven Erik Knop | Fixed formatting and missing message output. | ||
#6 | 7900 | Sven Erik Knop |
Bumped up API level to 65 to allow move/add to be correctly recognized and ignored. This opens up the trigger for abuse if someone renames a file to a new unrelated name that already exists in a different case spelling. This requires further investigation. |
||
#5 | 7832 | Sven Erik Knop | Updated CheckCaseTrigger to show the proper exception if parameters are wrong. | ||
#4 | 7379 | Sven Erik Knop |
Added output to a log file. The default is the send output to p4triggers.log in the P4ROOT directory, this can be overridden with the parameter log=<path> Also, errors now cause the trigger to fail with sensible output first. |
||
#3 | 7372 | Sven Erik Knop |
Rollback Rename/move file(s). To folder "perforce" is needed. |
||
#2 | 7370 | Sven Erik Knop | Rename/move file(s) again - this time to the right location inside a perforce directory. | ||
#1 | 7367 | Sven Erik Knop | New locations for the Python triggers. | ||
//guest/sven_erik_knop/perforce/P4Pythonlib/triggers/CheckCaseTrigger.py | |||||
#1 | 7370 | Sven Erik Knop | Rename/move file(s) again - this time to the right location inside a perforce directory. | ||
# | Change | User | Description | Committed | |
#1 | 7367 | Sven Erik Knop | New locations for the Python triggers. | ||
//guest/sven_erik_knop/triggers/CheckCaseTrigger.py | |||||
#3 | 7219 | Sven Erik Knop | First attempt for renamer support, not finished yet, therefore disabled. | ||
#2 | 7218 | Sven Erik Knop |
Updated CheckCaseTrigger.py to fix problems with files within directories. The trigger would not detect case problems for files that are located in subdirectories. Unintentional side effect of modifying the dirs list recursively when checking for mismatched directories. The solution was simple: make a copy of the directory list for the file check. |
||
#1 | 6413 | Sven Erik Knop |
Added some P4Python-based Perforce triggers. P4Triggers.py is the based class for change trigger in Python modelled on Tony Smith's Ruby trigger with the same name. CheckCaseTrigger.py is a trigger that ensures that no-one enters a file or directory with a name only differing by case from an existing file. This trigger is Unicode aware and uses Unicode-comparison of file names, so it can be used on nocase-Unicode based Perforce servers, which cannot catch the difference between, say, "�re" and "�re" at the moment. clienttrigger.py is a simple trigger that modifies the option "normdir" to "rmdir" for new client specs only. It is meant as a template to create more complex default settings like standard views. |