|
View:
New views
19 Messages
—
Rating Filter:
Alert me
|
|
|
[PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Log: Resolve a deprecation warning. * subversion/svn/info-cmd.c (svn_cl__info): Use `svn_client_info3()'. Patch by: Kannan R <kannanr@...> - -- Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSuWqV3lTqcY7ytmIAQIYfQgAgy9fcixVKuyZRLPk3G6amY4UEdCFJxNm wJ+ptmhrjLj1BmVspjPeWyVYlu+55WVel0S1SJQ7OugT6cHkhbt89UBGO0iajTPz 0lFP/IlOXLbmFs/0W2M0jKz1O8NGwq8vWwEO19ksdJGNPv2ePkuffqCV5BPeH9P9 MRrRI2l6DE701JTq2wTCyxKOLji+4Ym6mTLFgrdmzcOjxyiUNpCvKLjAW0B78DBs znNC/C3mf5tib1oyHhul3yWA6lGNkjDhsKeLYEAcps8Mi2hwDICuva/B/lVZT9Yz m8tJpDDt7ta+pUBf9PvTTx8MmzbwVjfbcbusHeYz4Qg14JiDBw7XZg== =OU03 -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411390 Index: subversion/svn/info-cmd.c =================================================================== --- subversion/svn/info-cmd.c (revision 40224) +++ subversion/svn/info-cmd.c (working copy) @@ -527,7 +527,7 @@ && (peg_revision.kind == svn_opt_revision_unspecified)) peg_revision.kind = svn_opt_revision_head; - err = svn_client_info2(truepath, + err = svn_client_info3(truepath, &peg_revision, &(opt_state->start_revision), receiver, NULL, opt_state->depth, opt_state->changelists, ctx, subpool); |
|
|
Re: [PATCH] Fix a deprecation warning.On Mon, Oct 26, 2009 at 07:25:35PM +0530, Kannan wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Log: > Resolve a deprecation warning. > > * subversion/svn/info-cmd.c > (svn_cl__info): Use `svn_client_info3()'. > > Patch by: Kannan R <kannanr@...> > Index: subversion/svn/info-cmd.c > =================================================================== > --- subversion/svn/info-cmd.c (revision 40224) > +++ subversion/svn/info-cmd.c (working copy) > @@ -527,7 +527,7 @@ > && (peg_revision.kind == svn_opt_revision_unspecified)) > peg_revision.kind = svn_opt_revision_head; > > - err = svn_client_info2(truepath, > + err = svn_client_info3(truepath, > &peg_revision, &(opt_state->start_revision), > receiver, NULL, opt_state->depth, > opt_state->changelists, ctx, subpool); Are you sure you don't need to update the receiver also? svn_client_info2's docstring says: /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of * a svn_info_receiver2_t. Stefan ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2411436 |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Stefan Sperling wrote: > On Mon, Oct 26, 2009 at 07:25:35PM +0530, Kannan wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> >> Log: >> Resolve a deprecation warning. >> >> * subversion/svn/info-cmd.c >> (svn_cl__info): Use `svn_client_info3()'. >> >> Patch by: Kannan R <kannanr@...> > >> Index: subversion/svn/info-cmd.c >> =================================================================== >> --- subversion/svn/info-cmd.c (revision 40224) >> +++ subversion/svn/info-cmd.c (working copy) >> @@ -527,7 +527,7 @@ >> && (peg_revision.kind == svn_opt_revision_unspecified)) >> peg_revision.kind = svn_opt_revision_head; >> >> - err = svn_client_info2(truepath, >> + err = svn_client_info3(truepath, >> &peg_revision, &(opt_state->start_revision), >> receiver, NULL, opt_state->depth, >> opt_state->changelists, ctx, subpool); > > Are you sure you don't need to update the receiver also? > > svn_client_info2's docstring says: > > /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of > * a svn_info_receiver2_t. `svn_info_receiver2_t' and passed the path as absolute to `svn_client_info3()' as it expects an 'abspath_or_url', also to avoid an assertion failed error in `svn_wc__db_read_info()' and just tested `svn info'. It runs fine, before I could change anything in `print_info()'. I'm attaching the patch herewith. Please correct me if I'm wrong. - -- Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSuhDBHlTqcY7ytmIAQLk+wgAjezuiOofayrjtaJKv+9JdKdTN2wL+kmz CAZXbjpJ9LC3DH8EGEcWrj1eikMalzmW2RrYDiMdIrPOZfcsXM/kpP/jkpg560Sj BZ4vl9+1BqnbfpRESB1fLYJg8UIlkVJrNoUvl2snYy/oUq6pUtcO4To/70Y7josz DvmowuKrhofD1Gd6v4uN95gL8N1LUx2FX86xY0dj7XcMn2YZRY4E3Lg1EoGx2Pky +DBELVYBw0HARo5zuawCynhX09sc3ye7q9WqRogd6GOXgX1Jqbjyd4traLRvSltW CZKbEv58GibwgSbesxr4rcI2NoSMYITcOo60VIcaFt0/S82QejCqaA== =w/o1 -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2412106 Index: subversion/svn/info-cmd.c =================================================================== --- subversion/svn/info-cmd.c (revision 40234) +++ subversion/svn/info-cmd.c (working copy) @@ -479,7 +479,7 @@ svn_error_t *err; svn_boolean_t saw_a_problem = FALSE; svn_opt_revision_t peg_revision; - svn_info_receiver_t receiver; + svn_info_receiver2_t receiver; SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, opt_state->targets, @@ -526,8 +526,11 @@ if ((svn_path_is_url(target)) && (peg_revision.kind == svn_opt_revision_unspecified)) peg_revision.kind = svn_opt_revision_head; + + if(!svn_path_is_url(truepath)) + SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool)); - err = svn_client_info2(truepath, + err = svn_client_info3(truepath, &peg_revision, &(opt_state->start_revision), receiver, NULL, opt_state->depth, opt_state->changelists, ctx, subpool); Index: subversion/libsvn_client/info.c =================================================================== --- subversion/libsvn_client/info.c (revision 40234) +++ subversion/libsvn_client/info.c (working copy) @@ -200,7 +200,7 @@ svn_revnum_t rev, const char *repos_UUID, const char *repos_root, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, svn_client_ctx_t *ctx, @@ -265,7 +265,7 @@ struct found_entry_baton { apr_hash_t *changelist_hash; - svn_info_receiver_t receiver; + svn_info_receiver2_t receiver; void *receiver_baton; svn_wc_context_t *wc_ctx; }; @@ -328,7 +328,7 @@ RECEIVER/BATON, and possibly recurse over more entries. */ static svn_error_t * crawl_entries(const char *local_abspath, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, apr_hash_t *changelist_hash, @@ -430,7 +430,7 @@ svn_client_info3(const char *abspath_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, const apr_array_header_t *changelists, |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 > Stefan Sperling wrote: >> On Mon, Oct 26, 2009 at 07:25:35PM +0530, Kannan wrote: >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA1 >>> >>> >>> Log: >>> Resolve a deprecation warning. >>> >>> * subversion/svn/info-cmd.c >>> (svn_cl__info): Use `svn_client_info3()'. >>> >>> Patch by: Kannan R <kannanr@...> > >>> Index: subversion/svn/info-cmd.c >>> =================================================================== >>> --- subversion/svn/info-cmd.c (revision 40224) >>> +++ subversion/svn/info-cmd.c (working copy) >>> @@ -527,7 +527,7 @@ >>> && (peg_revision.kind == svn_opt_revision_unspecified)) >>> peg_revision.kind = svn_opt_revision_head; >>> >>> - err = svn_client_info2(truepath, >>> + err = svn_client_info3(truepath, >>> &peg_revision, &(opt_state->start_revision), >>> receiver, NULL, opt_state->depth, >>> opt_state->changelists, ctx, subpool); >> Are you sure you don't need to update the receiver also? > >> svn_client_info2's docstring says: > >> /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of >> * a svn_info_receiver2_t. > > Thank you stsp. After your comments in IRC, changed the receiver type to > `svn_info_receiver2_t' and passed the path as absolute to > `svn_client_info3()' as it expects an 'abspath_or_url', also to avoid an > assertion failed error in `svn_wc__db_read_info()' and just tested `svn > info'. It runs fine, before I could change anything in `print_info()'. > I'm attaching the patch herewith. Please correct me if I'm wrong. > - -- Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSvBdEnlTqcY7ytmIAQI5Nwf/TSTNoY6CKR+1J7xSmCHRt26/vv6pp47G oN12I7/hTxkv3KDeFnv0UZzvU5Za7x++DSYvhA9q/Kuw5jBRk1231xvq0IEe9nS7 CHFtsmhq4E9Od1CfPmeu3ptD/rBUX0aoeIsA9nnFWsff6w8HUxdAxVwhP00RAYLw +Az89ITzEp3m4K+P/aDS9sjkl5CNnDUycmO6tlSvjO0/LarJ8s61b/bj6ZIG35Jo MnCtmSAqedobPq/zYE6eQgMi5pQPodCOPi1NDoLeL8CkHqC7Wk5w98yt5LqKuB75 AQsqc3KbNKpxS11hIBkF6tj6ror3qBwkhPdK6QS6p5ALzBxSaJXpMw== =tomn -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414153 |
|
|
Re: [PATCH] Fix a deprecation warning.On Tue, Nov 03, 2009 at 10:10:50PM +0530, Kannan wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Stefan Sperling wrote: > >> On Mon, Oct 26, 2009 at 07:25:35PM +0530, Kannan wrote: > >>> -----BEGIN PGP SIGNED MESSAGE----- > >>> Hash: SHA1 > >>> > >>> > >>> Log: > >>> Resolve a deprecation warning. > >>> > >>> * subversion/svn/info-cmd.c > >>> (svn_cl__info): Use `svn_client_info3()'. > >>> > >>> Patch by: Kannan R <kannanr@...> > > > >>> Index: subversion/svn/info-cmd.c > >>> =================================================================== > >>> --- subversion/svn/info-cmd.c (revision 40224) > >>> +++ subversion/svn/info-cmd.c (working copy) > >>> @@ -527,7 +527,7 @@ > >>> && (peg_revision.kind == svn_opt_revision_unspecified)) > >>> peg_revision.kind = svn_opt_revision_head; > >>> > >>> - err = svn_client_info2(truepath, > >>> + err = svn_client_info3(truepath, > >>> &peg_revision, &(opt_state->start_revision), > >>> receiver, NULL, opt_state->depth, > >>> opt_state->changelists, ctx, subpool); > >> Are you sure you don't need to update the receiver also? > > > >> svn_client_info2's docstring says: > > > >> /** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of > >> * a svn_info_receiver2_t. > > > > Thank you stsp. After your comments in IRC, changed the receiver type to > > `svn_info_receiver2_t' and passed the path as absolute to > > `svn_client_info3()' as it expects an 'abspath_or_url', also to avoid an > > assertion failed error in `svn_wc__db_read_info()' and just tested `svn > > info'. It runs fine, before I could change anything in `print_info()'. > > I'm attaching the patch herewith. Please correct me if I'm wrong. > > > > Any updates on this thread? Sorry, this got lost. I've just tested your patch. It changes output -- svn info shows absolute paths instead of relative paths. This in itself is not a huge problem, we know that it happens as part of the wc-ng transition, and we may have to figure out a way to make absolute paths relative for command line client output if possible. But the problem is that the changed output breaks tests. I've only tested info_tests with your patch, and info tests 2 and 3 are failing. Please run all tests and make sure they pass before sending patches. If you cannot get a test to pass, mention this in your patch submission and ask for help. It's important to run *all* tests on a patch, because breakage sometimes shows up in unexpected places. This is quite time consuming but necessary. Stefan ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414699 |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Stefan Sperling wrote: > Sorry, this got lost. > > I've just tested your patch. It changes output -- svn info shows > absolute paths instead of relative paths. This in itself is not > a huge problem, we know that it happens as part of the wc-ng transition, > and we may have to figure out a way to make absolute paths relative > for command line client output if possible. > > But the problem is that the changed output breaks tests. > I've only tested info_tests with your patch, and info tests 2 and 3 > are failing. Please run all tests and make sure they pass before sending > patches. If you cannot get a test to pass, mention this in your patch > submission and ask for help. It's important to run *all* tests on a > patch, because breakage sometimes shows up in unexpected places. This > is quite time consuming but necessary. fail, as the path returned is an absolute one. Should we make a transition again to relative paths for the output? - -- Thanks & Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSvPQPnlTqcY7ytmIAQLfBgf/TVbgMFL/dt45WD4K4aZ4gOZqMAznyveu gsPczy6mucAbZZi6gGgbu1WNhsYfMANVgmvujLhcsWi8zm9qtcq6PNdXSyC4aw2D iX5FhXwJAoZnRK7Kigg0bYwKsGb6WT7WmCY1mZRVb+Z71h/GGe0h80MUBP9PuqbL TAftSZqkjLcz2Mo2Zs3jK9Mk+vZDyuqgG0yOPW3qKIg7P7vtUx1x1LFyv7yZYJ+U Lfua6hDwaCEIcpwl7+E2S4vJZmlhpEdkuPf8MQtrDRotFarLpR64nxeX+/MDm/B4 IBPRSRErEaPVBd+UgB1p9MmoKdkJBiwD3WSZxkpOiwOQwd1dg543qg== =gvRC -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415007 |
|
|
Re: [PATCH] Fix a deprecation warning.On Fri, Nov 06, 2009 at 12:59:02PM +0530, Kannan wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Stefan Sperling wrote: > > Sorry, this got lost. > > > > I've just tested your patch. It changes output -- svn info shows > > absolute paths instead of relative paths. This in itself is not > > a huge problem, we know that it happens as part of the wc-ng transition, > > and we may have to figure out a way to make absolute paths relative > > for command line client output if possible. > > > > But the problem is that the changed output breaks tests. > > I've only tested info_tests with your patch, and info tests 2 and 3 > > are failing. Please run all tests and make sure they pass before sending > > patches. If you cannot get a test to pass, mention this in your patch > > submission and ask for help. It's important to run *all* tests on a > > patch, because breakage sometimes shows up in unexpected places. This > > is quite time consuming but necessary. > > Thank you for the comments Stefan. I could see the info tests 2 and 3 > fail, as the path returned is an absolute one. Should we make a > transition again to relative paths for the output? It's not clear to me yet how we're going to translate absolute paths to relative paths in all cases. I think for now it's fine to adjust the tests to expect absolute paths. See patch_unidiff_absolute_paths in patch_tests.py for an example of how we can deal with absolute paths in tests. Stefan ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415706 |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Stefan Sperling wrote: > It's not clear to me yet how we're going to translate absolute paths > to relative paths in all cases. > > I think for now it's fine to adjust the tests to expect absolute paths. > See patch_unidiff_absolute_paths in patch_tests.py for an example of > how we can deal with absolute paths in tests. Thank you Stefan. As per your comments, updated the tests to expect absolute paths and they pass now. Attaching the updated patch herewith. Updated Log: Resolve a deprecation warning. * subversion/svn/info-cmd.c (svn_cl__info): Make the path as absolute and pass to the new `svn_client_info3()' and update the receiver type to `svn_info_receiver2_t'. * subversion/libsvn_client/info.c (svn_client_info3, push_dir_info, crawl_entries, found_entry_baton): Update the receiver type to `svn_info_receiver2_t'. * subversion/tests/cmdline/info-tests.py (info_on_added_file, info_on_mkdir): Expect absolute paths for `svn info'. Patch by: Kannan R <kannanr@...> - -- Thanks & Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSvfpIXlTqcY7ytmIAQJDLwf9ED7wF0ypMYcF3cFV2Dje4xJKNiQQoGtI QQHpFZTM/dcl09DWbPInoW6//1yQ2+1Htm+an6d9f8C/dHZe0wRE4UrjnInpE2sD eupFw23AErv4o65F1u2PdjyKiAFNcF25m74dduyVpGBeOU7jJF3P6hy8CLvhwNzj WCzo25SO7+QgyaP0KRdDDGRY8+IAdaugGM/HHMAg5udcGZHyULS/TAZo1RZciK2X pwD/D317vM+SncwKMQcs5FH6vxvXIGsbKG1kq+UtxIpyXznan7pl5Adtp/1Gnb8K TCinhblpOjA2sZ+S7ayo6buQmWVlAbEQ6NJxFFLShlWVmPiwxSy5Fg== =wfNS -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2415724 Index: ../../../../subversion/svn/info-cmd.c =================================================================== --- ../../../../subversion/svn/info-cmd.c (revision 40430) +++ ../../../../subversion/svn/info-cmd.c (working copy) @@ -479,7 +479,7 @@ svn_error_t *err; svn_boolean_t saw_a_problem = FALSE; svn_opt_revision_t peg_revision; - svn_info_receiver_t receiver; + svn_info_receiver2_t receiver; SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, opt_state->targets, @@ -526,8 +526,11 @@ if ((svn_path_is_url(target)) && (peg_revision.kind == svn_opt_revision_unspecified)) peg_revision.kind = svn_opt_revision_head; + + if(!svn_path_is_url(truepath)) + SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool)); - err = svn_client_info2(truepath, + err = svn_client_info3(truepath, &peg_revision, &(opt_state->start_revision), receiver, NULL, opt_state->depth, opt_state->changelists, ctx, subpool); Index: ../../../../subversion/libsvn_client/info.c =================================================================== --- ../../../../subversion/libsvn_client/info.c (revision 40430) +++ ../../../../subversion/libsvn_client/info.c (working copy) @@ -200,7 +200,7 @@ svn_revnum_t rev, const char *repos_UUID, const char *repos_root, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, svn_client_ctx_t *ctx, @@ -265,7 +265,7 @@ struct found_entry_baton { apr_hash_t *changelist_hash; - svn_info_receiver_t receiver; + svn_info_receiver2_t receiver; void *receiver_baton; svn_wc_context_t *wc_ctx; }; @@ -328,7 +328,7 @@ RECEIVER/BATON, and possibly recurse over more entries. */ static svn_error_t * crawl_entries(const char *local_abspath, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, apr_hash_t *changelist_hash, @@ -430,7 +430,7 @@ svn_client_info3(const char *abspath_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, const apr_array_header_t *changelists, Index: ../../../../subversion/tests/cmdline/info_tests.py =================================================================== --- ../../../../subversion/tests/cmdline/info_tests.py (revision 40430) +++ ../../../../subversion/tests/cmdline/info_tests.py (working copy) @@ -211,7 +211,7 @@ wc_dir = sbox.wc_dir # create new file - new_file = os.path.join(wc_dir, 'new_file') + new_file = os.path.abspath(os.path.join(wc_dir, 'new_file')) svntest.main.file_append(new_file, '') svntest.main.run_svn(None, 'add', new_file) @@ -253,7 +253,7 @@ wc_dir = sbox.wc_dir # create a new directory using svn mkdir - new_dir = os.path.join(wc_dir, 'new_dir') + new_dir = os.path.abspath(os.path.join(wc_dir, 'new_dir')) svntest.main.run_svn(None, 'mkdir', new_dir) uuid_regex = '[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}' |
|
|
Re: [PATCH] Fix a deprecation warning.On Mon, Nov 09, 2009 at 03:34:18PM +0530, Kannan wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Stefan Sperling wrote: > > It's not clear to me yet how we're going to translate absolute paths > > to relative paths in all cases. > > > > I think for now it's fine to adjust the tests to expect absolute paths. > > See patch_unidiff_absolute_paths in patch_tests.py for an example of > > how we can deal with absolute paths in tests. > > Thank you Stefan. As per your comments, updated the tests to expect > absolute paths and they pass now. Attaching the updated patch herewith. Thanks. There are still more test failures caused by this patch. Please run all tests and make sure they pass. You can run 'make check' in the working copy root to run all tests, and it will tell you which tests are failing. > Index: ../../../../subversion/svn/info-cmd.c > =================================================================== > --- ../../../../subversion/svn/info-cmd.c (revision 40430) > +++ ../../../../subversion/svn/info-cmd.c (working copy) Please don't send patches containing paths like this in the future, they are a bit combersome to apply. Just run 'svn diff' from the root of your svn trunk working copy, that's a bit easier for people consuming the patch (because they don't need to count how many path components to strip). Stefan ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416169 |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Stefan Sperling wrote: > Thanks. There are still more test failures caused by this patch. > Please run all tests and make sure they pass. You can run 'make check' > in the working copy root to run all tests, and it will tell you which > tests are failing. Should've run `make check` rather than testing info tests alone, sorry for that. Two tests(basic_tests.py 26 and changelist_tests.py 4) failed expecting relative paths for info, which is fixed with this patch to expect absolute ones. Make check passes. [[[ Updated Log: Resolve a deprecation warning. * subversion/svn/info-cmd.c (svn_cl__info): Make the path as absolute and pass to the new `svn_client_info3()' and update the receiver type to `svn_info_receiver2_t'. * subversion/libsvn_client/info.c (svn_client_info3, push_dir_info, crawl_entries, found_entry_baton): Update the receiver type to `svn_info_receiver2_t'. [in subversion/tests/cmdline]: * info-tests.py (info_on_added_file, info_on_mkdir): Expect absolute paths for `svn info'. * basic_tests.py (basic_info): Same. * changelist_tests.py (info_with_changelists): Same. ]]] >> Index: ../../../../subversion/svn/info-cmd.c >> =================================================================== >> --- ../../../../subversion/svn/info-cmd.c (revision 40430) >> +++ ../../../../subversion/svn/info-cmd.c (working copy) > > Please don't send patches containing paths like this in the future, > they are a bit combersome to apply. > Just run 'svn diff' from the root of your svn trunk working copy, > that's a bit easier for people consuming the patch (because they > don't need to count how many path components to strip). - -- Thanks & Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSvrT4XlTqcY7ytmIAQJu8Qf/YpocOAHaNcGJqLotSNHZx+Slp8/LnWUF gI/5Je82vhQ5kVfsnvaMSKYkfiA9awG2t/fNWiZ9ISGn+fis1AzYXpQ7WuEjNrBs 0BLDb9qvFNhy/AmLSBlMJ69KcPYS4sLKYy0UfZFR6iTXW1esaKC2tqV4s4lW205v npY/BgSG5bygjQB5iWYPQ5XoGkRR+D8ZsytjvgiHbJyHNWj7F0eUIL424/TLBZxI Tbu14+1zIA1ex3bH+tHI8xplwcV4jIXPAwpbrYfPqOTD8UmrlI9v0SgO+aMtMugY NdvFUCNed20UBu7xcs1+SzeBmS5C5J58neLPkwUO1hMNlt/bkEQ/4A== =YctK -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416605 Index: subversion/svn/info-cmd.c =================================================================== --- subversion/svn/info-cmd.c (revision 40444) +++ subversion/svn/info-cmd.c (working copy) @@ -479,7 +479,7 @@ svn_error_t *err; svn_boolean_t saw_a_problem = FALSE; svn_opt_revision_t peg_revision; - svn_info_receiver_t receiver; + svn_info_receiver2_t receiver; SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os, opt_state->targets, @@ -526,8 +526,11 @@ if ((svn_path_is_url(target)) && (peg_revision.kind == svn_opt_revision_unspecified)) peg_revision.kind = svn_opt_revision_head; + + if(!svn_path_is_url(truepath)) + SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool)); - err = svn_client_info2(truepath, + err = svn_client_info3(truepath, &peg_revision, &(opt_state->start_revision), receiver, NULL, opt_state->depth, opt_state->changelists, ctx, subpool); Index: subversion/libsvn_client/info.c =================================================================== --- subversion/libsvn_client/info.c (revision 40444) +++ subversion/libsvn_client/info.c (working copy) @@ -200,7 +200,7 @@ svn_revnum_t rev, const char *repos_UUID, const char *repos_root, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, svn_client_ctx_t *ctx, @@ -265,7 +265,7 @@ struct found_entry_baton { apr_hash_t *changelist_hash; - svn_info_receiver_t receiver; + svn_info_receiver2_t receiver; void *receiver_baton; svn_wc_context_t *wc_ctx; }; @@ -328,7 +328,7 @@ RECEIVER/BATON, and possibly recurse over more entries. */ static svn_error_t * crawl_entries(const char *local_abspath, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, apr_hash_t *changelist_hash, @@ -430,7 +430,7 @@ svn_client_info3(const char *abspath_or_url, const svn_opt_revision_t *peg_revision, const svn_opt_revision_t *revision, - svn_info_receiver_t receiver, + svn_info_receiver2_t receiver, void *receiver_baton, svn_depth_t depth, const apr_array_header_t *changelists, Index: subversion/tests/cmdline/info_tests.py =================================================================== --- subversion/tests/cmdline/info_tests.py (revision 40444) +++ subversion/tests/cmdline/info_tests.py (working copy) @@ -239,7 +239,7 @@ verify_xml_elements(output, [('entry', {'kind' : 'file', - 'path' : new_file, + 'path' : os.path.abspath(new_file), 'revision' : '0'}), ('url', {}, '.*/new_file'), ('root', {}, '.*'), @@ -277,7 +277,7 @@ '--xml') verify_xml_elements(output, [('entry', {'kind' : 'dir', - 'path' : new_dir, + 'path' : os.path.abspath(new_dir), 'revision' : '0'}), ('url', {}, '.*/new_dir'), ('root', {}, '.*'), Index: subversion/tests/cmdline/basic_tests.py =================================================================== --- subversion/tests/cmdline/basic_tests.py (revision 40444) +++ subversion/tests/cmdline/basic_tests.py (working copy) @@ -1632,11 +1632,11 @@ # Check that "info" works with 0, 1 and more than 1 explicit targets. exit_code, output, errput = svntest.main.run_svn(None, 'info') - check_paths(output, ['.']) + check_paths(output, [os.path.abspath('.')]) exit_code, output, errput = svntest.main.run_svn(None, 'info', 'iota') - check_paths(output, ['iota']) + check_paths(output, [os.path.abspath('iota')]) exit_code, output, errput = svntest.main.run_svn(None, 'info', 'iota', '.') - check_paths(output, ['iota', '.']) + check_paths(output, [os.path.abspath('iota'), os.path.abspath('.')]) def repos_root(sbox): "check that repos root gets set on checkout" Index: subversion/tests/cmdline/changelist_tests.py =================================================================== --- subversion/tests/cmdline/changelist_tests.py (revision 40444) +++ subversion/tests/cmdline/changelist_tests.py (working copy) @@ -507,7 +507,8 @@ expected_paths.append('A/D/G/pi') expected_paths.append('A/D/H/chi') expected_paths.append('A/D/H/psi') - expected_paths = sorted([os.path.join(wc_dir, x.replace('/', os.sep)) for x in expected_paths]) + expected_paths = sorted([os.path.abspath(os.path.join(wc_dir, x.replace('/', os.sep))) + for x in expected_paths]) # Build the command line. args = ['info', wc_dir] |
|
|
Re: [PATCH] Fix a deprecation warning.On Wed, 2009-11-11, Kannan wrote:
> Stefan Sperling wrote: > > Thanks. There are still more test failures caused by this patch. > > Please run all tests and make sure they pass. You can run 'make check' > > in the working copy root to run all tests, and it will tell you which > > tests are failing. > > Should've run `make check` rather than testing info tests alone, sorry > for that. Two tests(basic_tests.py 26 and changelist_tests.py 4) failed > expecting relative paths for info, which is fixed with this patch to > expect absolute ones. Make check passes. > > [[[ > Updated Log: > Resolve a deprecation warning. Hold on a minute... This patch doesn't just resolve a deprecation warning, it changes the command-line output format. You need to say things like that in the log message. We try not to change the output format without very good reason. Why can't we keep the output format the same? - Julian > * subversion/svn/info-cmd.c > (svn_cl__info): Make the path as absolute and pass to the > new `svn_client_info3()' and update the receiver type to > `svn_info_receiver2_t'. > > * subversion/libsvn_client/info.c > (svn_client_info3, push_dir_info, > crawl_entries, found_entry_baton): Update the receiver type to > `svn_info_receiver2_t'. > > [in subversion/tests/cmdline]: > > * info-tests.py > (info_on_added_file, info_on_mkdir): Expect absolute paths for `svn > info'. > > * basic_tests.py > (basic_info): Same. > > * changelist_tests.py > (info_with_changelists): Same. > > ]]] ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417506 |
|
|
Re: [PATCH] Fix a deprecation warning.On Wed, 2009-11-11, Kannan wrote:
> Stefan Sperling wrote: > > Thanks. There are still more test failures caused by this patch. > > Please run all tests and make sure they pass. You can run 'make check' > > in the working copy root to run all tests, and it will tell you which > > tests are failing. > > Should've run `make check` rather than testing info tests alone, sorry > for that. Two tests(basic_tests.py 26 and changelist_tests.py 4) failed > expecting relative paths for info, which is fixed with this patch to > expect absolute ones. Make check passes. > > [[[ > Updated Log: > Resolve a deprecation warning. Hold on a minute... This doesn't just resolve a deprecation warning, it also changes the command-line output format. The log message should say so. We try hard not to change the output format. Why do we need to change it here? The other subcommands manage to convert abs paths back to rel paths for display. - Julian > * subversion/svn/info-cmd.c > (svn_cl__info): Make the path as absolute and pass to the > new `svn_client_info3()' and update the receiver type to > `svn_info_receiver2_t'. > > * subversion/libsvn_client/info.c > (svn_client_info3, push_dir_info, > crawl_entries, found_entry_baton): Update the receiver type to > `svn_info_receiver2_t'. > > [in subversion/tests/cmdline]: > > * info-tests.py > (info_on_added_file, info_on_mkdir): Expect absolute paths for `svn > info'. > > * basic_tests.py > (basic_info): Same. > > * changelist_tests.py > (info_with_changelists): Same. > > ]]] ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416970 |
|
|
Re: [PATCH] Fix a deprecation warning.On Thu, Nov 12, 2009 at 11:01:10AM +0000, Julian Foad wrote:
> We try hard not to change the output format. Why do we need to change it > here? The other subcommands manage to convert abs paths back to rel > paths for display. How? Can you show an example? Stefan ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416991 |
|
|
Re: [PATCH] Fix a deprecation warning.Stefan Sperling wrote:
> On Thu, Nov 12, 2009 at 11:01:10AM +0000, Julian Foad wrote: > > We try hard not to change the output format. Why do we need to change it > > here? The other subcommands manage to convert abs paths back to rel > > paths for display. > > How? Can you show an example? I'm sure I recall somebody mentioning on dev@ that they did this for at least one other command earlier this year. A search for "to_rel" finds info_receiver_relpath_wrapper() which is undocumented, aargh, but looks like it does that sort of thing. Basically you just have to know what your base path is, transfer it (through a baton if necessary) to the output function, and strip it off the received abspath (making sure the base path is in canonical absolute form as well). - Julian ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416997 |
|
|
Re: [PATCH] Fix a deprecation warning.On Nov 12, 2009, at 5:53 AM, Julian Foad wrote:
> Stefan Sperling wrote: >> On Thu, Nov 12, 2009 at 11:01:10AM +0000, Julian Foad wrote: >>> We try hard not to change the output format. Why do we need to change it >>> here? The other subcommands manage to convert abs paths back to rel >>> paths for display. >> >> How? Can you show an example? > > I'm sure I recall somebody mentioning on dev@ that they did this for at > least one other command earlier this year. > > A search for "to_rel" finds info_receiver_relpath_wrapper() which is > undocumented, aargh, but looks like it does that sort of thing. > > Basically you just have to know what your base path is, transfer it > (through a baton if necessary) to the output function, and strip it off > the received abspath (making sure the base path is in canonical absolute > form as well). FWIW, centralization and sanitization of relative path output in an absolute path world is issue 3464: http://subversion.tigris.org/issues/show_bug.cgi?id=3464 -Hyrum ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417033 |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Julian Foad wrote: > On Wed, 2009-11-11, Kannan wrote: >> Stefan Sperling wrote: >>> Thanks. There are still more test failures caused by this patch. >>> Please run all tests and make sure they pass. You can run 'make check' >>> in the working copy root to run all tests, and it will tell you which >>> tests are failing. >> Should've run `make check` rather than testing info tests alone, sorry >> for that. Two tests(basic_tests.py 26 and changelist_tests.py 4) failed >> expecting relative paths for info, which is fixed with this patch to >> expect absolute ones. Make check passes. >> >> [[[ >> Updated Log: >> Resolve a deprecation warning. > > Hold on a minute... This doesn't just resolve a deprecation warning, it > also changes the command-line output format. The log message should say > so. > Oops, missed the whole point. Thank you for pointing out. - -- Thanks & Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSvwap3lTqcY7ytmIAQImawf9EEsl2FI3zVzSevxdg7e4fi6lFXGviqXY grLXIkjSV0jl73+KU+biT6zPTkwyxKcBqM76c/cjUYiqrx5kgHAcOikJnWMJhFoS E+SkUB0NMIFQzB/XLQ0rGnzuDJoTO0vOE5TtZ3D6IzIO+D9V+i6se/SjV8nWvk/h AN79V0PHgxb5N9yNRxlZLDMrokQT7FqSEPgh1TMkkNu9cECAL/FgA+wTnj/kFIPm jgt2eWHGKcKUdmgvaw9a9Gh6+JvSqIsIcSP1oE69YVVKQ6rmX4lukMv0jvu7T3Wo aqxI+D871b+ItxB6C1Nsk8xD7iIy4vfS5hXxdhD10oD3fQr+DBzo/A== =G1hs -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417060 |
|
|
Re: [PATCH] Fix a deprecation warning.-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Hyrum K. Wright wrote: > On Nov 12, 2009, at 5:53 AM, Julian Foad wrote: > >> Stefan Sperling wrote: >>> On Thu, Nov 12, 2009 at 11:01:10AM +0000, Julian Foad wrote: >>>> We try hard not to change the output format. Why do we need to change it >>>> here? The other subcommands manage to convert abs paths back to rel >>>> paths for display. >>> How? Can you show an example? >> I'm sure I recall somebody mentioning on dev@ that they did this for at >> least one other command earlier this year. >> >> A search for "to_rel" finds info_receiver_relpath_wrapper() which is >> undocumented, aargh, but looks like it does that sort of thing. >> >> Basically you just have to know what your base path is, transfer it >> (through a baton if necessary) to the output function, and strip it off >> the received abspath (making sure the base path is in canonical absolute >> form as well). If we're to use info_receiver_relpath_wrapper() and a baton to pass the relative path and other info, won't it resemble the implementation(for backward compatibility)which is at present? > FWIW, centralization and sanitization of relative path output in an absolute path world is issue 3464: > http://subversion.tigris.org/issues/show_bug.cgi?id=3464 Thank you Hyrum, in that case implementing using a separate wrapper(now) for info alone becomes obsolete right? - -- Thanks & Regards, Kannan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBSvwcAHlTqcY7ytmIAQLucgf9GFhvDanmU77Ba+/JcrmnotsK30g0ak/J z7gVNdTNnJ+coW5rYwcQX7mUvstBMDvFXhEPYsJ6AXlKSXdJqKt0F8zGFp4smbDS rC+UzrILz7Lopuoo0RzBfd7E6kLFOa9u3lLKxrj1x4rsU+fgDXidXQNfo7JwGF9W d845fi998fQrg0MHPEByAX7OivOpaZtb39AtvncxTmcgUzjHvs17OoGPz7MzgrzU MVRyXZPPz3Wtpl2HxI8NnIKxlPx2xvjB7Fn8pTETZKq7yHlvaYtc/qzFOhVhtr7L XrkgSJGtbz7m0XJkPIPssxAEMrIGtUVJxeRh6nwyrUZiN6oPnW/LRg== =dUVf -----END PGP SIGNATURE----- ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417065 |
|
|
Re: [PATCH] Fix a deprecation warning.Hi Kannan,
Ping! (Just in case it fell off your radar) I can't see this patch has been submitted nor has any more comments been made to it since Julian last asked about the output format. Don't forget to ask for any help you might need. Gavin. On 12/11/2009, at 21:00 , Julian Foad wrote: > On Wed, 2009-11-11, Kannan wrote: >> Stefan Sperling wrote: >>> Thanks. There are still more test failures caused by this patch. >>> Please run all tests and make sure they pass. You can run 'make check' >>> in the working copy root to run all tests, and it will tell you which >>> tests are failing. >> >> Should've run `make check` rather than testing info tests alone, sorry >> for that. Two tests(basic_tests.py 26 and changelist_tests.py 4) failed >> expecting relative paths for info, which is fixed with this patch to >> expect absolute ones. Make check passes. >> >> [[[ >> Updated Log: >> Resolve a deprecation warning. > > Hold on a minute... This patch doesn't just resolve a deprecation > warning, it changes the command-line output format. You need to say > things like that in the log message. > > We try not to change the output format without very good reason. Why > can't we keep the output format the same? > > - Julian > > >> * subversion/svn/info-cmd.c >> (svn_cl__info): Make the path as absolute and pass to the >> new `svn_client_info3()' and update the receiver type to >> `svn_info_receiver2_t'. >> >> * subversion/libsvn_client/info.c >> (svn_client_info3, push_dir_info, >> crawl_entries, found_entry_baton): Update the receiver type to >> `svn_info_receiver2_t'. >> >> [in subversion/tests/cmdline]: >> >> * info-tests.py >> (info_on_added_file, info_on_mkdir): Expect absolute paths for `svn >> info'. >> >> * basic_tests.py >> (basic_info): Same. >> >> * changelist_tests.py >> (info_with_changelists): Same. >> >> ]]] > > ------------------------------------------------------ > http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417506 ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2420501 |
|
|
Re: [PATCH] Fix a deprecation warning.On Thu, 2009-11-12, Kannan wrote:
> Hyrum K. Wright wrote: > > On Nov 12, 2009, at 5:53 AM, Julian Foad wrote: > >> Stefan Sperling wrote: > >>> On Thu, Nov 12, 2009 at 11:01:10AM +0000, Julian Foad wrote: > >>>> We try hard not to change the output format. Why do we need to change it > >>>> here? The other subcommands manage to convert abs paths back to rel > >>>> paths for display. > >>> How? Can you show an example? > >> I'm sure I recall somebody mentioning on dev@ that they did this for at > >> least one other command earlier this year. > >> > >> A search for "to_rel" finds info_receiver_relpath_wrapper() which is > >> undocumented, aargh, but looks like it does that sort of thing. > >> > >> Basically you just have to know what your base path is, transfer it > >> (through a baton if necessary) to the output function, and strip it off > >> the received abspath (making sure the base path is in canonical absolute > >> form as well). > > If we're to use info_receiver_relpath_wrapper() and a baton to pass the > relative path and other info, won't it resemble the implementation(for > backward compatibility)which is at present? Kannan, I'm sorry, I don't understand that question. What will resemble what implementation, in what way? > > FWIW, centralization and sanitization of relative path output in an > absolute path world is issue 3464: > > http://subversion.tigris.org/issues/show_bug.cgi?id=3464 > > Thank you Hyrum, in that case implementing using a separate wrapper(now) > for info alone becomes obsolete right? Do you mean "I can change the output format (from relative to absolute) now, because there is an issue filed for fixing that (changing it back to relative) later" ? If so, I disagree. We COULD apply this patch now, if people think that is the best thing to do, but I am concerned that if we start making changes like this, we may not implement the necessary infrastructure to make it easy to "fix" it later, and also we may start to lose track of what user-visible changes we have made. If we do it properly straight away, then we will know we are on track. So if you can, please find a way to keep the output format the same, and you get bonus points if you can create a shared function to help do that. Thanks. - Julian ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2423354 Please start new threads on the <dev@...> mailing list. To subscribe to the new list, send an empty e-mail to <dev-subscribe@...>. |
| Free embeddable forum powered by Nabble | Forum Help |