Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have done this

svn import c:\myproj file:///c:/svn/myproj

I then deleted myproj in repo

Then I do again

svn import c:\myproj file:///c:/svn/myproj

It works but gives a revision number 2 whereas I would like it to restart at 1.

Is it possible ?


share|improve this question
up vote 5 down vote accepted

No. The first import is still part of your repository. You could revert to it if you wished -this si what revision control does. If you are really on revision number 2 at this point and made a mistake on the first import, I would just delete the entire repository and recreate it.

share|improve this answer
What if the repository has other projects ? – asksuperuser Oct 29 '09 at 15:13
If the repository has other projects, the second import of myproj wouldn't give a revision number of 2. Each commit/import in a svn repository increments the revision number. This is a design choice of svn you have to live with. – mouviciel Oct 29 '09 at 15:56

You will need to open a new project repository if you want to make it revision 1 again.

share|improve this answer

I'm curious as to why you'd want to do this in the first place? The revision number has no hidden meaning, it's simply an arbitrary (albeit sequential) number pointing to a specific point in time.

Of course, if you really want to anyway, I'd suggest just manually deleting the entire repository and creating it again.

share|improve this answer
Yes it's arbitrary but why not give it a version meaning by controlling it :) – asksuperuser Oct 29 '09 at 18:38
@asksuperuser: you're certainly welcome to try, but it isn't designed for that. there are other ways to set meaningful version numbers in SVN. not to be mean, but the phrase that comes to mind is "you're doing it wrong". – quack quixote Oct 29 '09 at 19:21

You must log in to answer this question.