Re: About migration of reviewboard V 1.0.5.1

2010-03-31 Thread JohnHenry
The New server is Linux version 2.6.9-78.ELsmp (Red Hat 3.4.6-10) ;
and patch version is patch 2.5.4
and The old machine is Linux version 2.4.20-8 (Red Hat Linux 3.2.2-5)
and patch version is also patch 2.5.4.

In the tmp dir reviewboard.6D8dUl/ there are four files.
---
myfile.py.diff
 1 Index: tools/review_board_install/cvs2rb/cvs_hook_script.py
  2
===
  3 RCS file: /export/home/cvsroot/tools/review_board_install/
cvs2rb/cvs_hook_script.py,v
  4 retrieving revision 1.2
  5 retrieving revision 1.3
  6 diff -u -r1.2 -r1.3
  7 --- tools/review_board_install/cvs2rb/cvs_hook_script.py
2010/03/17 02:29:21 1.2
  8 +++ tools/review_board_install/cvs2rb/cvs_hook_script.py
2010/03/18 08:08:40 1.3
  9 @@ -1,156 +1,34 @@
 10  #! /usr/local/bin/python
 11  import sys
 12  import os
 13 -import commands
 14 -import string
 15  import time
 16 -import logging
 17 -
 18 -
 19 -#- GET PATH
INFO
 20 -from cvs_hook_script_config import get_path_info
 21 -from cvs_hook_script_config import get_sys_info
 22 -from cvs_hook_script_config import get_log_html
 23 -from random import randint
 24 -from os.path import exists
 25 -from logging import handlers
 26 -
 27 -
 28 -FILE_GENERATOR_LOW= get_sys_info("FILE_GENERATOR_LOW")
 29 -FILE_GENERATOR_HIGH   = get_sys_info("FILE_GENERATOR_HIGH")
 30 -LOG_FILE_PATH = get_path_info("LOG_FILE_PATH")
 31 -ERROR_INFO_PATH   = get_path_info("ERROR_INFO_PATH")
 32 -LOG_HTML_PATH = get_path_info("LOG_HTML_PATH")
 33 -DATE_FORMAT   = "%Y-%m-%d %A %H:%M:%S"
 34 -
 35 -
 36 -
 37 -#-- USEFUL
FUNCTIONS
 38 -def is_usable(parameter_info):
 39 -"""
 40 -Judging whether this commit log is New directory or
imported source.
 41 -"""
 42 -if (parameter_info.find("- New directory")!=-1) or
(parameter_info.find("- Imported Sources")!=-1):
 43 -information = "CVS_CM_LOG.PY In CVS2RB. Notice: There
is a commit of NewDectionary Or ImportedSource. \
 44 -Parameter is: %s\n" % parameter_info
 45 -Logger.info(information)
 46 -return False
 47 -else:
 48 -return True
 49 -
 50 -def get_file_name():
 51 -"""
 52 -Generating log file name.
 53 -"""
 54 -low = int(FILE_GENERATOR_LOW)
 55 -high= int(FILE_GENERATOR_HIGH)
 56 -file_name_part = str(randint(low, high))
 57 -file_name  = file_name_part + ".cminfo"
 58 -while( exists(LOG_FILE_PATH + file_name) ):
 59 -file_name_part = str(randint(low, high))
 60 -file_name  = file_name_part + ".cminfo"
 61 -return file_name
 62 -
 63 -def get_committer_name(parameter_info):
 64 -"""
 65 -Fetch the committer's name.
 66 -"""
 67 -file_list = parameter_info.split(" ")[1:]
 68 -if not file_list:
 69 -error_info =  "CVS_CM_LOG.PY In CVS2RB. Kernel Error:
There is no file info in this commit parameter: \
 70 -' %s '\n" % parameter_info
 71 -Logger.critical(error_info)
 72 -print error_info
 73 -sys.exit()
 74 -file_info_list = file_list[0].strip().split(",")
 75 -if len(file_info_list) !=4:
 76 -error_info = "CVS_CM_LOG.PY In CVS2RB. Kernel Error:
Some file info in this commit parameter: \
 77 -' %s ' is Not Complete or Too Much! \n" %
parameter_info
 78 -Logger.critical.write(error_info)
 79 -print error_info
 80 -sys.exit()
 81 -return file_info_list[-1].strip()
 82 +import commands
 83
 84 +from cvs_hook_rb import generate_rb_log
 85 +from cvs_hook_weblog import generate_weblog_xml
 86
 87 +DATE_FORMAT  = "%Y-%m-%d %A %H:%M:%S"
 88
 89  #-SCRIPT BODY
 90 -Logger  = logging.getLogger('CVS_HOOK_SCRIPT_LOGGER')
 91 -Root_Format = logging.Formatter("%(message)s")
 92 -Sub_Format  = logging.Formatter("%(asctime)s %
(levelname)-8s> %(message)s")
 93 -exec_error_path= ERROR_INFO_PATH + "cvs_cm_log_error.log"
 94 -log_hdr =
handlers.TimedRotatingFileHandler(exec_error_path,'D',30,1)
 95 -log_hdr.setFormatter(Root_Format)
 96 -Logger.addHandler(log_hdr)
 97 -Logger.setLevel(logging.DEBUG)
 98 -#exec_error_file = open(exec_error_path, "a")
 99 -exec_error_file_begin =
"\nNEW_EXECUTION=BEGIN
\n"
100 -Logger.info(exec_error_file_begin)
101 -Logger.info(sys.argv[1]+ "\n")

Re: About migration of reviewboard V 1.0.5.1

2010-03-31 Thread Christian Hammond
I'd have to see the files in that temp directory to really be able to
diagnose why this is happening.

What OS/distro is on the new server? What version of patch?

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com


On Wed, Mar 31, 2010 at 8:16 AM, JohnHenry  wrote:

> Hi, all.
>I am doing migration of reviewboard from one machine to another.
>We had installed a new reviewboard the other machine ,and then
> backup mysql database into this machine mysql.
>   From source machine, do:
> ./mysqldump -uroot  -h 127.0.0.1 -P 3309 --default-character-set=utf8 -
> B reviewboard >mysql_reviewboard.sq
>  And then at the destinate machine:
>   mysql -uroot -h 127.0.0.1 reviewboard < /home/review_board/bin/
> mysql/bin/mysql_reviewboard.sql
>   After some configuration, The reviewboard on the other machine can
> be access then( We had change the destinate machine IP the same with
> source machine IP)
>   But when We want to open the "view diff " page, It always report
> the like:
> --
> Traceback (most recent call last):
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/views.py", line
> 153, in view_diff
>interdiffset, highlighting, True)
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
> line 623, in get_diff_files
>large_data=True)
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> Djblets-0.5.9-py2.5.egg/djblets/util/misc.py", line 166, in
> cache_memoize
>data = lookup_callable()
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
> line 622, in 
>enable_syntax_highlighting),
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
> line 345, in get_chunks
>new = get_patched_file(old, filediff)
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
> line 261, in get_patched_file
>return patch(filediff.diff, buffer, filediff.dest_file)
>  File "/home/review_board/bin/python/lib/python2.5/site-packages/
> ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
> line 129, in patch
>(filename, tempdir, patch_output))
> Exception: The patch to 'test.c' didn't apply cleanly. The temporary
> files have been left in '/tmp/reviewboard.455uwf' for debugging
> purposes.
> `patch` returned: patching file /tmp/reviewboard.455uwf/tmpeddSyU
> Hunk #1 FAILED at 1.
> 1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.
> 455uwf/tmpeddSyU-new.rej
> -
>
> New added file has no such problem, It occures only on "patch" needed
> "diff views" page; I don't know why, What is the reason for this? And
> how to avoid this?
>
>
> Best Regards!
>
> --
> Want to help the Review Board project? Donate today at
> http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~--~~~~--~~--~--~---
> To unsubscribe from this group, send email to
> reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/reviewboard?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

About migration of reviewboard V 1.0.5.1

2010-03-31 Thread JohnHenry
Hi, all.
I am doing migration of reviewboard from one machine to another.
We had installed a new reviewboard the other machine ,and then
backup mysql database into this machine mysql.
   From source machine, do:
./mysqldump -uroot  -h 127.0.0.1 -P 3309 --default-character-set=utf8 -
B reviewboard >mysql_reviewboard.sq
 And then at the destinate machine:
   mysql -uroot -h 127.0.0.1 reviewboard < /home/review_board/bin/
mysql/bin/mysql_reviewboard.sql
   After some configuration, The reviewboard on the other machine can
be access then( We had change the destinate machine IP the same with
source machine IP)
   But when We want to open the "view diff " page, It always report
the like:
--
Traceback (most recent call last):
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/views.py", line
153, in view_diff
interdiffset, highlighting, True)
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
line 623, in get_diff_files
large_data=True)
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
Djblets-0.5.9-py2.5.egg/djblets/util/misc.py", line 166, in
cache_memoize
data = lookup_callable()
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
line 622, in 
enable_syntax_highlighting),
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
line 345, in get_chunks
new = get_patched_file(old, filediff)
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
line 261, in get_patched_file
return patch(filediff.diff, buffer, filediff.dest_file)
  File "/home/review_board/bin/python/lib/python2.5/site-packages/
ReviewBoard-1.0.5.1-py2.5.egg/reviewboard/diffviewer/diffutils.py",
line 129, in patch
(filename, tempdir, patch_output))
Exception: The patch to 'test.c' didn't apply cleanly. The temporary
files have been left in '/tmp/reviewboard.455uwf' for debugging
purposes.
`patch` returned: patching file /tmp/reviewboard.455uwf/tmpeddSyU
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file /tmp/reviewboard.
455uwf/tmpeddSyU-new.rej
-

New added file has no such problem, It occures only on "patch" needed
"diff views" page; I don't know why, What is the reason for this? And
how to avoid this?


Best Regards!

-- 
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~--~~~~--~~--~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en

To unsubscribe, reply using "remove me" as the subject.