You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Rui, Guo" <ti...@mail.ustc.edu.cn> on 2008/04/18 06:31:14 UTC
[PATCH] Re: Semantics of --depth: should define WC-depth for omitted-items?
On Thu, Apr 10, 2008 at 12:37:01AM +0800, Rui, Guo wrote:
> It shows that the --depth option will define WC-depth for those not exist in
> the wc yet (aka omitted-items). I wrote a test case for it, which is
> gracefully passed. I expect this behavior is consistent in other subcommands
> and thus add a verify_depth(None, "files", new1_path) to check it in the
> "add_tree_with_depth_files" test case. To my surprise, the depth of new
> added
> directory is still infinity. What do you think about this? Do I made a wrong
> assumption or is it actually a bug?
>
> Anyway, I suggest the description of --depth option in the commandline help
> messages be improved to notify this behavior, at least for the checkout,
> update and switch commands. The new description should looks like this:
>
> --depth ARG : limit operation by depth ARG ('empty', 'files',
> 'immediates', or 'infinity'), also defines wc
> depth for the items not yet exist in wc
>
> Also, the sparse-directories.txt should be updated accordingly.
I attached the test case used to verify the behavior of 'svn up --depth=FOO
OMITTED-TREE'. The new verify-depth in "add_tree_with_depth_files" was
commented out since it's still under discussion.
[[[
Added test case to verify the semantics of --depth on items that are either
omitted in WC or not yet under version control.
* subversion/tests/cmdline/depth_tests.py
(pull_in_tree_with_depth_option): New, pull in directory A with
--depth=immediates, expected to see the depth of A is set to immediates
(add_tree_with_depth_files): Added a verify_depth() to check the depth of
the new1_path. Commented out since it's still under discussion
(depth_fold_expand_clean_trees): Fix a silly bug caused by copy/paste.
The last expected_status assignment should be expected_disk.
]]]
Rui, Guo
Re: [PATCH] Re: Semantics of --depth: should define WC-depth for omitted-items?
Posted by "Rui, Guo" <ti...@mail.ustc.edu.cn>.
On Fri, Apr 18, 2008 at 10:06:29AM +0300, Daniel Shahaf wrote:
> Rui,
>
> Rui, Guo wrote on Fri, 18 Apr 2008 at 14:31 +0800:
> > [[[
> > Added test case to verify the semantics of --depth on items that are either
> > omitted in WC or not yet under version control.
> >
> ...
> > (depth_fold_expand_clean_trees): Fix a silly bug caused by copy/paste.
> > The last expected_status assignment should be expected_disk.
> >
> > ]]]
>
> Since fixing the copy/paste bug is independent of and unrelated to the
> rest of the patch, HACKING's advice applies:
>
> "A patch submission should contain one logical change; please don't
> mix N unrelated changes in one submission — send N separate emails
> instead."
>
> You do not need to resubmit this one, however; I'm only pointing that
> out for next time.
>
> Thanks,
>
> Daniel
Thank you for figure this out. I won't do it againt.
Rui, Guo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Semantics of --depth: should define WC-depth for
omitted-items?
Posted by Daniel Shahaf <d....@daniel.shahaf.co.il>.
Rui,
Rui, Guo wrote on Fri, 18 Apr 2008 at 14:31 +0800:
> [[[
> Added test case to verify the semantics of --depth on items that are either
> omitted in WC or not yet under version control.
>
...
> (depth_fold_expand_clean_trees): Fix a silly bug caused by copy/paste.
> The last expected_status assignment should be expected_disk.
>
> ]]]
Since fixing the copy/paste bug is independent of and unrelated to the
rest of the patch, HACKING's advice applies:
"A patch submission should contain one logical change; please don't
mix N unrelated changes in one submission — send N separate emails
instead."
You do not need to resubmit this one, however; I'm only pointing that
out for next time.
Thanks,
Daniel
Re: [PATCH] Re: Semantics of --depth: should define WC-depth for omitted-items?
Posted by "Rui, Guo" <ti...@mail.ustc.edu.cn>.
On Fri, Apr 18, 2008 at 12:27:36PM +0530, Senthil Kumaran S wrote:
> Hi Rui,
>
> Rui, Guo wrote:
> >On Thu, Apr 10, 2008 at 12:37:01AM +0800, Rui, Guo wrote:
> >+def pull_in_tree_with_depth_option(sbox):
> >+ """pull in sub tree with with --depth=immediates, expecting to see the
> >depth
> >+ of the sub tree is set to immediates"""
>
> The test doc string should not exceed 50 characters. You can make it as
> "verify subtree with --depth=immediates".
>
> >+ wc_empty,ign_a, ign_b, ign_c = set_up_depthy_working_copies(sbox,
> >+ empty=True)
>
> Check formatting here.
>
> >+ expected_disk = svntest.wc.State('', {
> >+ 'A' : Item(),
> >+ 'A/mu' : Item("This is the file 'mu'.\n"),
> >+ 'A/B' : Item(),
> >+ 'A/C' : Item(),
> >+ 'A/D' : Item(),
>
> Check formatting here.
Sorry for the formating fault. I'll avoid the same mistake next time.
Thank you for figuring it out.
Rui, Guo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Semantics of --depth: should define WC-depth for
omitted-items?
Posted by Senthil Kumaran S <se...@collab.net>.
Hi Rui,
Rui, Guo wrote:
> On Thu, Apr 10, 2008 at 12:37:01AM +0800, Rui, Guo wrote:
> +def pull_in_tree_with_depth_option(sbox):
> + """pull in sub tree with with --depth=immediates, expecting to see the depth
> + of the sub tree is set to immediates"""
The test doc string should not exceed 50 characters. You can make it as "verify
subtree with --depth=immediates".
> + wc_empty,ign_a, ign_b, ign_c = set_up_depthy_working_copies(sbox,
> + empty=True)
Check formatting here.
> + expected_disk = svntest.wc.State('', {
> + 'A' : Item(),
> + 'A/mu' : Item("This is the file 'mu'.\n"),
> + 'A/B' : Item(),
> + 'A/C' : Item(),
> + 'A/D' : Item(),
Check formatting here.
--
Senthil Kumaran S
http://www.stylesen.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Re: Semantics of --depth: should define WC-depth for
omitted-items?
Posted by Senthil Kumaran S <se...@collab.net>.
Hi Rui,
Rui, Guo wrote:
> On Thu, Apr 10, 2008 at 12:37:01AM +0800, Rui, Guo wrote:
> * subversion/tests/cmdline/depth_tests.py
> (pull_in_tree_with_depth_option): New, pull in directory A with
> --depth=immediates, expected to see the depth of A is set to immediates
Applied in r30673 with some formatting tweaks.
> (depth_fold_expand_clean_trees): Fix a silly bug caused by copy/paste.
> The last expected_status assignment should be expected_disk.
Applied in r30672.
PS: When you add new test cases, add it at the end of all the existing test
cases which will be easy to refer the test cases by some number x at any point
of time.
Thank You.
--
Senthil Kumaran S
http://www.stylesen.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org