On Mar 13, 2008, at 01:54, Hellen wrote:
> On Wed, Mar 12, 2008 at 2:10 AM, Ryan Schmidt wrote:
>
>> On Mar 12, 2008, at 03:15, Hellen wrote:
>>
>> > On Tue, Mar 11, 2008 at 11:31 PM, Hilco Wijbenga wrote:
>> >
>> >> On Tue, Mar 11, 2008 at 11:19 PM, Hellen wrote:
>> >>
>> >>> svn: warning: '.' is not a working copy
>> >>
>> >> I don't think "svn info" is the problem, it's the ".". Your
>> current
>> >> directory is presumably the directory of the pre-commit script. I
>> >> doubt that's what you meant.
>> >>
>> >> The pre-commit script gets 2 arguments, try using those.
>> >
>> > Thanks for your help. But I have also tried using "svn info"
>> > without the ".", but It still doesn't work.
>> >
>> > I changed the following in the start-commit:
>> > --------------------------------
>> >
>> > echo `pwd` >&2
>> > svnurl=`/usr/bin/svn info |grep "^URL: "`
>> > echo "svnurl:$svnurl" >&2
>> > ---------------------------------
>> >
>> > and here is the result:
>> > --------------------------------
>> > /home/svn_user
>> > svn: '.' is not a working copy
>> > svnurl:
>> > --------------------------------
>> >
>> > but I run "svn commit" at: /home/svn_user/tstchout/svn_mirror/
>> > testrepo1/trunk/Scripts.test
>>
>> That's the directory on your client...
>>
>> > somehow, It just cannot recognize the location of the current
>> > directory.
>> > does anyone have any idea on this ?
>>
>> ...but the hook scripts run on the server. The hooks cannot affect
>> your client's working copy.
>>
>> > BTW: I tried those 2 arguments in pre-commit, it just gives me the
>> > transaction number and the repository path not my current location.
>>
>> Correct. The hook does not know the path to the client's working
>> copy.
>>
>> Let's ask a different question: What are you trying to accomplish?
>> Maybe there's a different way to go about it.
>
> thanks for the help. actually, I want to get the current directory
> path from "svn info " while using "svn commit". so I can write a
> script for auto switch (svn switch --relocate from_URL To_URL)
> from the mirror side to master side.
Right, and I responded in another thread yesterday that that's not
going to happen because the hook script runs on the server but the
working copy is on the client, and that I think the way to solve your
issue is to use the write-thru proxy feature in Subversion 1.5.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-13 07:57:58 CET