List Info

Thread: Cvs2svn-1.5.1: getting error message "AttributeError: 'NoneType' object has no attribute 'date




Cvs2svn-1.5.1: getting error message "AttributeError: 'NoneType' object has no attribute 'date
user name
2007-02-07 12:18:16
Hi all,

I am using cvs2svn 1.5.1, from commandline it works nice,
but I need the
possibility to convert multiple cvs projects into one big
subversion
repository, so I need to use the options file for doing
that.
I have used the exact same paths in the options file for the
cvsrepos
and svnrepos etc which work on the commandline, but
everytime I start
the script with the options file, I just get the following
output in
pass 9:

------------------

C:Temp_exchange>python cvs2svn-1.5.1cvs2svn --options
cvs2svn.options
----- pass 1 (CollectRevsPass) -----
Examining all CVS ',v' files...
.
. ((cut out the filenames here))
.
Done
----- pass 2 (CollateSymbolsPass) -----
Checking for blocked exclusions...
Checking for forced tags with commits...
Done
----- pass 3 (ResyncRevsPass) -----
Re-synchronizing CVS revision timestamps...
Done
----- pass 4 (SortRevsPass) -----
Sorting CVS revisions...
Done
----- pass 5 (CreateDatabasesPass) -----
Finding last CVS revisions for all symbolic names...
Done
----- pass 6 (AggregateRevsPass) -----
Mapping CVS revisions to Subversion commits...
Done
----- pass 7 (SortSymbolsPass) -----
Sorting symbolic name source revisions...
Done
----- pass 8 (IndexSymbolsPass) -----
Determining offsets for all symbolic names...
Done.
----- pass 9 (OutputPass) -----
Creating new repository 'svnrepos/batch21'
Starting Subversion Repository.
Hallo
Traceback (most recent call last):
  File "cvs2svn-1.5.1cvs2svn", line 114, in
<module>
    main()
  File "cvs2svn-1.5.1cvs2svn", line 103, in main
    pass_manager.run, run_options.start_pass,
run_options.end_pass)
  File
"C:ProgrammePythonlibhotshot__init__.py",
line 76, in
runcall
  File
"C:Temp_exchangecvs2svn-1.5.1cvs2svn_libpass_manag
er.py",
line 122, in run
    the_pass.run(stats_keeper)
  File
"C:Temp_exchangecvs2svn-1.5.1cvs2svn_libpasses.py&
quot;, line
456, in run
    SVNInitialProjectCommit(svn_commit.date,
1).commit(repos)
AttributeError: 'NoneType' object has no attribute 'date'




------------------------------------------------------------
---
Does anyone have an idea? Here is my options file, I just
changed the
values in the sections which are marked with
"#marco":











# (Be in -*- python -*- mode.)
#
#
============================================================
========
# Copyright (c) 2006 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://s
ubversion.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
/.
#
============================================================
========

# An options file like this can be used to configure
cvs2svn.  The
# file is in Python syntax, but you don't need to know
Python to
# modify it.  But if you *do* know Python, then you will be
happy to
# know that you can use arbitary Python constructs to do
fancy
# configuration tricks.

# Two identifiers will have been defined before this file is
executed,
# and can be used freely within this file:
#
#     ctx -- a Ctx object (see cvs2svn_lib/context.py),
which holds
#         many configuration options
#
#     run_options -- an instance of the
OptionsFileRunOptions class
#         (see cvs2svn_lib/run_options.py), which holds some
variables
#         governing how cvs2svn is run


# Import some modules that are used in setting the options:
import re

from cvs2svn_lib.boolean import *
from cvs2svn_lib import config
from cvs2svn_lib.log import Log
from cvs2svn_lib.project import Project
from cvs2svn_lib.output_option import DumpfileOutputOption
from cvs2svn_lib.output_option import
ExistingRepositoryOutputOption
from cvs2svn_lib.output_option import
NewRepositoryOutputOption
from cvs2svn_lib.symbol_strategy import AllBranchRule
from cvs2svn_lib.symbol_strategy import AllTagRule
from cvs2svn_lib.symbol_strategy import BranchIfCommitsRule
from cvs2svn_lib.symbol_strategy import
ExcludeRegexpStrategyRule
from cvs2svn_lib.symbol_strategy import
ForceBranchRegexpStrategyRule
from cvs2svn_lib.symbol_strategy import
ForceTagRegexpStrategyRule
from cvs2svn_lib.symbol_strategy import
HeuristicStrategyRule
from cvs2svn_lib.symbol_strategy import
RuleBasedSymbolStrategy
from cvs2svn_lib.symbol_strategy import
UnambiguousUsageRule
from cvs2svn_lib.symbol_transform import
RegexpSymbolTransform
from cvs2svn_lib.property_setters import
AutoPropsPropertySetter
from cvs2svn_lib.property_setters import
BinaryFileDefaultMimeTypeSetter
from cvs2svn_lib.property_setters import
BinaryFileEOLStyleSetter
from cvs2svn_lib.property_setters import
CVSRevisionNumberSetter
from cvs2svn_lib.property_setters import
DefaultEOLStyleSetter
from cvs2svn_lib.property_setters import
EOLStyleFromMimeTypeSetter
from cvs2svn_lib.property_setters import
ExecutablePropertySetter
from cvs2svn_lib.property_setters import
KeywordsPropertySetter
from cvs2svn_lib.property_setters import MimeMapper


# To choose the level of logging output, uncomment one of
the
# following lines:
#Log().log_level = Log.WARN
#Log().log_level = Log.QUIET
Log().log_level = Log.NORMAL
#Log().log_level = Log.VERBOSE


# There are several possible options for where to put the
output of a
# cvs2svn conversion.  Please choose one of the following
and adjust
# the parameters as necessary:

#marco
# Use this output option if you would like cvs2svn to create
a new SVN
# repository and store the converted repository there.  The
first
# argument is the path to which the repository should be
written (this
# repository must not already exist).  The second (optional)
argument
# allows a --fs-type option to be passed to "svnadmin
create".  The
# third (optional) argument can be specified to set the
# --bdb-txn-nosync option on a bdb repository:
ctx.output_option = NewRepositoryOutputOption(
    'svnrepos/batch21', # Path to repository
    #fs_type='fsfs', # Type of repository to create
    #bdb_txn_nosync=False, # For bsd repositories, this
option can be
added
    )

#marco
# Use this output option if you would like cvs2svn to store
the
# converted CVS repository into an SVN repository that
already exists.
# The argument is the filesystem path of an existing local
SVN
# repository (this repository must already exist):
#ctx.output_option = ExistingRepositoryOutputOption(
#    'svnrepos/batch21', # Path to repository
#    )

# Use this type of output option if you want the output of
the
# conversion to be written to a SVN dumpfile instead of
committing
# them into an actual repository:
#ctx.output_option = DumpfileOutputOption(
#    dumpfile_path='cvs2svn-dump', # Name of dumpfile to
create
#    )


# Independent of the ctx.output_option selected, the
following option
# can be set to True to suppress cvs2svn output altogether:
ctx.dry_run = False

# Change the following if cvs2svn should use "cvs"
to read file
# versions out of *,v files.  (The default is to use
"co", which is
# part of RCS, and is much faster):
ctx.use_cvs = False

#marco
# Set the name (and optionally the path) of some executables
required
# by cvs2svn.  'co' is needed by default; 'cvs' is needed
if
# ctx.use_cvs is set to True:
ctx.svnadmin_executable = 'svnadmin'
ctx.co_executable = 'co'
ctx.cvs_executable = 'cvs'
ctx.sort_executable = 'c:temp_exchangebinsort.exe'

# Change the following line to True if the conversion should
only
# include the trunk of the repository (i.e., all branches
and tags
# should be ignored):
ctx.trunk_only = False

# Change the following line to True if cvs2svn should delete
a
# directory once the last file has been deleted from it:
ctx.prune = False

#marco
# A list of encodings that should be tried when converting
filenames,
# author names, log messages, etc. to UTF8.  The encoders
are tried in
# order in 'strict' mode until one of them succeeds.  If
none
# succeeds, then ctx.fallback_encoding is used in lossy
'replace' mode
# (if it is configured):
ctx.encoding = [
    'latin1',
    'ascii',
    ]

# The encoding to use if all of the encodings listed in
ctx.encoding
# fail.  This encoding is used in 'replace' mode, which
always
# succeeds but can cause information loss.  To enable this
feature,
# set the following value to the name of the desired
encoding (e.g.,
# 'ascii').
ctx.fallback_encoding = None

# The basic strategy for converting symbols (this should
usually be
# left unchanged).  A CVS symbol might be used as a tag in
one file
# and as a branch in another file.  The purpose of
ctx.symbol_strategy
# is to determine whether to convert a particular symbol as
a tag or
# as a branch.

# A RuleBasedSymbolStrategy decides about each symbol based
on a list
# of rules.  Rules can be added to this object.  The rules
are tried
# one by one in order; the first rule that matches a given
symbol is
# used.  It is a fatal error if no rule matches a symbol.
ctx.symbol_strategy = RuleBasedSymbolStrategy()

# To force all symbols matching a regular expression to be
converted
# as branches, add rules like the following:
#ctx.symbol_strategy.add_rule(ForceBranchRegexpStrategyRule(
'branch.*'))

# To force all symbols matching a regular expression to be
converted
# as tags, add rules like the following:
#ctx.symbol_strategy.add_rule(ForceTagRegexpStrategyRule('ta
g.*'))

# To force all symbols matching a regular expression to be
excluded
# from the conversion, add rules like the following:
#ctx.symbol_strategy.add_rule(ExcludeRegexpStrategyRule('unk
nown-.*'))

# Usually you want this rule, to convert unambiguous symbols
(symbols
# that were only ever used as tags or only ever used as
branches in
# CVS) the same way they were used in CVS:
ctx.symbol_strategy.add_rule(UnambiguousUsageRule())

# If there was ever a commit on a symbol, then it cannot be
converted
# as a tag.  Uncomment the following line to convert such
symbols
# automatically as branches:
#ctx.symbol_strategy.add_rule(BranchIfCommitsRule())

# Last in the list can be a catch-all rule that is used for
symbols
# that were not matched by any of the more specific rules
above.
# Include at most one of these lines.  If none of these are
included,
# then the presence of any ambiguous symbols (that haven't
been
# disambiguated above) is an error:

# Convert all ambiguous symbols as branches:
#ctx.symbol_strategy.add_rule(AllBranchRule())
# Convert all ambiguous symbols as tags:
#ctx.symbol_strategy.add_rule(AllTagRule())
# Convert ambiguous symbols based on whether they were used
more
# often as branches or tags:
#ctx.symbol_strategy.add_rule(HeuristicStrategyRule())

# Specify a username to be used for commits generated by
cvs2svn.  If
this options is set to None then no username will be used
for such
commits:
#ctx.username = None
ctx.username = 'cvs2svn'

# ctx.svn_property_setters contains a list of rules used to
set the
# svn properties on files in the converted archive.  For
each file,
# the rules are tried one by one.  Any rule can add or
suppress one or
# more svn properties.  Typically the rules will not
overwrite
# properties set by a previous rule (though they are free to
do so).
ctx.svn_property_setters = [
    # Set the svn:executable flag on any files that are
marked in CVS as
    # being executable:
    ExecutablePropertySetter(),

    # Omit the svn:eol-style property from any files that
are listed as
    # binary in CVS:
    BinaryFileEOLStyleSetter(),

    # To read mime types from a file, uncomment the
following line and
    # specify a filename:
    #MimeMapper('/etc/mime.types'),

    # To read auto-props rules from a file, uncomment the
following line
    # and specify a filename.  The boolean argument
specifies whether
    # case should be ignored when matching filenames to the
filename
    # patterns found in the auto-props file:
    #AutoPropsPropertySetter(
    #    '/home/username/.subversion/config',
    #    False,
    #    ),

    # If the file is binary and its svn:mime-type property
is not yet
    # set, set svn:mime-type to 'application/octet-stream'.
    BinaryFileDefaultMimeTypeSetter(),

    # To try to determine the eol-style from the mime type,
uncomment
    # the following line:
    #EOLStyleFromMimeTypeSetter(),

    # Choose one of the following lines to set the default
svn:eol-style
    # if none of the above rules applied.  The argument is
the
    # svn:eol-style that should be applied, or None if no
svn:eol-style
    # should be set.
    #DefaultEOLStyleSetter(None)
    DefaultEOLStyleSetter('native'),

    # If svn:keywords has not been set yet, set it based on
the file's
    # CVS mode:
    KeywordsPropertySetter(config.SVN_KEYWORDS_VALUE),

    # Uncomment the following line to include the original
CVS revision
    # numbers as file properties in the SVN archive:
    #CVSRevisionNumberSetter(),

    ]

# The directory to use for temporary files:
ctx.tmpdir = 'tmp'

# To skip the cleanup of temporary files, uncomment the
following
# option:
#ctx.skip_cleanup = True

# To prevent CVS commits from different projects from being
merged
# into single SVN commits, change this option to False:
ctx.cross_project_commits = True

# Now use stanzas like the following to define CVS projects
that
# should be converted.  The arguments are:
#
# - The filesystem path of the project within the CVS
repository.
#
# - The path that should be used for the "trunk"
directory of this
#   project within the SVN repository.
#
# - The path that should be used for the
"branches" directory of this
#   project within the SVN repository.
#
# - The path that should be used for the "tags"
directory of this
#   project within the SVN repository.
#
# - A list of symbol transformations that can be used to
rename
#   symbols in this project.  Each entry is a tuple
(pattern,
#   replacement), where pattern is a Python regular
expression pattern
#   and replacement is the text that should replace the
pattern.  Each
#   pattern is matched against each symbol name.  If the
pattern
#   matches, then it is replaced with the corresponding
replacement
#   text.  The replacement can include substitution patterns
(e.g.,
#   r'1' or r'g<name>').  Typically you will want to
use raw strings
#   (strings with a preceding 'r', like shown in the
examples) for the
#   regexp and its replacement to avoid backslash
substitution within
#   those strings."""

#marco
# Create the default project (using ctx.trunk, ctx.branches,
and
ctx.tags):
ctx.add_project(
    Project(
        'cvsrepos/batch21/batch21.ruleeditor',
        'batch21/batch21.ruleeditor/trunk',
        'batch21/batch21.ruleeditor/branches',
        'batch21/batch21.ruleeditor/tags',
        symbol_transforms=[
           
#RegexpSymbolTransform(r'^release-(d+)_(d+)$',
            #                      r'release-1.2'),
           
#RegexpSymbolTransform(r'^release-(d+)_(d+)_(d+)$',
            #                      r'release-1.2.3'),
            ],
        )
    )

#marco
# Create the default project (using ctx.trunk, ctx.branches,
and
ctx.tags):
ctx.add_project(
    Project(
        'cvsrepos/batch21/sandbox',
        'batch21/sandbox/trunk',
        'batch21/sandbox/branches',
        'batch21/sandbox/tags',
        symbol_transforms=[
           
#RegexpSymbolTransform(r'^release-(d+)_(d+)$',
            #                      r'release-1.2'),
           
#RegexpSymbolTransform(r'^release-(d+)_(d+)_(d+)$',
            #                      r'release-1.2.3'),
            ],
        )
    )



# Add a second project, to be stored to projA/trunk,
projA/branches,
# and projA/tags:
#ctx.add_project(
#    Project(
#        'my/cvsrepo/projA',
#        'projA/trunk',
#        'projA/branches',
#        'projA/tags',
#        symbol_transforms=[
#           
#RegexpSymbolTransform(r'^release-(d+)_(d+)$',
#            #                      r'release-1.2'),
#           
#RegexpSymbolTransform(r'^release-(d+)_(d+)_(d+)$',
#            #                      r'release-1.2.3'),
#            ],
#        )
#    )

# Change this option to True to turn on profiling of cvs2svn
(for
# debugging purposes):
run_options.profiling = True



************************************************************
***********

Die Information in dieser email ist vertraulich und ist
ausschliesslich 
fuer den/die benannten Adressaten bestimmt. Ein Zugriff auf
diese
email durch andere Personen als den/die benannten Adressaten
ist
nicht gestattet. Sollten Sie nicht der benannte Adressat
sein, loeschen
Sie bitte diese email. 

************************************************************
***********

ARGE Informationssysteme
in der gesetzlichen Krankenversicherung GmbH
Paul-Klinger-Strasse 15, 45127 Essen 
 
Amtsgericht Essen HRB 11122
Vorsitzender des Aufsichtsrates: Wolfgang Schmeinck
Geschaeftsfuehrer: Frank Krause, Andreas Prenneis

------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribecvs2svn.tigris.org
For additional commands, e-mail: users-helpcvs2svn.tigris.org


Re: Cvs2svn-1.5.1: getting error message "AttributeError: 'NoneType' object has no attribute 'd
user name
2007-02-07 13:33:35
Seine Marco wrote:
> I am using cvs2svn 1.5.1, from commandline it works
nice, but I need the
> possibility to convert multiple cvs projects into one
big subversion
> repository, so I need to use the options file for doing
that.
> I have used the exact same paths in the options file
for the cvsrepos
> and svnrepos etc which work on the commandline, but
everytime I start
> the script with the options file, I just get the
following output in
> pass 9:
> 
> ------------------
> 
> C:Temp_exchange>python cvs2svn-1.5.1cvs2svn
--options cvs2svn.options
> ----- pass 1 (CollectRevsPass) -----
> Examining all CVS ',v' files...
> .
> . ((cut out the filenames here))
> .
> Done
> ----- pass 2 (CollateSymbolsPass) -----
> Checking for blocked exclusions...
> Checking for forced tags with commits...
> Done
> ----- pass 3 (ResyncRevsPass) -----
> Re-synchronizing CVS revision timestamps...
> Done
> ----- pass 4 (SortRevsPass) -----
> Sorting CVS revisions...
> Done
> ----- pass 5 (CreateDatabasesPass) -----
> Finding last CVS revisions for all symbolic names...
> Done
> ----- pass 6 (AggregateRevsPass) -----
> Mapping CVS revisions to Subversion commits...
> Done
> ----- pass 7 (SortSymbolsPass) -----
> Sorting symbolic name source revisions...
> Done
> ----- pass 8 (IndexSymbolsPass) -----
> Determining offsets for all symbolic names...
> Done.
> ----- pass 9 (OutputPass) -----
> Creating new repository 'svnrepos/batch21'
> Starting Subversion Repository.
> Hallo
> Traceback (most recent call last):
>   File "cvs2svn-1.5.1cvs2svn", line 114, in
<module>
>     main()
>   File "cvs2svn-1.5.1cvs2svn", line 103, in
main
>     pass_manager.run, run_options.start_pass,
run_options.end_pass)
>   File
"C:ProgrammePythonlibhotshot__init__.py",
line 76, in
> runcall
>   File
"C:Temp_exchangecvs2svn-1.5.1cvs2svn_libpass_manag
er.py",
> line 122, in run
>     the_pass.run(stats_keeper)
>   File
"C:Temp_exchangecvs2svn-1.5.1cvs2svn_libpasses.py&
quot;, line
> 456, in run
>     SVNInitialProjectCommit(svn_commit.date,
1).commit(repos)
> AttributeError: 'NoneType' object has no attribute
'date'

I don't see anything obvious that you have done wrong.  It
might be a
bug in cvs2svn.  But...

It almost looks like cvs2svn didn't want to create any
revisions.  Is it
possible that your repository is somehow fubar, like all of
the *,v
files are empty or corrupt?  Were any revisions listed
during
AggregateRevsPass?  If not, then there is probably a problem
either with
your repository or with how you invoked cvs2svn.

If there were revisions listed in AggregateRevsPass, then
this looks
like a bug.  It could be that cvs2svn has a problem working
with
whatever Python database module you have installed.  (This
is determined
in cvs2svn_lib/database.py.)  If you could create a test
case and upload
it to the mailing list, that would be helpful.  Please see
the FAQ for
instructions how to create a useful, compact test case. 
(Though I
believe that some of the tools mentioned in the FAQ don't
work under
Windows.)

Michael

------------------------------------------------------------
---------
To unsubscribe, e-mail: users-unsubscribecvs2svn.tigris.org
For additional commands, e-mail: users-helpcvs2svn.tigris.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )