Copy, move and delete files using TortoiseSVN NOT Windows Explorer

Recently, I’ve been helping, or at least trying to help, a few people who are new to version control and SVN who’ve been having trouble. The problems range from folders not sync’ing with the server to files missing or having been deleted among others. Now, it’s not the fault of TortoiseSVN nor are these things specific to TortoiseSVN but I think it’s related to how well it integrates with Windows Explorer that leads to these issues.

If you’re a command line junkie this isn’t going to be of much use so continue right on browsing. But, if you do all your file manipulations, cut, copy, paste move etc. from within Windows Explorer then this is for you.

DO NOT…

  • Copy files using Explorer
  • Move files using Explorer
  • Delete files using Explorer
  • Drag/drop files using Explorer
image

If you have files checked into SVN then you need to use SVN commands to manipulate those files. One overlooked capability of TortoiseSVN is right click copy/move where you can right like folders in Explorer and drag them to a new location which will display this context menu (to the right) allowing you to select the operation of your choice. Whatever you do me sure that you’re using the TortoiseSVN commands and not messing around with files using the standard Explorer copy/move/delete otherwise you’ll be in for a world of hurt.

6 thoughts on “Copy, move and delete files using TortoiseSVN NOT Windows Explorer

  1. Could you provide some more detail? I have found that Tortoise’s Rename command does nothing different than a delete/add which is the same effect I get if I use Windows Explorer and then tick off the files when I commit.
    In fact I have found Tortoise’s menu option to have two disadvantages:
    * It doesn’t work if the file has been modified
    * As often as not I do my renames inside the DE
    Marc

  2. Interesting, but hardly unexpected. I would anticipate that once a file is being managed by source control, then source control needs to be used to do whatever is to be done that alters the location or name of the file.
    Or, I should say, that makes good sense with move or rename operations, but I am not sure why it would apply to copy, so long as the original remains where source control expects it to be.

  3. Hi Marc,
    The problem is this:
    – I rename my file using Explorer and continue working on it.
    – You make changes (using the old filename) and commit them
    – I then use SVN Update and suddenly the file I renamed is back, so I delete it and check in the renamed file losing your changes.
    At this point, I’ve just overwritten your changes which is exactly the problem I just fixed and is what prompted this post.
    My point here is I believe if you clearly communicate that people need to stick to using SVN commands then they’ll likely be much better off than if they unknowingly mess around with Explorer commands AND SVN commands.

  4. That’s why I hate explorer integration… better a client on its own, although I still have to find a good one for SVN, RapidSVN is one of the slowest projects I’ve ever seen, and eSVN looks to be almost dead on Windows…

Comments are closed.