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

Re: [PATCH] Ignore the fact that a file is versioned when -F is passed to a subcommand different then 'commit'

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-01-27 05:15:05 CET

"Sander Striker" <striker@apache.org> writes:
> Here a small patch to only check if the logfile is versioned
> when the subcommand is commit.

Hmmm... Can you tell us a little more about the motivation? Did you
run into a situation where you used -F <versioned_file> with some
command other than commit, and the overeager protection got in your
way?

Thanks,
-K

> Log:
> * subversion/clients/cmdline/main.c
>
> (main): only check to see if there is anything special about
> -F <filename> if the subcommand is commit.
>
> Index: subversion/clients/cmdline/main.c
> ===================================================================
> --- subversion/clients/cmdline/main.c
> +++ subversion/clients/cmdline/main.c Sat Jan 26 16:41:57 2002
> @@ -904,35 +904,6 @@
> }
> }
>
> - /* If the log message file is under revision control, that's
> - probably not what the user intended. */
> - if (log_under_version_control && (! opt_state.force))
> - {
> - svn_handle_error
> - (svn_error_create
> - (SVN_ERR_CL_LOG_MESSAGE_IS_VERSIONED_FILE, 0, NULL,
> - pool,
> - "Log message file is a versioned file; use `--force' to override."),
> - stderr,
> - FALSE);
> - svn_pool_destroy (pool);
> - return EXIT_FAILURE;
> - }
> -
> - /* If the log message is just a pathname, then the user probably did
> - not intend that. */
> - if (log_is_pathname && !opt_state.force)
> - {
> - svn_handle_error (svn_error_create (SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME,
> - 0, NULL, pool,
> - "The log message is a pathname "
> - "(was -F intended?); use `--force' "
> - "to override."),
> - stderr, FALSE);
> - svn_pool_destroy (pool);
> - return EXIT_FAILURE;
> - }
> -
> /* If we made it this far, then we definitely have the subcommand,
> so call it. But first check that it wasn't passed any
> inappropriate options. */
> @@ -950,6 +921,38 @@
> svn_pool_destroy(pool);
> return EXIT_FAILURE;
> }
> +
> + if (subcommand->cmd_func == svn_cl__commit)
> + {
> + /* If the log message file is under revision control, that's
> + probably not what the user intended. */
> + if (log_under_version_control && (! opt_state.force))
> + {
> + svn_handle_error
> + (svn_error_create (SVN_ERR_CL_LOG_MESSAGE_IS_VERSIONED_FILE,
> + 0, NULL, pool,
> + "Log message file is a versioned file; "
> + "use `--force' to override."),
> + stderr, FALSE);
> + svn_pool_destroy (pool);
> + return EXIT_FAILURE;
> + }
> +
> + /* If the log message is just a pathname, then the user probably did
> + not intend that. */
> + if (log_is_pathname && !opt_state.force)
> + {
> + svn_handle_error
> + (svn_error_create (SVN_ERR_CL_LOG_MESSAGE_IS_PATHNAME,
> + 0, NULL, pool,
> + "The log message is a pathname "
> + "(was -F intended?); use `--force' "
> + "to override."),
> + stderr, FALSE);
> + svn_pool_destroy (pool);
> + return EXIT_FAILURE;
> + }
> + }
>
> err = (*subcommand->cmd_func) (os, &opt_state, pool);
> if (err)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:00 2006

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.