Logo Search packages:      
Sourcecode: tailor version File versions  Download package

def vcpx::cvsps::CvspsWorkingDir::_commit (   self,
  date,
  author,
  patchname,
  changelog = None,
  entries = None 
) [private]

Commit the changeset.

Definition at line 520 of file cvsps.py.

00520                                                                             :
        """
        Commit the changeset.
        """

        from shwrap import ReopenableNamedTemporaryFile
        from locale import getpreferredencoding

        encoding = ExternalCommand.FORCE_ENCODING or getpreferredencoding()

        logmessage = []
        if patchname:
            logmessage.append(patchname.encode(encoding))
        if changelog:
            logmessage.append(changelog.encode(encoding))
        logmessage.append('')
        logmessage.append('Original author: %s' % author.encode(encoding))
        logmessage.append('Date: %s' % date)

        rontf = ReopenableNamedTemporaryFile('cvs', 'tailor')
        log = open(rontf.name, "w")
        log.write('\n'.join(logmessage))
        log.close()

        cmd = self.repository.command("-q", "ci", "-F", rontf.name)
        if not entries:
            entries = ['.']

        c = ExternalCommand(cwd=self.basedir, command=cmd)
        c.execute(entries)

        if c.exit_status:
            raise ChangesetApplicationFailure("%s returned status %d" %
                                              (str(c), c.exit_status))

    def _removePathnames(self, names):


Generated by  Doxygen 1.6.0   Back to index