I looked at this further and the problem seems to be older version of svn (1.6.18) on my Mac OS X . I generated the patch on Linux with svn version 1.8.3 using the following options:
svn diff --no-diff-deleted --notice-ancestry --show-copies-as-adds > YARN-1586.patch ./dev-support/test-patch.sh could then successfully apply the patch. More details of this svn issue are captured here: http://subversion.tigris.org/issues/show_bug.cgi?id=2543 Thanks, On Sun, Jan 19, 2014 at 3:12 AM, Abhiraj Butala <[email protected]>wrote: > Hello, > > I have a newbie question about patch creation when there are file renames > involved. I am working on a fix for > https://issues.apache.org/jira/browse/YARN-1586 , which involves renaming > a couple of files. > > As suggested on > https://wiki.apache.org/hadoop/HowToContribute#Generating_a_patch , I did > following: > > 1) Created a shell script which has the 'svn mv' commands > 2) Ran the script and then made necessary changes > 3) Created the diff using this command: "svn diff --no-diff-selected > --notice-ancestry > YARN-1586.patch' > > The idea is to submit both the shell script and the patch as suggested. > > I tried to test this patch using 'dev-support/test-patch.sh' on a fresh > checkout of hadoop-trunk, but it fails to apply because it does not find > the new files to apply the patch on. > > Creating the patch before doing 'svn mv' also does not work, because now > the test-patch.sh applies it cleanly but fails during build. > > I looked up online and tried a few suggestions but that did not seem to > help. > > So, how should the patch be created so test-patch.sh and thus jenkins > automation shall be happy? > Am I missing something obvious here? Kindly let me know. > > Thank you! > > Regards, > Abhiraj > -Abhiraj
