The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Subversion "svn add" Command

DelzhandDelzhand Registered User, Transition Team regular
edited April 2009 in Help / Advice Forum
I'm working on a project where I'm constantly adding new files, and I'm still new to SVN. If I have a directory called Graphics and it contains a bunch of files (already currently part of the repository), and I add a new file to that directory, what happens with svn add Graphics? Will it just add the new files? Will it create duplicate svn entries for existing files? Is there any way to just have SVN add all new files on a commit?

Delzhand on

Posts

  • admanbadmanb unionize your workplace Seattle, WARegistered User regular
    edited March 2009
    Delzhand wrote: »
    I'm working on a project where I'm constantly adding new files, and I'm still new to SVN. If I have a directory called Graphics and it contains a bunch of files (already currently part of the repository), and I add a new file to that directory, what happens with svn add Graphics? Will it just add the new files?

    It just adds the new files. You get a bunch of messages like, "X is already in in the SVN repository."
    Will it create duplicate svn entries for existing files? Is there any way to just have SVN add all new files on a commit?

    I don't think so. The whole point of "add" is that SVN isn't aware those files exist until you add them. Think of SVN as an alternate filesystem, where files only exist if they've been explicitly added and therefore tagged with metadata.

    admanb on
  • EchoEcho ski-bap ba-dapModerator, Administrator admin
    edited March 2009
    Make a habit of using "svn status" to check the current status. Files flagged "?" are unknown to SVN.

    What OS are you on? There are plenty of graphical SVN clients that make it easier for you.

    Echo on
  • DelzhandDelzhand Registered User, Transition Team regular
    edited March 2009
    Vista. I've used TortoiseSVN before, I just like to use the command line so I know how the underlying program works. The first time I used Tortoise I really screwed things up because I didn't know what I was doing.

    Delzhand on
  • DelzhandDelzhand Registered User, Transition Team regular
    edited April 2009
    Okay, new question. I plugged in a USB drive the other day, and somehow it stole the F: designation that my portable hard drive used to have. Now I can't update my SVN repository because that drive is now E:.

    Delzhand on
  • JHunzJHunz Registered User regular
    edited April 2009
    Disk Management (Start-Run->diskmgmt.msc, or through Administrative Tools) should allow you to assign specific drive letters, even to removable drives. By default, Windows will just use the next available, but if one is specifically assigned (and available) it will use that.

    JHunz on
    bunny.gif Gamertag: JHunz. R.I.P. Mygamercard.net bunny.gif
  • DelzhandDelzhand Registered User, Transition Team regular
    edited April 2009
    Yeah, the weird thing is that F isn't in the list. Even if I plug the USB drive back in, it now gets G:.

    Delzhand on
Sign In or Register to comment.