Exemplo n.º 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)
Exemplo n.º 2
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)
Exemplo n.º 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)
Exemplo n.º 4
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)
Exemplo n.º 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
Exemplo n.º 6
0
 def register_artifacts(self, which_pass):
   DVCSOutputOption.register_artifacts(self, which_pass)
   self.revision_writer.register_artifacts(which_pass)
Exemplo n.º 7
0
 def cleanup(self):
     DVCSOutputOption.cleanup(self)
     self.revision_writer.finish()
     self.f.close()
     del self.f
Exemplo n.º 8
0
 def cleanup(self):
   DVCSOutputOption.cleanup(self)
   self.revision_writer.finish()
   self.f.close()
   del self.f
Exemplo n.º 9
0
 def register_artifacts(self, which_pass):
   DVCSOutputOption.register_artifacts(self, which_pass)
   self.revision_writer.register_artifacts(which_pass)
Exemplo n.º 10
0
 def cleanup(self):
   DVCSOutputOption.cleanup(self)
   self.revision_writer.finish()
   if self.dump_filename is not None:
     self.f.close()
   del self.f