|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Update working copy from hook scriptI'm trying to update a working copy by having svn update executed during a post-commit script after the repo has been committed to by another wc. I have a script that executes svn update, but it only works when I run it directly in the command line. It gets an error and stops when the hook script is called automatically by svn. I'm executing "SVNPATH/svn update fullPathToWC" but I'm not sure why it only works from command line.
------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414790 To unsubscribe from this discussion, e-mail: [users-unsubscribe@...]. |
|
|
Re: Update working copy from hook script> I'm trying to update a working copy by having svn update executed
> during a post-commit script after the repo has been committed to by > another wc. I have a script that executes svn update, but it only > works when I run it directly in the command line. It gets an error > and stops when the hook script is called automatically by svn. I'm > executing "SVNPATH/svn update fullPathToWC" but I'm not sure why it > only works from command line. It's probably filesystem permissions. The hook runs as the user the server is running as and that user must have read/write access to the wc path being updated and EVERYTHING within it. Check your permissions. -- Jeremy Whitlock http://www.thoughtspark.org ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414794 To unsubscribe from this discussion, e-mail: [users-unsubscribe@...]. |
|
|
RE: Re: Update working copy from hook scriptIs the user you're referring to the same as the svn author? I did a svnlook author command and it returns the same as when i execute from the command line.
Otherwise, I'm not really sure where to look to change file permissions. SVN is being run by Apache on a Win2k server. > > I'm trying to update a working copy by having svn update executed > > during a post-commit script after the repo has been committed to by > > another wc. I have a script that executes svn update, but it only > > works when I run it directly in the command line. It gets an error > > and stops when the hook script is called automatically by svn. I'm > > executing "SVNPATH/svn update fullPathToWC" but I'm not sure why it > > only works from command line. > > > It's probably filesystem permissions. The hook runs as the user the > server is running as and that user must have read/write access to the > wc path being updated and EVERYTHING within it. Check your permissions. > > -- > Jeremy Whitlock > http://www.thoughtspark.org ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414924 To unsubscribe from this discussion, e-mail: [users-unsubscribe@...]. |
|
|
Re: Update working copy from hook scriptYou realize the the hooks are executed on the server machine and not
the client. This means that hooks do not have access to the user's working directory where the original "svn co" took place. Are you, by chance, executing your script on the client's machine logged in as the client? That may be why your script works, but not as a hook script. That's why there's the "svnlook" command. It allows you to examine various files without having a working copy. On Thu, Nov 5, 2009 at 12:00 PM, Tyler <tyler.badorrek@...> wrote: > I'm trying to update a working copy by having svn update executed during a post-commit script after the repo has been committed to by another wc. I have a script that executes svn update, but it only works when I run it directly in the command line. It gets an error and stops when the hook script is called automatically by svn. I'm executing "SVNPATH/svn update fullPathToWC" but I'm not sure why it only works from command line. > > ------------------------------------------------------ > http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2414790 > > To unsubscribe from this discussion, e-mail: [users-unsubscribe@...]. > -- David Weintraub qazwart@... ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2415498 To unsubscribe from this discussion, e-mail: [users-unsubscribe@...]. |
|
|
Re: Update working copy from hook scriptOn Nov 5, 2009, at 15:27, Tyler wrote:
>>> I'm trying to update a working copy by having svn update executed >>> during a post-commit script after the repo has been committed to by >>> another wc. I have a script that executes svn update, but it only >>> works when I run it directly in the command line. It gets an error >>> and stops when the hook script is called automatically by svn. I'm >>> executing "SVNPATH/svn update fullPathToWC" but I'm not sure why it >>> only works from command line. >> >> It's probably filesystem permissions. The hook runs as the user the >> server is running as and that user must have read/write access to the >> wc path being updated and EVERYTHING within it. Check your >> permissions. > > Is the user you're referring to the same as the svn author? No: the user the server-side working copy is owned by, which should be the user your Subversion repository is served by... > Otherwise, I'm not really sure where to look to change file > permissions. SVN is being run by Apache on a Win2k server. ...which will be the user your Apache server is running as. On Linux this could be "nobody" or "www" or "apache"; I don't know what it will be on a Windows server. Another likely candidate is that you have not specified authentication details, e.g. with the --username and --password options. When you run the script yourself, it uses your cached credentials, but your Apache web server probably has not been a Subversion client before and so doesn't have any credentials cached. More generally, you need to direct both the stdout and the stderr of the svn command in the script to some useful place, like a log file, so that you can find out exactly what's going on. ------------------------------------------------------ http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2415685 To unsubscribe from this discussion, e-mail: [users-unsubscribe@...]. |
| Free embeddable forum powered by Nabble | Forum Help |