Re: `svnadmin create` on an existing set of source files

Daniel Sahlberg <[email protected]>
Newsgroups gmane.comp.version-control.subversion.user
Message-ID <CAMHy98P8K3FLJEDy2gDtPzsOQvsOsa05D6m+Zu3Ud_mM=8DhsQ@mail.gmail.com>
ons 22 maj 2024 kl. 05:28 skrev Jeffrey Walton <[email protected]>:

> Hi Everyone,
>
> I have my source files in /var/test-svn. The test-svn directory has
> *.h and *.c files. I am trying to create a repo from them.
>
> As root, I perform the following:
>
>     # cd /var
>     # svnadmin create --fs-type fsfs test-svn
>     svnadmin: E200011: Repository creation failed
>     svnadmin: E200011: Could not create top-level directory
>     svnadmin: E200011: 'test-svn' exists and is non-empty
>
> I think I am missing something from my reading, like at
> <
> https://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.html#svn.ref.svnadmin.c
> >
> and <https://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.create.html>.
> My apologies for my rusty knowledge of subversion. I've been stuck in
> the git world for far too long.
>
> So the question is, how do I create a repo from an existing set of
> project files?
>
> Jeff



Be aware of a difference between Git and Subversion:
In Git, there is only a "repository" (which contains both the history in
the .git directory and all source files).
In Subversion, the "repository" is a specific directory (containing the
history for each file) and then you checkout a separate directory "working
copy" where you have the actual source files.

So you need to do

cd /var
svnadmin create test-repo
svn import test-svn file:///var/test-repo

You can the check out a new working copy

svn co file:///var/repo wc

Hope this helps!

Kind regards
Daniel Sahlberg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.