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

Re: [PATCH] issue 576 (specifying -F without any files to commit)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: 2001-12-06 08:06:58 CET

On Wed, 5 Dec 2001, Garrett Rooney wrote:

> If the user specified a log message via -F, but didn't specify any files
> to commit, error out, because it probably isn't what they wanted to do.

That's not how I interpret issue 576. Isn't that to take things a bit too
far? I mean, my problem (as I actually made this mistake) wasn't that I could
do "svn commit -F descfile" to commit everything in the directory, my problem
was rather that I mistyped the commit message file with the file I was gonna
commit ("cvs commit -F svn.1"). (Thanks to tab-completion in the shell, its
very easily done!)

Thus, I would rather say that checking that the commit message is not a
versioned file is what it takes to prevent the same mistake from happening
again. At least that's how I see it and that's how I read issue 576.

> Add a new error code, SVN_ERR_CL_POTENTIAL_USER_ERROR, for cases when the
> effect of the command given is almost certainly not what the user wants
> to do.

Hm, isn't error codes usually better off trying to specify the error, not the
assumed reason for why? Also, I don't think a generic help string like "I do
not think that means what you think it means" is gonna be very helpful.
Imagine a case where you run a lot of commands in a script, and that error is
what gets spit out. Would anyone have any clue what the error message is
about?

I suggest something in this style:

   SVN_ERR_CL_COMMIT_MESSAGE_IS_VERSIONED_FILE
   "The commit message is a file under version control. Use --force to
   override"

This will of course also imply a different fix...

-- 
      Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77
   ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol
---------------------------------------------------------------------
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:36:51 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.