[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix svnversion message as follow-up to r922176

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 30 Mar 2010 23:04:13 +0200

On Tue, Mar 30, 2010 at 10:14:42PM +0200, Daniel Näslund wrote:
> 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)

s/-1/SVN_INVALID_REVNUM/

> > + {
> > + /* 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"));

"No revision information found" sounds a bit like something went
wrong, as in, Subversion was looking for information that was
expected to be present but it didn't find the information.
What about "Uncommitted local addition, copy, or move%s" instead?

Stefan

> > + 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)

-- 
printf("Eh???/n");
Received on 2010-03-30 23:04:44 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.