0

Argh, somebody (OK, my boss) added and commited all the files in his directory, meaning all the svn files: conf/, db/, format, hooks/, locks/... I'm using Tortoise, so I tried clicking on each one and doing revert, it said OK, but I still see all of them under version control after update/commit.

We are now several versions past that. How do I clean things up ? Thanks

alroc
  • 27,574
  • 6
  • 51
  • 97
dargaud
  • 2,431
  • 2
  • 26
  • 39

1 Answers1

2

In Subversion, "revert" means to undo uncommitted changes to a working copy. What you're looking to do is to (effectively) undo a commit. This is normally done in Subversion with a reverse merge

Assuming that your boss did everything in a single commit (revision REVNUM), you'll just do the following in your working copy:

svn merge -c -REVNUM URL_TO_REPOSITORY_LOCATION

Then commit the new revision. All changes made in REVNUM will no longer be visible in the HEAD revision, and your revision history will show the changes committed, then merged back out.

Use the TortoiseSVN Merge context menu item to step through the same process.

alroc
  • 27,574
  • 6
  • 51
  • 97
  • Thanks, I'll know that for next time. Since I have access to the server, I did a dump/restore instead. I had to do a new checkout then but that's OK. – dargaud Feb 03 '15 at 10:26
  • A dump/load is one of the most disruptive things you can do to your repository and users, and anything but the right way to do what you had to do. Look at it like open heart surgery - you don't get into it unless you **have** to. – alroc Feb 03 '15 at 14:07
  • 1
    For a repo with a very small audience (one developer and his boss, right?), this can be ok, though; especially when confidential documents have been committed which must not at all appear in it. However, the repo ID should normally be restored to the old value (before resuming usage; not in this case anymore), especially when many working copies exist. – Tobias Dec 07 '16 at 10:23