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

Re: [PATCH] make "svn help import" explain its DWIMness better

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-01-18 17:32:28 CET

I started to tweak this, wanting to apply it, but I found some ambiguities and
incompleteness.

Branden Robinson wrote:
> --- subversion-1.1.1/subversion/clients/cmdline/main.c~ 2004-09-09 17:19:58.000000000 -0500
> +++ subversion-1.1.1/subversion/clients/cmdline/main.c 2004-12-27 13:13:08.000000000 -0500
> @@ -319,8 +319,29 @@
> "usage: import [PATH] URL\n"
> "\n"
> " Recursively commit a copy of PATH to URL.\n"
> - " If PATH is omitted '.' is assumed. Parent directories are created\n"
> - " as necessary in the repository.\n"),
> + "\n"
> + "If PATH is not a directory, it is added to the repository at URL. If "
> + "URL is a\n"
> + "directory, the basename of PATH is added to it. If URL does not "
> + "exist, the\n"
> + "basename of PATH is added to the repository with the name URL (any "

It is not "the basename of PATH" that is added, but "the file identified by PATH".

> + "parent\n"
> + "directories in the repository must already exist).\n"

"any parent directories specified in URL must already exist in the repository"?

> + "\n"
> + "If PATH is a directory, it is recursed into and added to the "
> + "repository at URL.\n"

"and _its contents are_ added to the repository _under_ URL" (This wording is
true regardless whether URL already exists.)

> + "The basename of PATH itself is not added. If URL already exists, it "
> + "must be a\n"
> + "directory. Directory structure within PATH is created as necessary "

"Directory structure _beneath_ PATH" (not within the text "PATH").

What if URL does not already exist? If this is the same as in the "PATH is not
a directory" case, then factor it out.

> + "in the repository.\n"
> + "\n"
> + "If PATH is omitted, '.' is assumed.\n"
> + "\n"
> + " Examples:\n"
> + " svn import foo.c http://www.example.com/repo/project/\n"
> + " svn import foo.c http://www.example.com/repo/project/bar.c\n"
> + " svn import ../projects/foo/ http://www.example.com/repo/project/\n"
> + " svn import http://www.example.com/repo/project/\n"),

For these examples, what is the resulting URL, if the given URL already existed
and if it didn't?

Text should be indented by two spaces as it was before.

And I'll mention again my other comment that I feel the "PATH is a directoy"
case should be treated first because it is more common.

The reference section of the book (doc/book/book/ch09.xml) needs the same or a
similar description, and the note in the book that "the original tree is not
under version control" could usefully be repeated in this help text.

If you could work on this patch a bit more, that would be very helpful - it is
badly needed. If you don't have time, please just say so and maybe someone
else will be able to pick it up.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 18 17:36:13 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.