Index: main.c =================================================================== --- main.c (revision 14778) +++ main.c (working copy) @@ -131,7 +131,7 @@ svn_error_clear (svn_cmdline_fprintf (stdout, pool, - _("usage: svnversion [OPTIONS] WC_PATH [TRAIL_URL]\n\n" + _("usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]\n\n" " Produce a compact 'version number' for the working copy path\n" " WC_PATH. TRAIL_URL is the trailing portion of the URL used to\n" " determine if WC_PATH itself is switched (detection of switches\n" @@ -154,6 +154,9 @@ " If invoked on a directory that is not a working copy, an\n" " exported directory say, the program will output 'exported'.\n" "\n" + " If invoked without arguments the WC_PATH will be the\n" + " current directory.\n" + "\n" "Valid options:\n"))); while (options->description) { @@ -283,13 +286,15 @@ } } - if (os->ind >= argc || os->ind < argc - 2) + if (os->ind > argc || os->ind < argc - 2) { usage(pool); return EXIT_FAILURE; } - SVN_INT_ERR (svn_utf_cstring_to_utf8 (&wc_path, os->argv[os->ind++], pool)); + SVN_INT_ERR (svn_utf_cstring_to_utf8 (&wc_path, + (os->ind == argc) ? "." : os->argv[os->ind++], + pool)); wc_path = svn_path_internal_style (wc_path, pool); SVN_INT_ERR (svn_wc_check_wc (wc_path, &wc_format, pool)); if (! wc_format) Index: svnversion.1 =================================================================== --- svnversion.1 (revision 14778) +++ svnversion.1 (working copy) @@ -6,7 +6,7 @@ svnversion \- Produce a compact version number for a working copy. .SH SYNOPSIS .TP -\fBsvnversion\fP wc_path [\fItrail_url\fP] +\fBsvnversion\fP [\fIwc_path\fP [\fItrail_url\fP]] .SH OVERVIEW Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of @@ -24,5 +24,4 @@ approaches and reasonings, etc., can be found at http://svnbook.red-bean.com/. -Run `svnversion' with no arguments to access the built-in tool -documentation. +Run `svnversion --help' to access the built-in tool documentation.