RE: [PATCH] Fix some deprecation warnings
Thanks Vijay. Committed in r1052547. With regards Kamesh Jayachandran -Original Message- From: Vijayaguru Guruchave Sent: Fri 12/24/2010 9:42 PM To: dev@subversion.apache.org Cc: Daniel Shahaf; Kamesh Jayachandran Subject: Re: [PATCH] Fix some deprecation warnings On Friday 24 December 2010 03:46 PM, vijay wrote: > On Wednesday 22 December 2010 06:42 PM, Daniel Shahaf wrote: >> Kamesh Jayachandran wrote on Wed, Dec 22, 2010 at 15:10:46 +0530: >>> On 12/22/2010 02:02 AM, vijay wrote: >>>> Hi, >>>> >>>> I have attached a patch that fixes few deprecation warnings while >>>> compiling libsvn_client/log.c. >>>> Attached log message also. >>>> >>>> Thanks& Regards, >>>> Vijayaguru >>> Can you pass scratch_pool for the below call as 'iterpool' and move the >>> iterpool destruction down? >>> >> ... presumably in order to save a bit of memory. >> >> Daniel >> (not disagreeing) >> > I used iterpool in place of scratch pool and moved the iterpool > destruction down. There are two failures in log_tests.py:7 & 9 with > the following error_trace. > > > CMD: /home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/svn/svn > log svn-test-work/working_copies/log_tests-7/A/B/E/b...@8 --config-dir > /home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/local_tmp/config > > --password rayjandom --no-auth-cache --username jrandom exited with 1 > > ../subversion/svn/log-cmd.c:743: (apr_err=22) > ../subversion/libsvn_client/log.c:486: (apr_err=22) > ../subversion/libsvn_client/ra.c:482: (apr_err=22) > ../subversion/libsvn_client/url.c:53: (apr_err=22) > ../subversion/libsvn_subr/dirent_uri.c:1667: (apr_err=22) > ../subversion/libsvn_subr/utf.c:837: (apr_err=22) > ../subversion/libsvn_subr/utf.c:604: (apr_err=22) > svn: Valid UTF-8 data > (hex:) > followed by invalid UTF-8 sequence > (hex: e0 65 30 00) > Traceback (most recent call last): > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", > > line 1212, in run > rc = self.pred.run(sandbox) > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", > > line 170, in run > return self.func(sandbox) > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/log_tests.py", > > line 762, in log_wc_with_peg_revision > 'log', my_path) > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/actions.py", > > line 264, in run_and_verify_svn > expected_exit, *varargs) > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/actions.py", > > line 302, in run_and_verify_svn2 > exit_code, out, err = main.run_svn(want_err, *varargs) > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", > > line 580, in run_svn > *(_with_auth(_with_config_dir(varargs > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", > > line 338, in run_command > None, *varargs) > File > "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", > > line 513, in run_command_stdin > raise Failure > Failure > FAIL: log_tests.py 7: 'svn log wc_tar...@n' > > > The following function 'svn_uri_condense_targets()' stores its return > value of 'url_or_path' in scratch pool(here iterpool) which should not > be the case. > > SVN_ERR(svn_uri_condense_targets(&url_or_path, &condensed_targets, > target_urls, TRUE, pool, iterpool)); > > We have to copy the return value from scratch pool to result pool > before exiting from the function, right? > I will send a patch to fix it in dirent_uri.c: > svn_uri_condense_targets(). > > Thanks & Regards, > vijayaguru The above mentioned bug is fixed in r1052505. Attaching the updated patch and log message. Thanks & Regards, Vijayaguru >>> + SVN_ERR(svn_uri_condense_targets(&url_or_path,&condensed_targets, >>> + target_urls, TRUE, pool, >>> pool)); >>> >>> >>> >>> >>> With regards >>> Kamesh Jayachandran >
Re: [PATCH] Fix some deprecation warnings
On Friday 24 December 2010 03:46 PM, vijay wrote: On Wednesday 22 December 2010 06:42 PM, Daniel Shahaf wrote: Kamesh Jayachandran wrote on Wed, Dec 22, 2010 at 15:10:46 +0530: On 12/22/2010 02:02 AM, vijay wrote: Hi, I have attached a patch that fixes few deprecation warnings while compiling libsvn_client/log.c. Attached log message also. Thanks& Regards, Vijayaguru Can you pass scratch_pool for the below call as 'iterpool' and move the iterpool destruction down? ... presumably in order to save a bit of memory. Daniel (not disagreeing) I used iterpool in place of scratch pool and moved the iterpool destruction down. There are two failures in log_tests.py:7 & 9 with the following error_trace. CMD: /home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/svn/svn log svn-test-work/working_copies/log_tests-7/A/B/E/b...@8 --config-dir /home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1 ../subversion/svn/log-cmd.c:743: (apr_err=22) ../subversion/libsvn_client/log.c:486: (apr_err=22) ../subversion/libsvn_client/ra.c:482: (apr_err=22) ../subversion/libsvn_client/url.c:53: (apr_err=22) ../subversion/libsvn_subr/dirent_uri.c:1667: (apr_err=22) ../subversion/libsvn_subr/utf.c:837: (apr_err=22) ../subversion/libsvn_subr/utf.c:604: (apr_err=22) svn: Valid UTF-8 data (hex:) followed by invalid UTF-8 sequence (hex: e0 65 30 00) Traceback (most recent call last): File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1212, in run rc = self.pred.run(sandbox) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 170, in run return self.func(sandbox) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/log_tests.py", line 762, in log_wc_with_peg_revision 'log', my_path) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 264, in run_and_verify_svn expected_exit, *varargs) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 302, in run_and_verify_svn2 exit_code, out, err = main.run_svn(want_err, *varargs) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 580, in run_svn *(_with_auth(_with_config_dir(varargs File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 338, in run_command None, *varargs) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 513, in run_command_stdin raise Failure Failure FAIL: log_tests.py 7: 'svn log wc_tar...@n' The following function 'svn_uri_condense_targets()' stores its return value of 'url_or_path' in scratch pool(here iterpool) which should not be the case. SVN_ERR(svn_uri_condense_targets(&url_or_path, &condensed_targets, target_urls, TRUE, pool, iterpool)); We have to copy the return value from scratch pool to result pool before exiting from the function, right? I will send a patch to fix it in dirent_uri.c: svn_uri_condense_targets(). Thanks & Regards, vijayaguru The above mentioned bug is fixed in r1052505. Attaching the updated patch and log message. Thanks & Regards, Vijayaguru + SVN_ERR(svn_uri_condense_targets(&url_or_path,&condensed_targets, + target_urls, TRUE, pool, pool)); With regards Kamesh Jayachandran [[[ Reslove some deprecation warnings using uri/dirent functions in its respective places. * subversion/libsvn_client/log.c: (svn_client_log5): Use 'svn_uri_condense_targets()' and 'svn_dirent_condense_targets()' * subversion/svn/commit-cmd.c: (svn_cl__commit): Use 'svn_dirent_condense_targets()' Patch by: Vijayaguru G Suggested by: kameshj Noorul Islam K M ]]] Index: subversion/libsvn_client/log.c === --- subversion/libsvn_client/log.c (revision 1052459) +++ subversion/libsvn_client/log.c (working copy) @@ -452,15 +452,14 @@ APR_ARRAY_PUSH(target_urls, const char *) = url; APR_ARRAY_PUSH(real_targets, const char *) = target; } - svn_pool_destroy(iterpool); /* if we have no valid target_urls, just exit. */ if (target_urls->nelts == 0) return SVN_NO_ERROR; /* Find the base URL and condensed targets relative to it. */ - SVN_ERR(svn_path_condense_targets(&url_or_path, &condensed_targets, -target_urls, TRUE, pool)); + SVN_ERR(svn_uri_condense_targets(&url_or_path, &condensed_targets, + target_urls, TRUE, pool, iterpool)); if (condensed_targets->nelts == 0) APR_ARRAY_PUSH(conden
Re: [PATCH] Fix some deprecation warnings
On Wednesday 22 December 2010 06:42 PM, Daniel Shahaf wrote: Kamesh Jayachandran wrote on Wed, Dec 22, 2010 at 15:10:46 +0530: On 12/22/2010 02:02 AM, vijay wrote: Hi, I have attached a patch that fixes few deprecation warnings while compiling libsvn_client/log.c. Attached log message also. Thanks& Regards, Vijayaguru Can you pass scratch_pool for the below call as 'iterpool' and move the iterpool destruction down? ... presumably in order to save a bit of memory. Daniel (not disagreeing) I used iterpool in place of scratch pool and moved the iterpool destruction down. There are two failures in log_tests.py:7 & 9 with the following error_trace. CMD: /home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/svn/svn log svn-test-work/working_copies/log_tests-7/A/B/E/b...@8 --config-dir /home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1 ../subversion/svn/log-cmd.c:743: (apr_err=22) ../subversion/libsvn_client/log.c:486: (apr_err=22) ../subversion/libsvn_client/ra.c:482: (apr_err=22) ../subversion/libsvn_client/url.c:53: (apr_err=22) ../subversion/libsvn_subr/dirent_uri.c:1667: (apr_err=22) ../subversion/libsvn_subr/utf.c:837: (apr_err=22) ../subversion/libsvn_subr/utf.c:604: (apr_err=22) svn: Valid UTF-8 data (hex:) followed by invalid UTF-8 sequence (hex: e0 65 30 00) Traceback (most recent call last): File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1212, in run rc = self.pred.run(sandbox) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 170, in run return self.func(sandbox) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/log_tests.py", line 762, in log_wc_with_peg_revision 'log', my_path) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 264, in run_and_verify_svn expected_exit, *varargs) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 302, in run_and_verify_svn2 exit_code, out, err = main.run_svn(want_err, *varargs) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 580, in run_svn *(_with_auth(_with_config_dir(varargs File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 338, in run_command None, *varargs) File "/home/vijayaguru/svn-sandbox/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 513, in run_command_stdin raise Failure Failure FAIL: log_tests.py 7: 'svn log wc_tar...@n' The following function 'svn_uri_condense_targets()' stores its return value of 'url_or_path' in scratch pool(here iterpool) which should not be the case. SVN_ERR(svn_uri_condense_targets(&url_or_path, &condensed_targets, target_urls, TRUE, pool, iterpool)); We have to copy the return value from scratch pool to result pool before exiting from the function, right? I will send a patch to fix it in dirent_uri.c: svn_uri_condense_targets(). Thanks & Regards, vijayaguru + SVN_ERR(svn_uri_condense_targets(&url_or_path,&condensed_targets, + target_urls, TRUE, pool, pool)); With regards Kamesh Jayachandran
Re: [PATCH] Fix some deprecation warnings
Kamesh Jayachandran wrote on Wed, Dec 22, 2010 at 15:10:46 +0530: > On 12/22/2010 02:02 AM, vijay wrote: >> Hi, >> >> I have attached a patch that fixes few deprecation warnings while >> compiling libsvn_client/log.c. >> Attached log message also. >> >> Thanks & Regards, >> Vijayaguru > > Can you pass scratch_pool for the below call as 'iterpool' and move the > iterpool destruction down? > ... presumably in order to save a bit of memory. Daniel (not disagreeing) > + SVN_ERR(svn_uri_condense_targets(&url_or_path,&condensed_targets, > + target_urls, TRUE, pool, pool)); > > > > > With regards > Kamesh Jayachandran
Re: [PATCH] Fix some deprecation warnings
On 12/22/2010 02:02 AM, vijay wrote: Hi, I have attached a patch that fixes few deprecation warnings while compiling libsvn_client/log.c. Attached log message also. Thanks & Regards, Vijayaguru Can you pass scratch_pool for the below call as 'iterpool' and move the iterpool destruction down? + SVN_ERR(svn_uri_condense_targets(&url_or_path,&condensed_targets, + target_urls, TRUE, pool, pool)); With regards Kamesh Jayachandran
Re: [PATCH] Fix some deprecation warnings
On Wednesday 22 December 2010 11:32 AM, Noorul Islam K M wrote: vijay writes: Hi, I have attached a patch that fixes few deprecation warnings while compiling libsvn_client/log.c. Attached log message also. I could see this usage at one more place, subversion/svn/commit-cmd.c. Do you think this can also be included as part of this patch? Thanks Noorul. Attached the updated patch that fixes deprecation warning in subversion/svn/commit-cmd.c also. Regards, Vijayaguru Thanks and Regards Noorul Index: subversion/svn/commit-cmd.c === --- subversion/svn/commit-cmd.c (revision 1051468) +++ subversion/svn/commit-cmd.c (working copy) @@ -34,6 +34,7 @@ #include "svn_wc.h" #include "svn_client.h" #include "svn_path.h" +#include "svn_dirent_uri.h" #include "svn_error.h" #include "svn_config.h" #include "cl.h" @@ -78,11 +79,8 @@ SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool)); /* Condense the targets (like commit does)... */ - SVN_ERR(svn_path_condense_targets(&base_dir, -&condensed_targets, -targets, -TRUE, -pool)); + SVN_ERR(svn_dirent_condense_targets(&base_dir, &condensed_targets, targets, + TRUE, pool, pool)); if ((! condensed_targets) || (! condensed_targets->nelts)) { Index: subversion/libsvn_client/log.c === --- subversion/libsvn_client/log.c (revision 1051468) +++ subversion/libsvn_client/log.c (working copy) @@ -459,8 +459,8 @@ return SVN_NO_ERROR; /* Find the base URL and condensed targets relative to it. */ - SVN_ERR(svn_path_condense_targets(&url_or_path, &condensed_targets, -target_urls, TRUE, pool)); + SVN_ERR(svn_uri_condense_targets(&url_or_path, &condensed_targets, + target_urls, TRUE, pool, pool)); if (condensed_targets->nelts == 0) APR_ARRAY_PUSH(condensed_targets, const char *) = ""; @@ -476,7 +476,8 @@ * we use our initial target path to figure out where to root the RA * session, otherwise we use our URL. */ if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_rev.kind)) - SVN_ERR(svn_path_condense_targets(&ra_target, NULL, targets, TRUE, pool)); + SVN_ERR(svn_dirent_condense_targets(&ra_target, NULL, targets, + TRUE, pool, pool)); else ra_target = url_or_path; [[[ Reslove some deprecation warnings using uri/dirent functions in its respective places. * subversion/libsvn_client/log.c (svn_client_log5): Use 'svn_uri_condense_targets()' and 'svn_dirent_condense_targets()' * subversion/svn/commit-cmd.c (svn_cl__commit): Use 'svn_dirent_condense_targets()' Patch by: Vijayaguru G Suggested by: kameshj Noorul Islam K M ]]]
Re: [PATCH] Fix some deprecation warnings
vijay writes: > Hi, > > I have attached a patch that fixes few deprecation warnings while > compiling libsvn_client/log.c. > Attached log message also. > I could see this usage at one more place, subversion/svn/commit-cmd.c. Do you think this can also be included as part of this patch? Thanks and Regards Noorul
Re: [PATCH] Fix some deprecation warnings
On Tue, Nov 17, 2009 at 03:04:28PM +0530, Kannan wrote: > > Log: > Resolve some deprecation warnings using the new dirent/URI/path functions. > > * subversion/svnlook/main.c > (print_dirs_changed_tree, print_changed_tree, print_diff_tree): Use > `svn_dirent_join()'. > > Patch by: Kannan R Thanks, r881223. Stefan