views:

462

answers:

5

I am trying to setup TortoiseSVN, I am using the windows version and using the context menu, you right click and it has some options, for initially getting my files into to repo I try to do export and it is the only thing that makes it seem like it is working, it shows in the log

Adding filepath
but eventually when it gets to the jquery file thats in my directory I get an error and everything comes to a stop.

How can I get around this?

Update: sorry I meant import not export

+7  A: 

Export is not what you think it is. It's used to get the files that are already in the repository without the extra versioning data.

For my initial import, I usually just

  1. Create a new repository.
  2. Checkout the empty repository.
  3. Copy my files in empty, checkout directory.
  4. Commit.

I've never had an issue doing it this way.

This is essentially the same as the Import in place section of the TortoiseSVN manual. Except that I copy the files in after checkout to avoid the warning.

Ben S
usually much easier than doing import!
crashmstr
A lot of people do this because they don't know of the alternative - you can actually just check out a new empty repo right over top of your code, and voila, working copy.
RedFilter
+1 — `svn import` is a nice idea, but I've not yet found a situation where it's superior to what the TortoiseSVN docs call "Import in Place" (basically what's described here). This is *always* how I add new (sub-)projects to existing repositories.
Ben Blank
@Ben Blank: I just added a URL to the import in place as you commented.
Ben S
for nuber 2) Checkout empty directory, I look at that link and it shows a URL, maybe that is where my trouble is, mine is not on the net, it is local?
jasondavis
That's okay. To checkout from a local directory, simply use file:///C:/Path/to/your/repo as the location. As explained here: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-repository.html#tsvn-repository-local-access
Ben S
thanks for all the tips unfortunately I guess this just doesnt work on my PC, I can follor your direction and the direction in the link to the T and I still get errors like this "Error url/path/here Doesn't exist" when I try to run the checkout process, I have tried every possible combination of file paths and URL's and they are correct but it just does not want to work on my PC, the only time I was successful in getting any files to show up into the repo browser was by using the "Import" button
jasondavis
+1  A: 

The TortoiseSVN site has help on this topic:

Importing Data Into A Repository

The "Import in Place" method will be easiest.

--By the way, "export" in subversion is a way to get an unversioned copy of your code out of your repository.

crashmstr
+1  A: 

Actually, I'm not sure what "export" does, but if you use "import" instead, you will at least be able to get your files into the repository. Doing it this way will not make the folder you imported a svn-folder, so you will have to check it out manually afterwards. I guess it's just the same as Ben S's answer, just in other steps.

l3dx
Export checks out a copy of the files from the repo, without making the checked out version an SVN folder. If I remember correctly.
Ben S
@Ben S: You remember correctly. It's useful for web-apps and the like, as you can export a copy to a Document Root on your test or QA servers.
R. Bemrose
It's also useful to zip up to distribute the source.
Ben S
@Ben S: Of course! :) How could I forget. I've used it lots of times!
l3dx
+2  A: 

The reason I don't like using import is that you don't end up with a working copy after doing the import. When I have been working on some code and decide I want to add it to a new repository, I just check out the new (empty) repository over top of my existing code. Once you have done that, you have turned your code into a working copy and you can now add and commit (or ignore) any files you want. Much simpler than import, IMO.

RedFilter
That is actually a very good reason! I've always been using import and thought that the initial checkout+commit to start it off was a weird method, but your explanation is perfect!
Maxim Zaslavsky
A: 

I use TortoiseSVN as my source control tool. I was also having some trouble learning how to use it at first, but it's quite simple:

  1. When you first get started, you need to create a repository: In Windows Explorer, browse to the place you want to create the repository (I store it on an external hard drive) and in the TortoiseSVN context menu click "Create repository here."
  2. To import your code into the repository, there are two methods:
    • Browse to where your code is currently located and select the command TortoiseSVN --> Import to import that directory into a repository of your choosing.
    • You can create a new repository (as explained above), do a checkout, insert your files into the checked-out directory, and do a commit (applies your changes back to the repository).
  3. In daily use, you're going to be using the checkout command to export changes from the repository (not the "export" command) and using the commit command to apply your changes. You may also be using the comparer tools built-in to TortoiseSVN to resolve conflicts between changes.
  4. Another common command is the export command, which exports the entire repository as it is at the current time.

It seems a bit strange that it's giving you an error in that way. Could you please explain?

Maxim Zaslavsky