-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: p4-plugin
-
Labels:None
-
Environment:Linux 2.6.18-128.el5xen #1 SMP Wed Dec 17 12:22:24 EST 2008 i686 i686 i386 GNU/Linux
-
Similar Issues:
I am getting a form validation error for my Perforce view when configuring my jobs. I have the following for my view:
//Tuxedo/MAIN/Product/Fast_Forward/pom.xml //qaadmin_rocdevl3_hudson-core/pom.xml
//Tuxedo/MAIN/Product/Fast_Forward/Core/Source/... //qaadmin_rocdevl3_hudson-core/Core/Source/...
//Tuxedo/MAIN/Product/Fast_Forward/Core/pom.xml //qaadmin_rocdevl3_hudson-core/Core/pom.xml
and I get the following error:
Invalid mapping://Tuxedo/MAIN/Product/Fast_Forward/pom.xml //qaadmin_rocdevl3_hudson-core/pom.xml
However, the job seems to work just fine. In looking at the source code package hudson.plugins.perforce, I see the following string pattern which seems to be used for this validation:
^([+-]?//\\S+?/\\S+)\\s+//\\S+?(/
S+)$
This seems to match that first line of my mapping. I checked for non-whitespace characters at the end of my line, and there do not appear to be any.
I am using the latest Perforce plugin, as well as the latest Hudson build.
It looks like some browsers use windows-style line endings (\r\n) instead of the unix style (\n). I recently switched to chrome, and my issues went away, but opera and firefox were always giving me those validation errors. I had assumed it was because my mappings were somewhat crazy, but I guess not.
I'll fix the regex so it recognizes those line endings properly.