[viewvc-users] RE: Using an Existing ViewVC mySQL db during SVN conversion
"Pattalachinti, Ravi" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.viewcvs.user |
|---|---|
| Message-ID | <4772654C5143C84EB88BB606DD15F715B1E805@NA-MAIL-3.gs.adinternal.com> |
Oh ok, thanks for the clarification. That saves us a lot of time. -----Original Message----- From: C. Michael Pilato [mailto:[email protected]] Sent: Wednesday, November 03, 2010 4:52 PM To: Pattalachinti, Ravi Subject: Re: Using an Existing ViewVC mySQL db during SVN conversion You are still misunderstanding a simple fact: "rebuild" is *the same thing* as running "purge" (which deletes all the db information for a given repository) and then running "update" without a revision range. You will not need to run a full update, because your rebuild will have just done that very same work. Your process should instead be: 1) disable the line of code that does updates to the viewvc db in the post-commit hook. 2) run Python.exe svndbadmin rebuild “c:\repositories\SVN” 3) enable the line of code in the post-commit hook that was disabled in step 1. It's that simple. On 11/03/2010 06:32 PM, Pattalachinti, Ravi wrote: > I do use the revision parameter in the post commit hook. > > However, during conversion process if I understood right this is what > you told me to do:- > > 1) Comment the line of code that does updates to the viewvc db in the post commit hook. > 2) run Python.exe svndbadmin rebuild “c:\repositories\SVN” and all users to commit changes to SVN. > 3) run Python.exe svndbadmin update “c:\repositories\SVN” --------> > 4) remove the commented code that updates viewvc in the post-commit hook. > > task 3 is taking long time even if there are only few commits. I wanted to know if 1.1.7 had a fix for this. > > -----Original Message----- > From: C. Michael Pilato [mailto:[email protected]] > Sent: Wednesday, November 03, 2010 2:36 PM > To: Pattalachinti, Ravi > Cc: [email protected] > Subject: Re: Using an Existing ViewVC mySQL db during SVN conversion > > Update will always take a long time if you don't tell the script to only pay attention to certain revisions. When you run 'svndbadmin update' from a post-commit hook, you can pass it the revision that is passed to the post-commit hook: > > -----------------------[ post-commit ]------------------------------ > #!/bin/sh > > REPOS="$1" > REV="$2" > > /usr/local/viewvc/bin/svndbadmin update ${REPOS} ${REV} > > -------------------------------------------------------------------- > > This will limit the update to just that one revision. > > On 11/03/2010 05:06 PM, Pattalachinti, Ravi wrote: >> In the previous version (1.0.11), the update used to take very long time even if there were no new commits during rebuild. Is the fixed in 1.1.7? >> >> -----Original Message----- >> From: C. Michael Pilato [mailto:[email protected]] >> Sent: Wednesday, November 03, 2010 6:04 AM >> To: Pattalachinti, Ravi >> Cc: [email protected] >> Subject: Re: Using an Existing ViewVC mySQL db during SVN conversion >> >> Yes, you must constantly update the db when data in Subversion changes. >> Most folks do this with a post-commit hook that runs 'svndbadmin update'. I would enable this hook immediately after your initial 'svndbadmin rebuild' >> completes. And yes, your users can be committing to the repository while all of this stuff is happening. >> >> >> On 11/02/2010 10:13 PM, Pattalachinti, Ravi wrote: >>> So does that mean I have to run 'update' after the 'rebuild' to get new updates by users into ViewVC db? If so, while running the 'Update' can users be logged on and committing there changes? When do I turn on the post-commit hook updates? >>> >>> >>> =============================================================== >>>> c)If this is also not possible: Can the dev team start working on >>>> SVN the repository as I run the 2 steps above? >>> >>> Yes, with caveats. 'svndbadmin' can be run in parallel with other repository activity, and of course, Subversion is completely ignorant of ViewVC's database. So your devs can do their Subversion work without this database population getting in the way. Now, most admins configure their Subversion post-commit hook to run 'svndbadmin update REV' (so that ViewVC's MySQL database stays up-to-date as new revisions are committed). If you plan to do the same, you'll probably want to comment out that bit of the hook while 'svndbadmin rebuild' does its initial population. >>> ==================================================================== >>> = >>> = >>> == >>> >>> -----Original Message----- >>> From: C. Michael Pilato [mailto:[email protected]] >>> Sent: Monday, October 25, 2010 5:42 PM >>> To: Pattalachinti, Ravi >>> Cc: [email protected] >>> Subject: Re: Using an Existing ViewVC mySQL db during SVN conversion >>> >>> On 10/25/2010 05:14 PM, Pattalachinti, Ravi wrote: >>>> We are getting close to migrate the cvs data to svn. >>>> >>>> The ViewVC conversion is adding 4 days in the downtime. Can you >>>> recommend any suggestions? >>>> >>>> In order for ViewVC to work with new SVN repository here is what I do: >>>> 1)Python.exe svndbadmin rebuild “c:\repositories\SVN” >>>> 2)Python.exe svndbadmin update “c:\repositories\SVN” >>> >>> [I'm assuming you are installing ViewVC 1.1.0 or better.] >>> >>> Running 'svndbadmin rebuild' is essentially the same as running 'svndbadmin purge' + 'svndbadmin update'. So unless there are new Subversion revisions being added to the repository while 'rebuild' is running, you needn't immediately follow that with an 'update'. >>> >>>> Here are the questions: >>>> >>>> a) We already did couple of trial conversions on our live data, and >>>> I have the ViewVC database from our last trial. Our plan is to do a >>>> full final conversion of cvs data to svn before closing the cvs repository. >>>> Can we use the existing ViewVC log database that was generated from >>>> previous trial conversion or should I redo step 1 and 2 again after >>>> final conversion? >>>> >>>> b)If not : Can I run only step 2 above to get only the new updates >>>> since the last conversion? >>> >>> That really depends on what cvs2svn does by way of conversion. Let's say that your trial conversion resulted in N Subversion revisions. If the first N revisions of your final cvs2svn run are identical to the N revisions created in your trial run, then yes, you should be able to just resume MySQL population from revision N+1. If not, then you run the risk of the MySQL data being misaligned with the final repository data. >>> >>>> c)If this is also not possible: Can the dev team start working on >>>> SVN the repository as I run the 2 steps above? >>> >>> Yes, with caveats. 'svndbadmin' can be run in parallel with other repository activity, and of course, Subversion is completely ignorant of ViewVC's database. So your devs can do their Subversion work without this database population getting in the way. Now, most admins configure their Subversion post-commit hook to run 'svndbadmin update REV' (so that ViewVC's MySQL database stays up-to-date as new revisions are committed). If you plan to do the same, you'll probably want to comment out that bit of the hook while 'svndbadmin rebuild' does its initial population. >>> >>> -- >>> C. Michael Pilato <[email protected]> >>> CollabNet <> www.collab.net <> Distributed Development On Demand >>> >> >> >> -- >> C. Michael Pilato <[email protected]> >> CollabNet <> www.collab.net <> Distributed Development On Demand > > > -- > C. Michael Pilato <[email protected]> > CollabNet <> www.collab.net <> Distributed Development On Demand > -- C. Michael Pilato <[email protected]> CollabNet <> www.collab.net <> Distributed Development On Demand ------------------------------------------------------ http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2678534 To unsubscribe from this discussion, e-mail: [[email protected]].