[PATCH] Ignore the fact that a file is versioned when -F is passed to a subcommand different then 'commit'
From: Sander Striker <striker_at_apache.org>
Date: 2002-01-27 03:34:17 CET
Hi,
Here a small patch to only check if the logfile is versioned
Sander
---
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
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.