RE: [viewvc-users] MySQL DB is not getting updated
Ravi K Pattalachinti <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Message-ID | <8FAB309499DDCD4089AFCB82097125793C3CDD82__47316.3636903793$1265739528$gmane$org@NAMAIL02.gs.adinternal.com> |
I think I am getting close to an answer. Here is the tortoise error report and the post-commit.bat file. I think REPOS and REV are not getting the correct data. Any ideas? ////////////////////////post-commit.bat///////////////////////////////// REPOS="$1" REV="$2" "c:\Python26\python.exe" "C:\Program Files (x86)\viewvc-1.0.9\bin\svndbadmin" update \ "$REPOS" "$REV" /////////////////////////////////////////////////////////// Error: post-commit hook failed (exit code 1) with output: Error: 'REPOS' is not recognized as an internal or external command, Error: operable program or batch file. Error: 'REV' is not recognized as an internal or external command, Error: operable program or batch file. Error: c:\Python26\lib\site-packages\MySQLdb\__init__.py:34: DeprecationWarning: the sets module is deprecated Error: from sets import ImmutableSet Error: ERROR: revision "$REPOS" is not numeric Error: Error: Usage: 1. svndbadmin [-v] rebuild REPOSITORY [REVISION] Error: 2. svndbadmin [-v] update REPOSITORY [REVISION] Error: Error: 1. Rebuild the commit database information for REPOSITORY across all revisions Error: or, optionally, only for the specified REVISION. Error: Error: 2. Update the commit database information for REPOSITORY across all revisions Error: or, optionally, only for the specified REVISION. This is just like Error: rebuilding, except that no commit information will be stored for Error: commits already present in the database. Error: Error: Use the -v flag to cause this script to give progress information as it works. /////////////////////////////////////////////////////////////////////////////////// -----Original Message----- From: C. Michael Pilato [mailto:[email protected]] Sent: Tuesday, February 09, 2010 10:54 AM To: Pattalachinti, Ravi Cc: [email protected] Subject: Re: [viewvc-users] MySQL DB is not getting updated Ravi, .EXE files have a fixed and non-human-readable format. You can't just throw a batch script on your server with a .EXE file extension and expect stuff to work. You need to name your hook "post-commit.bat". Ravi K Pattalachinti wrote: > To begin with, I used the "post-commit" hook that was located on the SVN server repository location(C:\Repositories\SVN\hooks). But I was getting the following error during tortoise commits from the client machine. > > Error Failed to start 'C:/Repositories/SVN/Hooks/post-commit.exe' hook > > ---> > Note:- Is tortoise trying to find post-commit.exe on client machine instead of server? > > > Here is line that I added to post-commit.exe hook. > > "c:/Python26/python.exe" "C:/Program Files (x86)/viewvc-1.0.9/bin/svndbadmin" update \ "$REPOS" "$REV" > > > -----Original Message----- > From: C. Michael Pilato [mailto:[email protected]] > Sent: Tuesday, February 09, 2010 10:01 AM > To: Pattalachinti, Ravi > Cc: [email protected] > Subject: Re: [viewvc-users] MySQL DB is not getting updated > > Okay, that explains everything. Subversion uses its own hook script system for this kind of thing -- your CVSROOT directory has no meaning in Subversion whatsoever. You'll want to read the bit in the ViewVC INSTALL > file that begins "To publish Subversion commits into the database:" And > I'd recommend reading up on Subversion hooks in general: > http://svnbook.red-bean.com/en/1.5/svn.reposadmin.create.html#svn.repo > sadmin.create.hooks > > > Ravi K Pattalachinti wrote: >> We migrated all the CVS data to SVN using CVS2SVN. I am not using CVS on this new machine. It does not have CVS on it. I found that all the CVS system related files are now placed under the folder CVSROOT after migration to SVN. I used the file 'loginfo' which I found under CVSROOT\ folder in the migrated repository. Is there a different location that I need to look for the logfile on SVN system? >> >> -----Original Message----- >> From: C. Michael Pilato [mailto:[email protected]] >> Sent: Tuesday, February 09, 2010 9:38 AM >> To: Pattalachinti, Ravi; ViewVC Users >> Subject: Re: [viewvc-users] MySQL DB is not getting updated >> >> Ravi, >> >> Your original mail claims that you ran "svndbadmin" and it generated all the logs that were in "the cvs". I can't tell if by "the cvs" you mean Concurrent Versions System (CVS), which is one of the two version control systems that ViewVC can connect to; of if you meant "the vcs" as a shorthand for "the version control system". >> >> Sorry if I'm stating the obvious, but CVS is a completely different version control system than Subversion. >> >> Below, you refer to "the subversion server". So it *sounds* like you're using Subversion here, not CVS. But then you claim to have modified the file CVSROOT/loginfo, which is a completely CVS thing and has no meaning whatsoever in Subversion. At this point, I'm thoroughly confused. >> >> Are you using both CVS and Subversion? Which one(s) are giving you trouble in your MySQL checkins database? What have you done to try to configure that system? >> >> >> Pattalachinti, Ravi wrote: >>> I am using Visual SVN Server 1.7.3 which has Subversion : 1.6.3. >>> >>>> "Really?! I would have assumed that "cvsdbadmin" was needed. (Did >>>> you copy-n-paste that command-line into your mail, or try to recall it from memory?)" >>> I ran it from windows cmdline (yes I copied it) But I did not understand your thought. Did you mean I should not have run this? If so the query.cgi was not displaying the already existing cvs logs that were migrated to subversion. Also, if I run it again I am sure it will display the new checkins that were made to the subversion server. >>> >>> Also: >>> >>> I changed the line in the loginfo file as per your recommendations but it is still not working. I did not find the %p in the install document but still I went ahead and added it. Do you want it to be added somewhere else? >>> >>> ALL "C:\Python26\python.exe" "C:\Program Files >>> (x86)\viewvc-1.0.9\bin\loginfo-handler" %{sVvp} >>> >>> For some reason it is not updating the mySQL database dynamically. Where can I look for the related error log files? >>> >>> Thanks, >>> Ravi >>> >>> -----Original Message----- >>> From: C. Michael Pilato [mailto:[email protected]] >>> Sent: Monday, February 08, 2010 10:26 PM >>> To: Pattalachinti, Ravi >>> Cc: [email protected] >>> Subject: Re: [viewvc-users] MySQL DB is not getting updated >>> >>> Ravi K Pattalachinti wrote: >>>> I have setup ViewVC 1.0.9 on apache 2.2.14. >>>> >>>> MySQL is version 5.1 python is 2.6. This is all done on Windows 2003 >>>> 64 bit OS. >>>> >>>> It is all working fine but the updates are not getting logged into >>>> the “viewvc” database. >>>> >>>> When I ran the following command it did create all the logs that >>>> were in the cvs. >>>> >>>> C:\Program Files (x86)\viewvc-1.0.9\bin> c:\Python26\python.exe >>>> svndbadmin rebuild "C:\Repositories\SVN" >>> Really?! I would have assumed that "cvsdbadmin" was needed. (Did >>> you copy-n-paste that command-line into your mail, or try to recall >>> it from memory?) >>> >>>> I added the following line into loginfo file but it is still not working. >>>> >>>> Here is how the CVSROOT\loginfo file looks like right now:- >>>> >>>> # CVSROOT\loginfo file ################## >>>> # s = file name >>>> # V = old version number (pre-checkin) >>>> # v = new version number (post-checkin) >>>> # >>>> # For example: >>>> >>>> ALL "C:\Python26\python.exe" "C:\Program Files >>>> (x86)\viewvc-1.0.9\bin\loginfo-handler" %{sVv}; >>> What version of CVS are you using? ViewVC's INSTALL file says you >>> need to also include the "%p" variable in that loginfo line. (Also, >>> not sure if that trailing semicolon is needed or valid.) >>> >> >> -- >> C. Michael Pilato <[email protected]> >> CollabNet <> www.collab.net <> Distributed Development On Demand >> >> ------------------------------------------------------ >> http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId >> = >> 2446191 >> >> To unsubscribe from this discussion, e-mail: [[email protected]]. > > > -- > C. Michael Pilato <[email protected]> > CollabNet <> www.collab.net <> Distributed Development On Demand > > ------------------------------------------------------ > http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId= > 2446205 > > To unsubscribe from this discussion, e-mail: [[email protected]]. -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2446213 To unsubscribe from this discussion, e-mail: [[email protected]].