Daniel Shahaf wrote on Fri, Jul 01, 2011 at 23:46:54 +0300: > rhuij...@apache.org wrote on Fri, Jul 01, 2011 at 20:42:37 -0000: > > Author: rhuijben > > Date: Fri Jul 1 20:42:36 2011 > > New Revision: 1142088 > > > > URL: http://svn.apache.org/viewvc?rev=1142088&view=rev > > Log: > > When renaming a file in run_file_install() fails check if this might be > > caused > > by a missing parent directory. > > > > * subversion/libsvn_wc/workqueue.c > > (run_file_install): Try to create missing parent directories if we fail > > here > > because the target directory is not present. > > > > Modified: > > subversion/trunk/subversion/libsvn_wc/workqueue.c > > > > Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c > > URL: > > http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=1142088&r1=1142087&r2=1142088&view=diff > > ============================================================================== > > --- subversion/trunk/subversion/libsvn_wc/workqueue.c (original) > > +++ subversion/trunk/subversion/libsvn_wc/workqueue.c Fri Jul 1 20:42:36 > > 2011 > > @@ -737,7 +737,33 @@ run_file_install(svn_wc__db_t *db, > > > > /* All done. Move the file into place. */ > > /* ### fix this. we should delay the rename. */ > > - SVN_ERR(svn_io_file_rename(dst_abspath, local_abspath, scratch_pool)); > > + > > + { > > + svn_error_t *err; > > + > > + err = svn_io_file_rename(dst_abspath, local_abspath, scratch_pool); > > + > > + /* With a single db we might want to install files in a missing > > directory. > > + Simply trying this scenario on error won't do any harm and at least > > + one user reported this problem on IRC. */ > > From IRC: > > > 23:34:08 @danielsh | svn ps svn:externals > '^/subversion/trunk/notes/ssh-tricks tricks notes'; > svn up notes; svn up -r0 notes # treeconflict; rm > -f notes; > $svn resolved notes; $svn up notes # wantscleanup; > $svn cleanup >
After this revision, the same recipe produces: [[[ ... % $svn resolved notes/commit-access-templates/ Resolved conflicted state of 'notes/commit-access-templates' % $svn up notes/commit-access-templates/ Updating 'notes/commit-access-templates': C notes/commit-access-templates A notes/commit-access-templates/pmc-member.tmpl A notes/commit-access-templates/partial-committer.tmpl A notes/commit-access-templates/contrib-committer.tmpl A notes/commit-access-templates/full-committer.tmpl Fetching external item into 'notes/commit-access-templates/contrib': svn: warning: W000002: Can't move '/home/daniel/src/svn/t1/.svn/tmp/svn-sJC3MU' to '/home/daniel/src/svn/t1/notes/commit-access-templates/contrib': No such file or directory Updated to revision 1142092. Summary of conflicts: Tree conflicts: 1 subversion/svn/update-cmd.c:176: (apr_err=205011) svn: E205011: Failure occurred processing one or more externals definitions zsh: exit 1 $SVN up notes/commit-access-templates/ % file notes/commit-access-templates/ notes/commit-access-templates: ERROR: cannot open `notes/commit-access-templates' (No such file or directory) zsh: exit 1 file notes/commit-access-templates ]]]