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

Re: svn import vs svn commit

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: 2007-08-31 17:42:15 CEST

On 8/31/07, Andy Levy <andy.levy@gmail.com> wrote:
>
> On 8/31/07, nikhil gupta <ng_g20@hotmail.com> wrote:
> >
> > So, does that mean I can execute "import" only once in the whole
> lifetime of
> > my repository?
>
> No, you can import at any time, but IIRC only into an empty directory.
> An import lets you load into a directory without already having a
> working copy. You also get to do it in one step - svn import instead
> of svn add then svn ci.
>
> See
> http://svnbook.red-bean.com/en/1.4/svn.tour.importing.html#svn.tour.importing.import
>

Another difference is that to do 'svn add' followed by 'svn commit', you
need to have a working copy checked out. And more importantly, it will leave
the added files as part of the working copy.

When you do an 'svn import', you don't need to have a working copy. But if
you do it from a working copy, the added files are not part of the working
copy until you check it out again.

Generally, the very first "commit" is done using an import -- because
usually the first commit has a large number of files. And after the import,
user checkout directories of interest and add/update/delete and commit. But
when you have a large number of files to be added to the repository, import
is a good option. I think the svn_load_dirs script (
http://svnbook.red-bean.com/en/1.1/ch07s05.html) that automates the vendor
drops uses import.

Regards,
-Hari Kodungallur
Received on Fri Aug 31 17:39:37 2007

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.