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

Re: [PATCH] new parameter option '--verbose' for 'svn update'

From: steveking <steveking_at_gmx.ch>
Date: 2005-09-29 21:29:58 CEST

Mathias.Weinert@gfa-net.de wrote:

> Hi there,
>
> as I sometimes wanted to know what 'svn update' will do and which was
> the current revision of my working copy I implemented a '--verbose'
> option for 'svn update' which provides these information:
>
> $ svn up -v myWorkingCopy/
> Current revision 409
> will be updated to revision 413.
> U foo.c
> A bar.c
> Updated to revision 413.
>
> The information is only shown when current revision is not the same as
> the new revision.
>
> If you find this option usefull I would be happy if you added it to
> subversion. If not, never mind.

I'd like such a feature too. Currently, I've got something similar
implemented in TSVN, but having this in Subversion would help.

> +++ subversion/libsvn_client/update.c 2005-08-18
> 10:25:19.672103100 +0200
> @@ -42,6 +42,7 @@
> svn_client__update_internal (svn_revnum_t *result_rev,
> const char *path,
> const svn_opt_revision_t *revision,
> + svn_boolean_t verbose,
> svn_boolean_t recurse,
> svn_boolean_t ignore_externals,
> svn_boolean_t *timestamp_sleep,
> @@ -134,6 +135,21 @@
> traversal_info,
> pool));
>
> + if(verbose)
> + {
> + svn_revnum_t revnumverbose = revnum;
> + if(revnumverbose < 0)
> + SVN_ERR (svn_ra_get_latest_revnum (ra_session, &revnumverbose,
> pool));
> + if(entry->revision != revnumverbose)
> + {
> + SVN_ERR (svn_cmdline_printf (pool, _("Current revision %ld\n"),
> + entry->revision));
> + SVN_ERR (svn_cmdline_printf (pool,
> + _("will be updated to revision
> %ld.\n"),
> + revnumverbose));
> + }
> + }

Yikes! Never, ever print something from within the library! You're only
allowed to print from within the cmdline client, but not the library.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 29 23:38:18 2005

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.