Ping! This patch has not been reviewed!

On Sun, Mar 14, 2010 at 09:38:15PM +0100, Daniel Näslund wrote:
> Hi!
> 
> The 1.6 svnversion message was "'path' not versioned, and not exported".
> But on trunk more than one message has been changed. My first thought
> was that we should be backward compat in our output but if changes of
> those messages are ok I'm supplying one.
> 
> In case we will use new messages, the help text must be updated. It
> talks of 'exported' but those are not used in the new messages.
> 
> [[[
> After the changes in r922176, versioned but not yet committed files were
> not properly detected. Fixed now!
> 
> * subversion/svnversion/main.c
>   (main): Check for invalid rev nr for files and dirs.
> 
> * subversion/tests/cmdline/svnversion_tests.py
>   (structural_changes): New.
>   (tests_list): Add new test.
> ]]]

> Index: subversion/tests/cmdline/svnversion_tests.py
> ===================================================================
> --- subversion/tests/cmdline/svnversion_tests.py      (revision 922931)
> +++ subversion/tests/cmdline/svnversion_tests.py      (arbetskopia)
> @@ -236,7 +236,36 @@
>    svntest.actions.run_and_verify_svnversion("working copy with excluded 
> file",
>                                              D_path, repo_url + '/A/D',
>                                              [ "1P\n" ], [])
> +def structural_changes(sbox):
> +  "test 'svnversion' with structural changes"
> +  sbox.build()
> +  wc_dir = sbox.wc_dir
> +  repo_url = sbox.repo_url
>  
> +  iota_path = os.path.join(wc_dir, 'iota')
> +  iota_copy_path = os.path.join(wc_dir, 'iota_copy')
> +
> +  svntest.actions.run_and_verify_svn(None, None, [],
> +                                     'cp', iota_path, iota_copy_path)
> +
> +  svntest.actions.run_and_verify_svnversion("Copied file",
> +                                            iota_copy_path, repo_url +
> +                                            '/iota_copy',
> +                                            [ "Local uncommitted "
> +                                            "modifications, no revision "
> +                                            "information found\n" ], [])
> +  C_path = os.path.join(wc_dir, 'A', 'C')
> +  C_copy_path = os.path.join(wc_dir, 'C_copy')
> +  svntest.actions.run_and_verify_svn(None, None, [],
> +                                     'cp', C_path, C_copy_path)
> +
> +  svntest.actions.run_and_verify_svnversion("Copied dir",
> +                                            C_copy_path, repo_url +
> +                                            '/C_copy',
> +                                            [ "Local uncommitted "
> +                                            "modifications, no revision "
> +                                            "information found\n" ], [])
> +
>  ########################################################################
>  # Run the tests
>  
> @@ -246,6 +275,7 @@
>                svnversion_test,
>                ignore_externals,
>                svnversion_with_excluded_subtrees,
> +              structural_changes,
>               ]
>  
>  if __name__ == '__main__':
> Index: subversion/svnversion/main.c
> ===================================================================
> --- subversion/svnversion/main.c      (revision 922931)
> +++ subversion/svnversion/main.c      (arbetskopia)
> @@ -290,6 +290,17 @@
>        return EXIT_FAILURE;
>      }
>  
> +  if (res->min_rev == -1)
> +    {
> +      /* Local uncommited modifications, no revision info was found. */
> +      SVN_INT_ERR(svn_cmdline_printf(pool, _("Local uncommitted "
> +                                             "modifications, no revision "
> +                                             "information found%s"),
> +                                     no_newline ? "" : "\n"));
> +      svn_pool_destroy(pool);
> +      return EXIT_SUCCESS;
> +    }
> +
>    /* Build compact '123[:456]M?S?' string. */
>    SVN_INT_ERR(svn_cmdline_printf(pool, "%ld", res->min_rev));
>    if (res->min_rev != res->max_rev)

Reply via email to