I installed subversion on my Ubuntu server and I can use subclipse (1.6) in Eclipse Helios on Ubuntu and it works fine.
However when I try and use Subclipse (1.6) in Eclipse Helios on Windows, it doesn't work and I get errors.
In Windows when I use http://serverAddress/svn, I get an error saying folder doesn't exist and an error in the console saying:
Repository has been moved
svn: Repository moved permanently to 'http://serverAddress/svn/'; please relocate
When I use svn://serverAddress/svn, I get an issue as well.
Does anyone have any ideas?
This is not an Eclipse issue, but a SVN issue.
If you could see your repo in a web browser, the SVN FAQ mentions an httpd.conf error. But in your case:
either you haven't created a repository yet (see svnadmin create)
or you have a repo, but haven't create properly a directory in it, a bit like in this thread:
I then created a subdirectory "projectx" under ~/webapps/svn with subdirectories "trunk", "branches" etc and then ran:
$ svn import projectx file:///home/<user>/webapps/svn/projectx -m "first import".
projectx/trunk etc showed up fine on Trac, and https://svn.<user>.webfactional.com/projectx/ showed up fine in the browser, with proper authentication etc. All well and good.
However, when attempting to check out the project from trunk (using Tortoise SVN), I got this error:
Command: Checkout from https://svn.<user>.webfactional.com/projectx/trunk, revision HEAD, Fully recursive, Externals included
Error: Repository moved permanently to
Error: 'http://svn.<user>.webfactional.com/projectx/trunk/'; please relocate
With the solution being:
You've created directories on the filesystem below your repo, eg ~/webapps/svn/projectx. That's the wrong way.
You should instead use 'svn mkdir' to create the directories.
If this is not enough, see also this SO question, where it mentions that the repository address is usually http://servername/svn/repositoryname, not http://servername/svn.
Related
I have a very very large svn repo. When I try to use it (commit, update, etc.) it says there are locks.
When I run 'svn cleanup', it says that the working copy is too old and I need to upgrade it.
When I run 'svn upgrade', it runs, but doesn't say anything.
I also ran 'svnadmin upgrade' on the repo, just in case.
I have the latest TortoiseSVN installed.
Normally, if I had SVN weirdness, I'd move the files out, update, move the files back, but as I mentioned earlier, this is a very LARGE repo.
Any help would be appreciated.
Thanks!
Specific messages:
>svn update
svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
svn: E155004: Working copy '*****' locked.
svn: E155004: '*****' is already locked.
>svn cleanup
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at '*****' is too old (format 29) to work with client version '1.8.1 (r1503906)' (expects format 31). You need to upgrade the working copy first.
>svn upgrade
>
Update 1:
I installed a 1.7.X client and tried to run a cleanup. It complained that the repo wasn't a working copy, for some reason. I tried an update with the same 1.7.X client and got the following message:
>"c:\Program Files\SlikSvn\bin\svn.exe" update
svn: E155021: This client is too old to work with the working copy at '*****' (format 31).
You need to get a newer Subversion client. For more details, see http://subversion.apache.org/faq.html#working-copy-format-change
So, this client things the repo is format 31. The tortoisesvn thinks it is format 29. Now I'm more confused.
Update 2:
Response to #David W
Is this about a working copy or the repository?
Working copy. Though I tried svnadmin upgrade on the repo as well. However, the svnadmin I used was the 1.8.1. I just tried to upgrade the repo with the TortoiseSVN one (1.8.10), but that didn't fix the issue.
is this about a file that's locked because someone locked it, or because your working directory is locked due to an incomplete
I'm the only one using the repo, so I know no one else locked it. Its probably due to an incomplete op.
I ran svn status with 1.8.10, and nothing had a 'K'. There were some files with an 'L', and one with a '?'. All items listed were directories, not files, with the exception of the one marked with a '?'.
If I ran an 'svn lock --force dirname', it would respond that that specific node "is not a file". When I ran it on the file marked with a '?', it responded that that node 'was not found'.
Then, there is a locked working directory because of an incomplete operation...
Yep, you called it. That is why all the things are marked with an 'L', I gather.
When I ran a cleanup (1.8.10) it gave me the same error I reported in my intiial question (format 29 too old for this format 31 client).
Remember that you can always delete a working directory and create a new one
Yep. If I delete any directory in the working copy and hit update, it complains that it is locked. I can't clear the lock, 'cause of the format mismatch. I can theoretically just re-checkout the entire repo, then copy things back, but the repo is 12GB (210,000 files).
Be careful about mixing up Subversion clients
So, I was unaware that I had two clients, but I only only only use TortoiseSVN (1.8.10). I only discovered today that I had two when I was trying to troubleshoot.
* UPDATE 3: RESOLUTION *
Using #David W's tips, here is how I fixed the problem:
1) Backed up my .svn folder
2) Downloaded an SQLite editor from https://github.com/sqlitebrowser/sqlitebrowser/releases
3) Opened up my wc.db file and browsed the WC_LOCK table. There was 1 entry in that table, which I removed.
4) Tried running a cleanup using TortoiseSVN (1.8.10), which previously complained about locks. It finally worked!
5) Tried running commands in my repo (update, commit, etc.), and everything was happy.
Thank you to everyone who helped, especially #David W for not giving up on me.
I have a very very large svn repo. When I try to use it (commit, update, etc.) it says there are locks.
Is this about a working copy or the repository? Two different things. Also, is this about a file that's locked because someone locked it, or because your working directory is locked due to an incomplete
You can have a lock on a file that prevents you from doing a commit. From the command line, you can do a svn status and see the K next to the locked file. You can then use svn lock --force to steal that lock, and check in your changes. (As long as there's no hook in the repository that prevents you from stealing locks).
Then, there is a locked working directory because of an incomplete operation. In this case, you'll see an L when you do a svn status. In that case, you can usually do a svn cleanup in the root directory of that working copy (Where the .svn folder is located.)
Remember that you can always delete a working directory and create a new one. Be careful about mixing up Subversion clients. At one time, it didn't seem to matter that much, but in Revision 1.6, 1.7, 1.8, and 1.9, the structure of the working copy has changed and may not be compatible with clients running other revisions.
Update 2
Yep. If I delete any directory in the working copy and hit update, it complains that it is locked. I can't clear the lock, 'cause of the format mismatch. I can theoretically just re-checkout the entire repo, then copy things back, but the repo is 12GB (210,000 files).
Deleting a directory and then doing a svn up doesn't clean up the lock issue. I meant to delete the entire working directory, and redoing a svn co. You don't have to checkout the entire repo. You only have to check out what you need. Do you need all 210 thousand files? I doubt it:
$ svn co http://server/repo # NOOOO!
$ svn co http://server/repo/trunk # A bit better, but do you need all
# the projects under Trunk?
$ svn co http://server/repo/trunk/foo # Now, I'm just checking out foo
$ svn co http://server/repo/trunk/bar # Now, I'm just checking out bar
This checks out two working directories: One for foo and one for bar.
If you really, really want to checkout the entire trunk, use the --depth to sparsely checkout what you need:
# Checking out trunk, but only getting the project directories
$ svn co http://server/repo/trunk --depth=immediates
$ svn up --set-depth=infinity foo
$ svn up --set-depth=infinity bar
Here I am in theory checking out the entire trunk, but I'm only getting empty master project directories. I am only getting files from projectsfoo and bar. However, foo and bar share a working directory. Let's say I start a long update on foo, then I go to bar and try to commit. I'll get a warning that the working directory is locked. I can't do two separate Subversion commands on the same working directory even if they are in different sections of that working directory.
So, I was unaware that I had two clients, but I only only only use TortoiseSVN (1.8.10). I only discovered today that I had two when I was trying to troubleshoot.
If you install Tortoise, you can also install the Subversion command line client which is an optional install. I highly recommend it! Don't use a command line client downloaded from elsewhere (like SlikSVN or CollabeNet. It's not that these clients are bad. It's that you should use the command line client that comes with your version of TortoiseSVN in order to guarantee some parity between the two Subversion clients.
Cleanup vs. Upgrade vs. Svnadmin
It's very easy to get these confused. You shouldn't be using svnadmin commands on your working directory. The svnadmin is for the server. The issue you have is strictly client.
As Subversion moved from 1.6 to 1.7 to 1.8 and now to 1.9, the upgrade will upgrade your working directory to the new format. Once done, you cannot go back to the older format. You upgrade to the 1.8 format, 1.7 and 1.6 clients will no longer work.
Cleanup is to help remove locks due to incomplete Subversion client commands.
Context:
I have a Mac app. I want to include Git in this app because some functions of my app use Git and I don't want the user to have to install it on his machine.
I have downloaded Git from source. I edited the Makefile to declare these two lines:
NO_GETTEXT="yesPlease"
CURLDIR=/usr/local
The first line tells the build process to skip localizing and just use English.
The second line declares the path to where libcurl is installed. I downloaded libcurl_devel and built it from source. This is required to enable Git to pull/push from http and https repos.
Git builds successfully. I then copy all of the resulting files into my app's bundle. I'm using NSTask to run Git and attempt to pull an https://-based repo.
The Problem:
The error I get is:
fatal: Unable to find remote helper for 'https'
I googled this, and everyone said that as long as I had libcurl installed when I built Git, Git would work with HTTP and HTTPS addresses. And, in fact, if I run the installed Git from the command line, it does!
What I Need:
So, I must be missing a path setting or an environment variable or SOMETHING that tells Git where to find those remote helpers. They ARE in my app bundle; the screenshot below shows them:
So: what the hell do I need to set in order to resolve this problem when I run Git from within my application bundle?
Unbelievable. I've been trying to fix this for 8+ hours and five minutes after I finally break down and post this question, I figure it out:
Git has an option called --exec-path. I had been passing this argument to the NSTask like this (Where APP BUNDLE is replaced by the path to the application bundle on the user's machine):
--exec-path=[APP BUNDLE]/git/bin
Since bin was the folder where the Git binary was located, I figured that was the appropriate path. However, if I do this:
--exec-path=[APP BUNDLE]/git/libexec/git-core
It works.
Recently I installed Git (Using Bit bucket for repository). I configured everything according to different guides I found on the net, but whenever I use the command git push -u origin --all I get the following error:
The procedure entry point curl_multi_timeout could not be located in the dynamic link library libcurl.dll
Go to the folder where Git is installed (defalut: C:\Program Files\Git).
Copy the file "libcurl.dll" in Git installation folder (C:\Program Files\Git\bin\libcurl.dll).
Paste it in location where the git.exe exists (C:\Program Files\Git\libexec\git-core).
This should fix the issue, since now it will check for the lib in current executing folder before falling back to systems folder.
It looks like it's an OpenOffice conflict from their libcurl. From my understanding, Openoffice put an old libcurl.dll in the system directory.
Try to remove libcurl.dll from C:\Windows\sysWOW64 and/or C:\Windows\System32 (Reinstalling Git or uninstalling OpenOffice doesn't seem to fix the problem).
As a side note for anyone using pre-built libcurl in their projects: this can be caused because you have libcurl.dll in the root of the folder you are trying to push. Windows will load the library in your project folder before the one with Git first.
The solution is simple -- remove or move libcurl.dll in your project.
This is the same thing with the windows application installed in your local appdata directory.
To copy the file from :
C:\Users\YOUR-WINDOWS-COUNT\AppData\Local\GitHub\PortableGit_xxxx-A-BIG-NUMBER-XXXXXXXXXXXXX\libexec\git-core\bin\libcurl.dll
to the directory:
C:\Users\YOUR-WINDOWS-COUNT\AppData\Local\GitHub\PortableGit_xxxx-A-BIG-NUMBER-XXXXXXXXXXXXX\libexec\git-core
seems to work.
Follow these steps (this worked for my 64 bit win7):
a) Copy libcurl.dll from C:\Windows\sysWOW64\libcurl.dll
to some temporary location.
b) Remove libcurl.dll from C:\Windows\sysWOW64\libcurl.dll
c) Try cloning repository from Git Windows App.
Enjoy! :)
Remove libcurl.dll from C:\Windows
After that it worked
I was setting things up for http access. I was getting a similar error (libcurl-4.dll is missing) on the client. The fix turned out to be that some of the housekeeping files deep in the repository tree on the server were owned by 'root' rather than 'apache'. Correcting that corrected the missing curl error on the client.
For me (64 bit Windows7), uninstalling GIT and reinstalling it was the only solution that worked.
I'm developing on OSX, and one of my Subversion working copies just started returning the following error for all commands, however my other checkouts work fine. I get the same message with both my Brew installed SVN binaries as well as my Cornerstone client, but other working directories are fine.
> svn update
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: Working copy '/working_directory' is an old development version (format 12); to upgrade it, use a format 18 client, then use 'tools/dev/wc-ng/bump-to-19.py', then use the current client
> svn upgrade
svn: E155019: Can't upgrade '/working_directory' as it is not a pre-1.7 working copy directory
svn: E150000: Missing default entry
I don't have the bump-to-19.py script anywhere on my computer (according to find / -type f -name bump-to-19.py), however I think I was able to find it on the Apache repository. That said, I am not familiar with what it does, or how to use it. Ideally I can avoid checking out a new version of this working directory and manually merging in all of my (many) changes.
The only info I was able to find is related to Netbeans and javahl, and I'm using neither.
EDIT: After downloading the bump-to-19.py file and making it executable, I tried it against my working directory to no avail:
> ./bump-to-19.py working_directory/
error: format is 29 not 18: 'working_directory/'
Although I was not able to figure out why my working directory was corrupted, I was able to work around it using rsync - there is an option, C, that will ignore CVS/SVN files and directories when making a backup. I made a backup using this option, checked out the project again, and then copied the backup back over the new working directory. SVN is happy again.
> rsync -arC working_directory working_directory_no_svn
> rm -rf working_directory
> svn co https://svn.example.com/project/trunk working_directory
> rsync -ar working_directory_no_svn working_directory
I had the same issue and here is how I resolved:
Delete the .svn folder at the top level (rm -rf .svn)
Checkout software again from SVN (svn co ...)
Good to go!
I know this has been around a while, but I found a solution using the hints given by SVN... Basically use the upgrade command as it states. Using CMD, I went to my workspace folder where the troubled project was located. Lets call the project Project1. You call the command:
"svn upgrade project1"
this resolved my issue the proper way without involving some sort of hack or workaround.
I had a similar issue, my svn is version 1.7.10, however my Subversion plugin for Eclipse is slightly older, I'm assuming 1.6.something.
Using the "rsync -arC working_directory archive_no_svn" command was a breakthrough - at least now I had a copy of the hours of synchronisation I had just completed.
I tried using the "svn co" but it was the wrong version, so I simply ran an update using the Subversion plugin within Eclipse - this restored the working directory from the repository - pretty much what I was after, and it was the correct version.
Getting the rsync back to the correct location was a trick. rsync appears to drop the working folder into the archive location, creating archive_location/working_directory/the-files. So syncing the archived data back into the working_directory was achieved with:
rsync -ar archive_no_svn/working_directory .
Now I have to find out about upgrading my Subversion plugin for Eclipse to 1.7
Here's what I did, I have installed svnserve as a service and I started it with the net start svn service command. I typed svn ls svn://localhost to test the service but it returned the error as stated in the title of this post.
I entered svn --version and svnserve --version on my computer to find out the version numbers and the client and the server version is the same, version 1.5.6. I'm guessing the error appears due to different versions of the server and the client.
When I start the server using svnserve --daemon --root command in cmd, The error still appears.
Why does the error appear? Thanks
Which Subverson tool did you use to create the repository? TortoiseSVN? Your TortoiseSVN may be newer, a 1.6.x release, then your 1.5 command line client and svnserve, so svnserve 1.5.x cannot serve a 1.6.x repository.
In my fsfs repository created with svnadmin 1.6.1, the db/format file contains
$ cat repos/db/format
4
layout sharded 1000
I have the same problem but I had resolve it with a different approach
The issue mainly is the db/format file where it expects a "2" best way to check is to ope the file
$ vi db/format
If you get this
4
layout sharded 1000
Then you should change them to say
2
Its better to also check you current file
$ vi db/current
It you get only this (e.g. 0 meaning reviosion number 0)
0
Then you should change them to just say (e.g. 0 meaning revision number append "nx" and also "2" )
0 nx 2
Finally Check also if your directory structure for the revs and revprops is sharded or looks something like this
db/revs/0/0
change it to a non folder structure
db/revs/0
Note: the revision file (e.g. 0) is just inside the revs directory, no more other folder should be there
Same goes with revprops
change
db/revprops/0/0
to
db/revprops/0
I delete my old repository and create a new one using command line -> svnadmin create C:\SvnRepository
*old repository was created by right clicking on the folder and click "Create Repository here"
I installed (the Collabnet install of) SVN 1.5.5 and it was running fine with TortoiseSVN 1.6.1. After upgrading SVN to 1.6.2 I'm getting the same error (Expected fs format between ‘1’ and ‘3’; found format ‘4’) when I try to access it through Trac. This lends credibility to Blair's answer. I'll let you know how I get it running again.
Update: Blair's answer worked for me, too: the message says that an old version of SVN is trying to access the repository, so find it and delete it. The specifics for me were that the error only occurred when I used Trac, so I re-installed Trac on Windows (http://trac.edgewall.org/wiki/TracOnWindows) with the latest installer I could find (svn-python-1.6.1.win32-py2.5.exe) and deleted old eggs from the Python site-packages folder. After a reboot and resync, I was up and running again.
The latest version of Zend Studio (8.x) has an SVN tool which gives the same error about finding format 4, but expecting format 1-3. I had created my repository using CollabNet SVN (about a year ago) and was unable to open the repository from within Zend Studio.
I think the best solution (at least for my case where I want to work with Zend Studio and not fight with it) is to recreate your repository with the old version of SVN. The URL for SVN 1.3 for Windows is:
http://subversion.tigris.org/files/documents/15/32856/svn-1.3.2-setup.exe
After installing this, make sure you are executing the svnadmin.exe and svn.exe in the newly installed version 1.3 directory in case you have already installed CollabNet SVN (which has a default install directory of c:/csvn).
Make sure you are using the correct svnadmin. For example, if you installed VisualSVN, you will need to use the svnadmin located in the bin folder of the installation directory. I had installed the command line version of SVN...and when I used this version of the svnadmin tool, I got the same error.
Thanks, Joe. I had both CollabNet SVN server and VisualSVN installed and was getting errors until I made sure I was using the version of svnadmin that came with VisualSVN (which I had used to create the repositories).
I was able to fix this by updating Subversion on the server. I also made the adjustment on the db file. Then I pushed everything backup onto the server as an overwrite. I actually (on windows) did a checkout locally, then the files that were generated in creating that repo, I edited the db, then grabbed all files and pushed them up to SVN on the server.
That seemed to have done the trick.
well i have also faced the same problem.
just open your svn remote folder you have made.
in your db folder you have format file.
just replace the no. with 1.
if it does not work try 2, and 3.
If you are using VisualSVN server, Make sure your command looks similar as below
Sample Command:
C:\Program Files\VisualSVN Server\bin>svnadmin dump c:\repo > c:\backup\svnbacku
p.dump