[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-08-06 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-27169 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Charles Chan Path: src/test/java/org/jenkinsci/plugins/patch/SomeTest.java src/test/resources/org/jenkinsci/plugins/patch/.gitattributes src/test/resources/org/jenkinsci/plugins/patch/gitstyle.patch src/test/resources/org/jenkinsci/plugins/patch/unix-gitstyle.patch src/test/resources/org/jenkinsci/plugins/patch/windows-gitstyle.patch http://jenkins-ci.org/commit/patch-parameter-plugin/5309d4d92cd03317b7eab47f56065a721ca4955d Log: CC - JENKINS-27169 - Add test to verify ContextualPatch can work with patch files generated from either Windows or Unix platforms, each with their respective line endings (CRLF vs LF). 
Note: Add .gitattributes files to preserve line ending for *.patch files. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-08-06 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-27169 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Hugo Trippaers Path: src/test/java/org/jenkinsci/plugins/patch/SomeTest.java src/test/resources/org/jenkinsci/plugins/patch/.gitattributes src/test/resources/org/jenkinsci/plugins/patch/gitstyle.patch src/test/resources/org/jenkinsci/plugins/patch/unix-gitstyle.patch src/test/resources/org/jenkinsci/plugins/patch/windows-gitstyle.patch http://jenkins-ci.org/commit/patch-parameter-plugin/69d93611c42ab5a0c406781cfe543329645f90fe Log: Merge pull request #2 from charleswhchan/JENKINS-27169 
CC - JENKINS-27169 - Modified the test to use System.lineSeparator() to ... 
Compare: https://github.com/jenkinsci/patch-parameter-plugin/compare/eae05e713ad0...69d93611c42a 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-08-06 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-27169 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Charles Chan Path: src/test/java/org/jenkinsci/plugins/patch/SomeTest.java http://jenkins-ci.org/commit/patch-parameter-plugin/f35bfbe04b1db0839e79c915910e6cdd13aaeb43 Log: CC - JENKINS-27169 - Modified the test to use System.lineSeparator() to ensure it pass on both Unix (\n) and Windows (\r\n) platforms. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-08-06 Thread scm_issue_l...@java.net (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 SCM/JIRA link daemon commented on  JENKINS-27169 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
  Re: Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files  
 
 
 
 
 
 
 
 
 
 
Code changed in jenkins User: Charles Chan Path: src/test/java/org/jenkinsci/plugins/patch/SomeTest.java http://jenkins-ci.org/commit/patch-parameter-plugin/af3edaae7bcc7b6441348e3744c6fcc199ca3709 Log: CC - JENKINS-27169 - Replace string concatenation with String.format(). 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 


 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-24 Thread harsh.sh...@emc.com (JIRA)














































Harsh Shah
 commented on  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files















Not yet will update once I work on it again. 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-23 Thread charles.wh.c...@gmail.com (JIRA)














































Charles Chan
 commented on  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files















H Shah, any updates?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-12 Thread charles.wh.c...@gmail.com (JIRA)














































Charles Chan
 commented on  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files















Hi H Shah,

I pushed some changes to my local branch and updated the tests cases:
https://github.com/charleswhchan/patch-parameter-plugin/tree/JENKINS-27169/src/test/resources/org/jenkinsci/plugins/patch

Specifically, I created 2 patch files. One file for UNIX platform (LF line ending) and the other for Windows (CRLF line ending).

$ file unix-gitstyle.patch 
unix-gitstyle.patch: unified diff output, ASCII text

$ file windows-gitstyle.patch 
windows-gitstyle.patch: unified diff output, ASCII text, with CRLF line terminators



Then each patch is applied against foo.txt and verifies the output ends up in the native line ending format.
https://github.com/charleswhchan/patch-parameter-plugin/blob/JENKINS-27169/src/test/java/org/jenkinsci/plugins/patch/SomeTest.java

So base on the tests, your scenario should work?

Feel free to run and modify the test and let me know of your result.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-12 Thread charles.wh.c...@gmail.com (JIRA)












































 
Charles Chan
 edited a comment on  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files
















Submitted PR: https://github.com/jenkinsci/patch-parameter-plugin/pull/2



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-12 Thread charles.wh.c...@gmail.com (JIRA)














































Charles Chan
 updated  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files
















Change By:


Charles Chan
(12/Mar/15 4:19 PM)




Summary:


Patch
paramter
parameter
pluginspatchcodeisOSdependentwhichfailstopatchcrossplatformfiles



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-12 Thread charles.wh.c...@gmail.com (JIRA)














































Charles Chan
 commented on  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files















H Shah,

I updated the test case to take care of line endings, but I am not sure if it fixes the "real" problem.

Are you trying to use patch file created on Unix on a Windows machine, or vice versa? If so, could you please update the description above?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-12 Thread harsh.sh...@emc.com (JIRA)














































Harsh Shah
 commented on  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files















Hi Charles 

 The problem lies with the diff4j jar. I tried using System.lineSeparator() and the test case passed but I am concerned with ContextualPatch. It reads a file using bufferedReader which is OS dependent and so will create a problem.

   I am trying to use a patch file created on Unix machine on a windows machine. 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [patch-parameter-plugin] (JENKINS-27169) Patch parameter plugin's patch code is OS dependent which fails to patch cross platform files

2015-03-12 Thread harsh.sh...@emc.com (JIRA)














































Harsh Shah
 updated  JENKINS-27169


Patch parameter plugins patch code is OS dependent which fails to patch cross platform files
















Change By:


Harsh Shah
(12/Mar/15 11:57 PM)




Description:


ThetestcaseinsomeTestclass(https://github.com/jenkinsci/patch-parameter-plugin/commit/02c684a6e9d9fe40548c839ab15d2231306eb239)failsonwindows.
IamtryingtouseapatchfilecreatedonUnixmachineonawindowsmachine.
Thecodeusescloudbees/diff4j/ContextualPatchwhichinternallyusesBufferedReadertoreadfiles.BufferedReaderdoesOSspecificreadingoperation.Sotheendoffileiscausingtheproblemforthetestcasetopasswhenrunonwindowsmachine.Kindlyseetheattachedimages.HereisthelinkofContextualPatchimplementationhttps://github.com/cloudbees/diff4j/blob/master/src/main/java/com/cloudbees/diff/ContextualPatch.javaThankyouforthehelp.HShah



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups Jenkins Issues group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.