How to write common.converter_source?

Kaz Nishimura kazssym at vx68k.org
Wed May 6 22:30:03 UTC 2015


As mentioned before, with PRCS, a revision can have more than two parents
or no direct parent if it was deleted.  Can such cases properly handled by
the converter?
2015/05/07 1:58 "Matt Mackall" <mpm at selenic.com>:

> On Wed, 2015-05-06 at 21:50 +0900, Kaz Nishimura wrote:
> > I am thinking of writing a common.converter_source subclass for PRCS
> > <http://prcs.sourceforge.net/>.  I already have a standalone converter
> > prcs2hg <http://www.vx68k.org/prcs2hg> written in Python.  How should I
> > start writing a converter_source subclass?
>
> Well we have a few examples..
>
> A converter source has to basically do four things:
>
>  - detect whether a given repo is the appropriate type
>  - return a list of commit identifiers in history order
>  - when asked for a commit identifier, return a commit object with:
>    - the author / date / description metadata
>    - the parents
>    - the files touched by the commit
>    - copy information
>  - allow retrieving file content from a given revision
>
> This is pretty straightforward for most systems that have "atomic
> commits" (ie everything except CVS).
>
> > Some of the issues importing revisions from PRCS includes PRCS supports
> > deletion of intermediate revisions and N-way merge.  I tried to cope with
> > them in prcs2hg but I want help from Mercurial experts to write a
> > converter_source subclass.  Should I ask in the mercurial-dev list
> instead?
> > _______________________________________________
> > Mercurial mailing list
> > Mercurial at selenic.com
> > http://selenic.com/mailman/listinfo/mercurial
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20150507/024482b1/attachment-0002.html>


More information about the Mercurial mailing list