[ 
https://issues.apache.org/jira/browse/HADOOP-11910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526152#comment-14526152
 ] 

Allen Wittenauer commented on HADOOP-11910:
-------------------------------------------

I actually thought a lot about this before filing HADOOP-11906.  Two things 
that made me come to the conclusion that detecting the file type is probably 
better:

* I built a list of all the non *.patch files that were in PA state in JIRA.  
After .txt, there was pretty much zero consistency in how people violated our 
naming standards.  ;)  .rdiff, .diff, .##,  ...  all kinds of weird and wacky 
things. The people who are this creative are clearly not regular contributors 
and will have no clue how to name their stuff without pointers/help.  The 
system should be more forgiving: "yes, you named it something wacky, but I know 
it's a diff, so I'll cut you a break."  (Part of HADOOP-11906 should probably 
be a mild scolding on how to properly name things.)
* The branch detection will likely get trickier if a regex is accepted.  It's 
already got some edge cases where it gets it completely wrong (hint: don't name 
your dev branch against the JIRA number anymore...) and increasing the scope of 
what it accepts as valid will likely lead to some of them no longer being edge 
cases unless care is taken.

I looked at it from the perspective if the code can detect that it is a patch 
file, it won't matter what users name it and test-patch will apply it to trunk. 
 If it ends in .patch, then the code should be able to much more safely apply 
the branch detection rules.  (and there is clearly a huge benefit in making the 
branch detection safer/smarter ... micro branches being a big one.)

I keep meaning to circle back to 11906 and put these notes in it. Ha.

> add command line arg to test-patch for the regex to use for evaluating if 
> something is a patch file.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11910
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11910
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: test
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>         Attachments: HADOOP-11910.1.patch
>
>
> right now before test-patch can be used on a submission it checks if the file 
> ends with ".patch". we should make this configurable so that it can be used 
> with other projects that might want to be more permissive (i.e. ".patch.txt")



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to