You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Hyrum K. Wright" <hy...@mail.utexas.edu> on 2006/11/03 05:01:32 UTC

[PATCH] copy_tests: verify the results of a repos_to_repos copy

In going through the copy tests, I found a test where we copy between
two locations in the repository, but never actually check to see if the
copy worked.  This patch adds such a check.

-Hyrum

[[[
* subversion/tests/cmdline/copy_tests.py
  (copy_to_root):
    After doing a repo->repo copy, update the working copy and verify
    that the copy actually happened.
]]]

Re: [PATCH] copy_tests: verify the results of a repos_to_repos copy

Posted by Lieven Govaerts <sv...@mobsol.be>.
Hyrum K. Wright wrote:
> In going through the copy tests, I found a test where we copy between
> two locations in the repository, but never actually check to see if the
> copy worked.  This patch adds such a check.
>
> -Hyrum
>   
Thanks! Committed in r22200.

Lieven.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] copy_tests: verify the results of a repos_to_repos copy

Posted by Kamesh Jayachandran <ka...@collab.net>.
Looks fine to me.

With regards
Kamesh Jayachandran
Hyrum K. Wright wrote:
> In going through the copy tests, I found a test where we copy between
> two locations in the repository, but never actually check to see if the
> copy worked.  This patch adds such a check.
>
> -Hyrum
>
> [[[
> * subversion/tests/cmdline/copy_tests.py
>   (copy_to_root):
>     After doing a repo->repo copy, update the working copy and verify
>     that the copy actually happened.
> ]]]
>   
> ------------------------------------------------------------------------
>
> Index: subversion/tests/cmdline/copy_tests.py
> ===================================================================
> --- subversion/tests/cmdline/copy_tests.py	(revision 22196)
> +++ subversion/tests/cmdline/copy_tests.py	(working copy)
> @@ -1025,7 +1025,8 @@
>  def copy_to_root(sbox):
>    'copy item to root of repository'
>  
> -  sbox.build(create_wc = False)
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
>  
>    root = svntest.main.current_repo_url
>    mu = root + '/A/mu'
> @@ -1036,6 +1037,28 @@
>                                       '-m', '',
>                                       mu, root)
>  
> +  # Update to HEAD, and check to see if the files really were copied in the
> +  # repo
> +
> +  expected_output = svntest.wc.State(wc_dir, { 
> +    'mu': Item(status='A '),
> +    })
> +
> +  expected_disk = svntest.main.greek_state.copy()
> +  expected_disk.add({
> +    'mu': Item(contents="This is the file 'mu'.\n")
> +    })
> +
> +  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
> +  expected_status.add({
> +    'mu': Item(status='  ', wc_rev=2),
> +    })
> +
> +  svntest.actions.run_and_verify_update(wc_dir,
> +                                        expected_output,
> +                                        expected_disk,
> +                                        expected_status)
> +
>  #----------------------------------------------------------------------
>  def url_copy_parent_into_child(sbox):
>    "copy URL URL/subdir"
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org