You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2002/11/12 15:37:55 UTC
svn:externals bug?
On IRC, Brandon Ehle <az...@yahoo.com> seems to have found an
svn:externals bug, and I can reproduce it.
Anyone want to try reproducing or analyzing? Or should I just file it
straight away?
Here's the recipe:
1. checkout a working copy
2. make a local propchange on a subdir of the working copy:
create an 'svn:externals' property, and set the value
to something like "new-dir http://some/other/location/in/same/repos"
3. cd into the subdir
4. svn up
On Brandon's system, his RAM spins out of control before the OS kills
the process. On my system, I get 10 seconds of pause, then a
segfault. Neither of us sees the checkout happening.
However, if you omit step #3, and update from the *root* of the wc,
then a checkout of new-dir happens just fine, as you would expect. No
problems.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn:externals/update crash
Posted by Philip Martin <ph...@codematters.co.uk>.
Vladimir Prus <gh...@cs.msu.su> writes:
> Log message:
> Fix crashes on updating external items in current directory.
>
> * subversion/libsvn_subr/io.c (svn_io_make_dir_recursively):
> Do nothing when passes empty path, assuming that empty path
> already exists.
>
> * subversion/tests/clients/cmdline/module_tests.py
> (update_current_dir): New test.
A patch with a test case, I like it! Applied in rev 3774, thanks.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] svn:externals/update crash
Posted by Vladimir Prus <gh...@cs.msu.su>.
Karl Fogel wrote:
> Vladimir Prus <gh...@cs.msu.su> writes:
>
>>I believe I've told you about that problem in IRC some time ago --
>>svn_io_make_dir_recursively can't handle "" path, and I can try to
>>fix it if you like.
>
>
> Yes, please do! We can file an issue now, or just wait till the patch
> is posted and make it a `patch' issue, either way is fine (maybe it'll
> be simple enough to apply right away anyway).
Log message:
Fix crashes on updating external items in current directory.
* subversion/libsvn_subr/io.c (svn_io_make_dir_recursively):
Do nothing when passes empty path, assuming that empty path
already exists.
* subversion/tests/clients/cmdline/module_tests.py
(update_current_dir): New test.
Patch:
Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c (revision 3772)
+++ subversion/libsvn_subr/io.c (working copy)
@@ -424,6 +424,11 @@
apr_status_t apr_err;
char *dir;
+ if (svn_path_is_empty_nts (path) )
+ /* Empty path (current dir) is assumed to always exist,
+ so we do nothing, per docs. */
+ return SVN_NO_ERROR;
+
SVN_ERR (svn_utf_cstring_from_utf8 (&path_native, path, pool));
#if 0
Index: subversion/tests/clients/cmdline/module_tests.py
===================================================================
--- subversion/tests/clients/cmdline/module_tests.py (revision 3772)
+++ subversion/tests/clients/cmdline/module_tests.py (working copy)
@@ -650,6 +650,74 @@
return 0
+
+def update_current_dir(sbox):
+ "update '.', instead of updating directory, given its full path"
+
+ if externals_test_setup(sbox):
+ return 1
+
+ wc_dir = sbox.wc_dir
+ other_wc_dir = wc_dir + ".other"
+ repo_dir = sbox.repo_dir
+ repo_url = os.path.join(svntest.main.test_area_url, repo_dir)
+ other_repo_url = repo_url + ".other"
+
+ # Checkout a working copy
+ out_lines, err_lines = svntest.main.run_svn \
+ (None, 'checkout', repo_url, wc_dir)
+ if err_lines: return 1
+
+ # Add one more external item
+ B_path = os.path.join(wc_dir, "A/B")
+ externals_desc = \
+ "exdir_G " + os.path.join(other_repo_url, "A/D/G") + "\n" + \
+ "exdir_H -r1 " + os.path.join(other_repo_url, "A/D/H") + "\n" + \
+ "exdir_Z " + os.path.join(other_repo_url, "A/D/H") + "\n"
+
+ tmp_f = os.tempnam()
+ svntest.main.file_append(tmp_f, externals_desc)
+ out_lines, err_lines = svntest.main.run_svn \
+ (None, 'pset', '-F', tmp_f, 'svn:externals', B_path)
+ if err_lines: return 1
+
+ os.remove(tmp_f)
+
+ # Now cd into A/B and try updating
+ cd = os.getcwd()
+ result = 0
+
+ os.chdir(B_path)
+ out_lines, err_lines = svntest.main.run_svn (None, 'up')
+
+ if err_lines: result = 1
+
+ # Since 'run_svn' does not detect segfaults, just check the output.
+ if out_lines != [
+ 'At revision 6.\n',
+ '\n',
+ 'Fetching external item into exdir_G\n',
+ 'At revision 5.\n',
+ '\n',
+ 'Fetching external item into exdir_H\n',
+ 'At revision 1.\n',
+ '\n',
+ 'Fetching external item into exdir_Z\n',
+ 'A exdir_Z/chi\n',
+ 'A exdir_Z/omega\n',
+ 'A exdir_Z/psi\n',
+ 'Updated to revision 5.\n'
+ ]:
+ print "Unexpected output."
+ result = 1
+
+ os.chdir(cd)
+
+ return result
+
+
+
+
########################################################################
# Run the tests
@@ -662,6 +730,7 @@
update_change_pristine_external,
update_change_modified_external,
update_receive_change_under_external,
+ update_current_dir,
]
if __name__ == '__main__':
- Volodya
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn:externals bug?
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Vladimir Prus <gh...@cs.msu.su> writes:
> I believe I've told you about that problem in IRC some time ago --
> svn_io_make_dir_recursively can't handle "" path, and I can try to
> fix it if you like.
Yes, please do! We can file an issue now, or just wait till the patch
is posted and make it a `patch' issue, either way is fine (maybe it'll
be simple enough to apply right away anyway).
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn:externals bug?
Posted by Vladimir Prus <gh...@cs.msu.su>.
Ben Collins-Sussman wrote:
> On IRC, Brandon Ehle <az...@yahoo.com> seems to have found an
> svn:externals bug, and I can reproduce it.
>
> Anyone want to try reproducing or analyzing? Or should I just file it
> straight away?
>
> Here's the recipe:
>
> 1. checkout a working copy
> 2. make a local propchange on a subdir of the working copy:
> create an 'svn:externals' property, and set the value
> to something like "new-dir http://some/other/location/in/same/repos"
> 3. cd into the subdir
> 4. svn up
Reproduces here -- immediate segfault.
Here's a part of trace.
svn_io_make_dir_recursively (path=0x81adb00 "", pool=0x805f138)
I believe I've told you about that problem in IRC some time ago --
svn_io_make_dir_recursively can't handle "" path, and I can try to
fix it if you like.
- Volodya
>
> On Brandon's system, his RAM spins out of control before the OS kills
> the process. On my system, I get 10 seconds of pause, then a
> segfault. Neither of us sees the checkout happening.
>
> However, if you omit step #3, and update from the *root* of the wc,
> then a checkout of new-dir happens just fine, as you would expect. No
> problems.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org