Why can't SVN find the repository location for revison 0

11,959

Solution 1

This appears to be the expected result for checking the diffs on a file without any changes. I was expecting a result like "the file is up to date", but going back to an older version of TortoiseSVN on a different workstation that I was confident was still working gave me the same result for an unedited file.

Solution 2

Your first revision (revision 0) probably doesn't have the "trunk", "branches", or "tags" directories. They are usually added in the initial check-in (revision 1).

As such, if you have "svn switch"-ed into one of those directories (typically one does this to the "trunk" directory), then asking for revision 0 on that directory would correctly give you an error message that the path "<svnrepo>/trunk" can't be found in revision 0, so it can't pull that revision and still honor the previous "svn switch" command.

Try "svn switch" to the project name, without going into any sub-directories, and I'll bet you can then pull up revision 0.

Solution 3

$ svnadmin create /path/to/repos

This creates a new repository in the directory /path/to/repos. This new repository begins life at revision 0, which is defined to consist of nothing but the top-level root (/) filesystem directory. Initially, revision 0 also has a single revision property, svn:date, set to the time at which the repository was created.

Share:
11,959
BIBD
Author by

BIBD

Oh gawd, I never fill these out

Updated on July 25, 2022

Comments

  • BIBD
    BIBD almost 2 years

    I've recently upgraded the version of SVN and TortoiseSVN that I have installed on my workstation and whenever I check the diffs on a file without any changes, I get the following error.

    Unable to find repository location for "<path>" in revision 0
    

    I've checked out a fresh copy of one of my projects (I've tried it on a few), and it still gives me the same result.

    I've tried upgrading SVN on my work station in hopes it would fix the problem (I assumed an incomparability) - no dice.

    I also tried re-installing TortoiseSVN completely - again, no dice.

    The only other funny thing I've done is move the location of the original repository (stored in on the file system, not a DB). But its path is the same as the error message, so I believe it's finding the repository.

    What else could be the cause?

  • BIBD
    BIBD over 12 years
    Should that matter if I've checked out a new copy from the repository in its new location, and it's this new copy I'm having trouble with?
  • Edwin Buck
    Edwin Buck over 12 years
    Not really. Unless you checkout the "root" of the repository, you shouldn't expect to get a good checkout of revision 0. In revision 0, typically only the "root" of the repository exists. It's all the stuff that is added later (in other revisions) which add non-root paths and files.
  • Edwin Buck
    Edwin Buck over 12 years
    Please remember, "trunk", "branches", "tags", etc. are not built into subversion, they are items checked into the repository after it has been created. They're typically not there in revision 0. That means you can't check them out (by any means) in revision 0, not even by the means of checking out "myserver/myproject/trunk". For revision 0, only a "myserver/myproject" checkout would make sense.
  • BIBD
    BIBD over 12 years
    Are you saying the error message is the expected result when you do a diff on file that hasn't changed? (note: I've reworded my question since you you answered)
  • Lazy Badger
    Lazy Badger over 12 years
    Expected for 0 resision, because it's special case - you can see in svn log filename when file really appeared in repo (it must be rev 1 or 2, I think) - see in my example repo history of mayorat.ursinecorner.ru:8088/svn/Hello/trunk/Hello.en.txt
  • Chris Kent
    Chris Kent over 11 years
    +1 for checking the diffs on a file without any changes. This is what was causing me problems for me trying to diff with previous version when the file didn't actually have a previous version. It was a file that had been added once, and in the hundreds of revisions later had not been modified at all.