subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Schmidt <subversion-2...@ryandesign.com>
Subject Re: subversion won’t add new files
Date Wed, 24 Sep 2014 17:42:29 GMT
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.
> 
> And I must mention that once you understand something you have a bias toward it, i.e.
the understanding.  To say it's clear does nothing to describe the state of it to someone
without your knowledge.  Plus it is not helpful to anyone who does not understand something
to say "works for me."  That is borderline combative and creates a rift threatening further
understanding.  I apologize if I took your comment wrong but it's important to me to help
you to improve your comments.  You can ignore me and that’s fine, I don't mind.  But if
I see an unuseful comment from someone who may wish to make only useful comments and I don't
help them then its shame on me.
> 
> And I would like to help with the book.  I don't believe I am at a level to do that properly
yet.  I have a long way to go.

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").





Mime
View raw message