Re: [PATCHES]: factor dvcs_common.py out of git_run_options.py, git_output_option.py

Michael Haggerty <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
Greg Ward wrote:
> Oops, I forgot to normalize the URLs to use 'tip' rather than the
> latest changeset ID.  Here is what I meant to send:
> 
> 1) Factor module dvcs_common.py out of git_output_option.py.
>     http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/create-dvcs-common.patch
> 2) git_run_options: reduce differences with svn_run_options.
>     http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/git-run-like-svn.patch
> 3) Factor DVCSRunOptions out of GitRunOptions.
>     http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/dvcs-run-options.patch
> 4) Move code for analyzing fixup commits to DVCSOutputOption.
>     http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/move-fixup-analysis.patch
> 5) Factor MirrorUpdater out of GitRevisionWriter and move it to dvcs_common.py
>     http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/mirror-updater.patch

Maybe I goofed, but when I apply these patches, test 145 from the test
suite fails (see results below).  Also, please apply the attached patch
on top of your first patch.

Michael

CMD: /usr/bin/python /home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2git
--blobfile=cvs2svn-tmp/blobfile.out --dumpfile=cvs2svn-tmp/dumpfile.out
--username=cvs2git test-data/main-cvsrepos exited with 1
<TIME = 0.552476>
Traceback (most recent call last):
  File "/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2git", line 70,
in <module>
    git_main(os.path.basename(sys.argv[0]), sys.argv[1:])
  File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/main.py", line
108, in git_main
    run_options = GitRunOptions(progname, cmd_args, pass_manager)
  File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/dvcs_common.py",
line 30, in __init__
    RunOptions.__init__(self, progname, cmd_args, pass_manager)
  File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/run_options.py",
line 264, in __init__
    self.process_options()
  File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/dvcs_common.py",
line 73, in process_options
    self.process_encoding_options()
AttributeError: 'GitRunOptions' object has no attribute
'process_encoding_options'

/usr/bin/python said:

   Traceback (most recent call last):
     File "/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2git", line
70, in <module>
       git_main(os.path.basename(sys.argv[0]), sys.argv[1:])
     File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/main.py", line
108, in git_main
       run_options = GitRunOptions(progname, cmd_args, pass_manager)
     File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/dvcs_common.py",
line 30, in __init__
       RunOptions.__init__(self, progname, cmd_args, pass_manager)
     File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/run_options.py",
line 264, in __init__
       self.process_options()
     File
"/home/mhagger/self/proj/cvs2svn/cvs2svn-git/cvs2svn_lib/dvcs_common.py",
line 73, in process_options
       self.process_encoding_options()
   AttributeError: 'GitRunOptions' object has no attribute
'process_encoding_options'

EXCEPTION: RunProgramException
Traceback (most recent call last):
  File "/home/mhagger/self/proj/cvs2svn/cvs2svn-git/svntest/main.py",
line 1151, in run
    rc = self.pred.run(sandbox)
  File "./run-tests.py", line 842, in run
    return self.func()
  File "./run-tests.py", line 3465, in main_git
    'test-data/main-cvsrepos',
  File "./run-tests.py", line 698, in __init__
    self.stdout = run_cvs2git(error_re, *args)
  File "./run-tests.py", line 184, in run_cvs2git
    return run_program(sys.executable, error_re, cvs2git, *varargs)
  File "./run-tests.py", line 146, in run_program
    raise RunProgramException()
RunProgramException
FAIL:  run-tests.py 145: test output in git-fast-import format

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2386845

To unsubscribe from this discussion, e-mail: [[email protected]].
boilerplate.diff (text/x-diff, 1.6 KB)
diff --git a/cvs2svn_lib/dvcs_common.py b/cvs2svn_lib/dvcs_common.py
index 997f7ea..35f35e0 100644
--- a/cvs2svn_lib/dvcs_common.py
+++ b/cvs2svn_lib/dvcs_common.py
@@ -1,3 +1,19 @@
+# (Be in -*- python -*- mode.)
+#
+# ====================================================================
+# Copyright (c) 2007-2009 CollabNet.  All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution.  The terms
+# are also available at http://subversion.tigris.org/license-1.html.
+# If newer versions of this license are posted there, you may use a
+# newer version instead, at your option.
+#
+# This software consists of voluntary contributions made by many
+# individuals.  For exact contribution history, see the revision
+# history and logs, available at http://cvs2svn.tigris.org/.
+# ====================================================================
+
 """Miscellaneous utility code common to git_output_option.py and
 hg_output_option.py."""
 
@@ -5,8 +21,8 @@ from cvs2svn_lib.common import FatalError
 from cvs2svn_lib.context import Ctx
 from cvs2svn_lib.output_option import OutputOption
 
-class DVCSOutputOption(OutputOption):
 
+class DVCSOutputOption(OutputOption):
   # name of output format (for error messages); must be set by
   # subclasses
   name = None
@@ -37,9 +53,11 @@ class DVCSOutputOption(OutputOption):
           '%s output requires a default commit username' % self.name
           )
 
+
 def to_utf8(s):
   if isinstance(s, unicode):
     return s.encode('utf8')
   else:
     return s
 
+
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.