コード例 #1
0
    def setup(self, svn_rev_count):
        DVCSOutputOption.setup(self, svn_rev_count)
        self.f = open(self.dump_filename, 'wb')

        # The youngest revnum that has been committed so far:
        self._youngest = 0

        # A map {lod : [(revnum, mark)]} giving each of the revision
        # numbers in which there was a commit to lod, and the mark active
        # at the end of the revnum.
        self._marks = {}

        self.revision_writer.start(self._mirror, self.f)
コード例 #2
0
ファイル: git_output_option.py プロジェクト: robinst/cvs2svn
  def setup(self, svn_rev_count):
    DVCSOutputOption.setup(self, svn_rev_count)
    self.f = open(self.dump_filename, 'wb')

    # The youngest revnum that has been committed so far:
    self._youngest = 0

    # A map {lod : [(revnum, mark)]} giving each of the revision
    # numbers in which there was a commit to lod, and the mark active
    # at the end of the revnum.
    self._marks = {}

    self.revision_writer.start(self._mirror, self.f)
コード例 #3
0
  def __init__(
        self, revision_writer,
        dump_filename=None,
        author_transforms=None,
        tie_tag_fixup_branches=False,
        ):
    """Constructor.

    REVISION_WRITER is a GitRevisionWriter that is used to output
    either the content of revisions or a mark that was previously used
    to label a blob.

    DUMP_FILENAME is the name of the file to which the git-fast-import
    commands for defining revisions should be written.  (Please note
    that depending on the style of revision writer, the actual file
    contents might not be written to this file.)  If it is None, then
    the output is written to stdout.

    AUTHOR_TRANSFORMS is a map {cvsauthor : (fullname, email)} from
    CVS author names to git full name and email address.  All of the
    contents should either be Unicode strings or 8-bit strings encoded
    as UTF-8.

    TIE_TAG_FIXUP_BRANCHES means whether after finishing with a tag
    fixup branch, it should be psuedo-merged (ancestry linked but no
    content changes) back into its source branch, to dispose of the
    open head.

    """
    DVCSOutputOption.__init__(self)
    self.dump_filename = dump_filename
    self.revision_writer = revision_writer

    self.author_transforms = self.normalize_author_transforms(
        author_transforms
        )

    self.tie_tag_fixup_branches = tie_tag_fixup_branches

    self._mark_generator = KeyGenerator(GitOutputOption._first_commit_mark)
コード例 #4
0
ファイル: git_output_option.py プロジェクト: mhagger/cvs2svn
  def __init__(
        self, revision_writer,
        dump_filename=None,
        author_transforms=None,
        tie_tag_fixup_branches=False,
        ):
    """Constructor.

    REVISION_WRITER is a GitRevisionWriter that is used to output
    either the content of revisions or a mark that was previously used
    to label a blob.

    DUMP_FILENAME is the name of the file to which the git-fast-import
    commands for defining revisions should be written.  (Please note
    that depending on the style of revision writer, the actual file
    contents might not be written to this file.)  If it is None, then
    the output is written to stdout.

    AUTHOR_TRANSFORMS is a map {cvsauthor : (fullname, email)} from
    CVS author names to git full name and email address.  All of the
    contents should either be Unicode strings or 8-bit strings encoded
    as UTF-8.

    TIE_TAG_FIXUP_BRANCHES means whether after finishing with a tag
    fixup branch, it should be psuedo-merged (ancestry linked but no
    content changes) back into its source branch, to dispose of the
    open head.

    """
    DVCSOutputOption.__init__(self)
    self.dump_filename = dump_filename
    self.revision_writer = revision_writer

    self.author_transforms = self.normalize_author_transforms(
        author_transforms
        )

    self.tie_tag_fixup_branches = tie_tag_fixup_branches

    self._mark_generator = KeyGenerator(GitOutputOption._first_commit_mark)
コード例 #5
0
 def cleanup(self):
   DVCSOutputOption.cleanup(self)
   self.revision_writer.finish()
   if self.dump_filename is not None:
     self.f.close()
   del self.f
コード例 #6
0
 def register_artifacts(self, which_pass):
   DVCSOutputOption.register_artifacts(self, which_pass)
   self.revision_writer.register_artifacts(which_pass)
コード例 #7
0
 def cleanup(self):
     DVCSOutputOption.cleanup(self)
     self.revision_writer.finish()
     self.f.close()
     del self.f
コード例 #8
0
ファイル: git_output_option.py プロジェクト: robinst/cvs2svn
 def cleanup(self):
   DVCSOutputOption.cleanup(self)
   self.revision_writer.finish()
   self.f.close()
   del self.f
コード例 #9
0
ファイル: git_output_option.py プロジェクト: robinst/cvs2svn
 def register_artifacts(self, which_pass):
   DVCSOutputOption.register_artifacts(self, which_pass)
   self.revision_writer.register_artifacts(which_pass)
コード例 #10
0
ファイル: git_output_option.py プロジェクト: mhagger/cvs2svn
 def cleanup(self):
   DVCSOutputOption.cleanup(self)
   self.revision_writer.finish()
   if self.dump_filename is not None:
     self.f.close()
   del self.f