Reputation: 1114
I'm using VisualSVN Server to manage a source folder. It's installed on a Windows XP machine, and it has access to a network disk.
On this network disk named W:
, I made a checkout on a folder this way:
svn checkout https://server:443/svn/Project W:\Project --username=user --password=pass
I can now update this folder using this command:
svn update W:\Project
The problem is:
I want to add a post-commit hook running this command:
svn update W:\Project
but when I commit, this error appears:
At revision: 123
post-commit hook failed (exit code 1) with output:
svn: E020024: Error resolving case of 'W:\Project'
Any ideas ? I don't know if it's a good practice, my goal is to keep a copy of the project on another disk out of the svn server and back it up.
Upvotes: 3
Views: 10878
Reputation: 30662
Are you using the same working copy you want to update with the post-commit hook script?
You can't svn update
the same working copy you are working on with a post-commit hook. It has to be separate working copy. You may consider using svn export
command instead of svn update
.
Upvotes: 0
Reputation: 1114
Ok so actually it is possible to do an update on a post-commit action. The problem is that I try to save my repository on a network folder. The default account of VisualSVN service is NTAUTHORITY\NetworkService
that cannot access my disk. So I changed the user to a network account and now it works fine.
Upvotes: 1
Reputation: 111
The W: drive is probably not mapped in the environment that the script is running in. All hook scripts run with no environment variables set. You'll need to explicitly specify the server name for the file share or map the network drive in your script.
Upvotes: 4