Re: subversion won’t add new files
From: Ryan Schmidt <subversion-2014_at_ryandesign.com>
Date: Wed, 24 Sep 2014 12:42:29 -0500
On Sep 24, 2014, at 11:59 AM, John Maher wrote:
> Thanks for the links Ryan, but I've read through chapter 4. Can't say I understand through chapter 4, but reading it again will unlikely produce better results. Maybe in a couple of years.
The impression I got from your first messages was "this tool does not work correctly"; I was trying to transform that to "I don't understand how to use this tool correctly" and to help you address that. I apologize that I'm not communicating well.
As you've read, the "svn add" command is mentioned in Chapter 2, where it says "sometimes you need to add, remove, copy and move files and directories—the svn add, svn delete, svn copy, and svn move commands handle those sorts of structural changes"; "svn add FOO" is documented a few paragraphs later: "Use this to schedule the file, directory, or symbolic link FOO to be added to the repository." Further discussion and examples follow in the rest of the chapter.
You previously mentioned Subversion adding files you didn't want it to. "svn add" only schedules for addition those files that you tell it to, and you can review that and even change your mind (using "svn revert") before committing, so the only cause of this that I can think of is running "svn import". "svn import"'s job is to bring all of an existing unversioned directory's files into your repository, minus any files whose names are matched by the global ignores. If there were files in that directory that you didn't want to add that weren't matched by your global ignores, that would explain files getting committed that you didn't want in the repository.
"svn import" is something of a special-case command, used only in the limited circumstance of getting an existing unversioned directory of files into your repository, and even for that use case, you don't have to use "svn import"; an alternative is the "in-place import" process:
http://subversion.apache.org/faq.html#in-place-import
In short, you make an empty directory in the repository (with "svn mkdir"), then turn your unversioned directory into a working copy pointing to that empty directory in the repository (with "svn checkout"), then you "svn add" the files what you want. This has the advantage of giving you the opportunity of reviewing (with "svn status") exactly what files will be included before they get into the repository, and letting you refine that by "svn add"ing additional files or "svn revert"ing files you didn't mean to add. This more closely matches the normal Subversion workflow, in which you make changes (i.e. "svn add" unversioned files, or edit or "svn mv" or "svn rm" versioned files), then review (with "svn status" and "svn diff") before committing (with "svn commit").
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.