It annoys me when using svn-apply and svn-unapply that full path names to files are not used. I have a patch that will fix this, along with some general clean-up of both scripts.
Created attachment 8887 [details] Patch v1 Patch v1 does the following: svn-apply: - Added "use warnings;" - Used subroutine prototypes - Added command-line argument validation and a -h|--help argument with a help message - Changed merge feature to operate on full paths - Added "exit 0;" statement at end of main code path - Renamed $fullpath to $fullPath - Changed patch() subroutine to use $fullPath instead of $base and to inline usages of $prefix - Changed handleBinaryChange() subroutine to use a full path - Renamed chdirAddingDirectoriesIfNeeded() to addDirectoriesIfNeeded() and chdir back to $startDir when done svn-unapply: - Added new missing feature for removing newly added directories - Added "use warnings;" - Used subroutine prototypes - Added command-line argument validation and a -h|--help argument with a help message - Added "exit 0;" statement at end of main code path - Renamed $fullpath to $fullPath - Changed patch() subroutine to use $fullPath instead of $base and to remove usages of $prefix
(In reply to comment #1) > svn-unapply: > - Added new missing feature for removing newly added directories That is, I added the item to the missing-feature list. I haven't implemented that feature (yet).
Comment on attachment 8887 [details] Patch v1 cvs couldn't handle full paths; that's why the code was doing complicated unnecessary stuff before. Once we switched to svn, we didn't need that code. I don't understand why we need to chdir at all any more. I think that addDirectoriesIfNeeded also should use full paths. r=me
(In reply to comment #3) > I don't understand why we need to chdir at all any more. I think that > addDirectoriesIfNeeded also should use full paths. Hmm...you must add the top-level directory in SVN: pbookw:~/WebKit ddkilzer$ mkdir foo pbookw:~/WebKit ddkilzer$ mkdir foo/bar pbookw:~/WebKit ddkilzer$ svn add foo/bar subversion/libsvn_wc/lock.c:377: (apr_err=155007) svn: 'foo' is not a working copy pbookw:~/WebKit ddkilzer$ svn add foo A foo A foo/bar pbookw:~/WebKit ddkilzer$
Committed revision 14909.
(In reply to comment #4) > (In reply to comment #3) > > I don't understand why we need to chdir at all any more. I think that > > addDirectoriesIfNeeded also should use full paths. > > Hmm...you must add the top-level directory in SVN: Sure, you need to add one directory at a time. But we don't need to chdir. We can use a full path for each directory as we add it.