FlashTrava
FlashTrava

Reputation: 119

How could I Checkout to Already downloaded project

I have already downloaded whole project files but without svn folders/files. How could I update/checkout it from link to repository to get svn?

SVN is trying to download and replace every file I'm already have.

Upvotes: 0

Views: 60

Answers (2)

ptitpion
ptitpion

Reputation: 156

It seems the --force flag does exactly what you want.

cd your_work_dir
svn checkout --force URL .

the help command

svn help checkout

gives:

If --force is used, unversioned obstructing paths in the working
copy destination do not automatically cause the check out to fail.
If the obstructing path is the same type (file or directory) as the
corresponding path in the repository it becomes versioned but its
contents are left 'as-is' in the working copy. This means that an
obstructing directory's unversioned children may also obstruct and
become versioned. For files, any content differences between the
obstruction and the repository are treated like a local modification
to the working copy. All properties from the repository are applied
to the obstructing path.

Safest option is to do a new checkout with destination directory. You can specify the destination directory in second argument:

svn checkout URL[@REV] [PATH]

exemple

svn checkout http://your_svn_server/project/trunk proj_wc

Maybe another option (not sure what it will really do) is :

svn checkout --depth=empty URL

to get just the .svn datas. You can then just list what to checkout with command

svn list

Upvotes: 1

bahrep
bahrep

Reputation: 30662

Run svn checkout against the existing files. If these files are identical to the youngest revision in the repository, Subversion won't fetch them again and you will get fully-functional working copy.

Otherwise just perform clean checkout from the repository.

Upvotes: 0

Related Questions