public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Attic (cvs) -> ???(git)
Date: Thu, 25 Feb 2016 09:31:46 -0500	[thread overview]
Message-ID: <CAGfcS_kgrBNTdDEYWfQNsB9+kgSmquHDfBqNAVEh+J_yp0_dQg@mail.gmail.com> (raw)
In-Reply-To: <loom.20160222T221625-45@post.gmane.org>

On Mon, Feb 22, 2016 at 4:49 PM, James <wireless@tampabay.rr.com> wrote:
> Rich Freeman <rich0 <at> gentoo.org> writes:
>
>> If I were doing anything too
>> crazy with all this I'd probably use the python git module.
>
> dev-python/git-python ???   Any others or related docs/howtos/examples?
>

I used pygit2, but there are a few different implenentations and
plenty of docs online in general.

Here is an example program that runs through a history and dumps a
list of commits and their metadata in csv format:
https://github.com/rich0/gitvalidate/blob/master/gitdump/parsetrees.py

There are some other scripts that retrieve blobs and manipulate them
in the same directory.  This was part of the validation of the git
migration, which uses a map-reduce algorithm to diff every single
commit in a git history and identify all file revisions (which creates
a cvs-like per-file history which can then be compared with results
obtained from parsing a cvs repository for the same information).  The
only single-threaded step in the process is walking the list of
commits - all the diffs can be highly paralleled.

I doubt you need anything quite so fancy.  As you can see from the
script pulling metadata out of commits and walking through parents is
pretty easy.

My example doesn't account for merge commits.  There weren't any in
the cvs->git migration.  Obviously walking commits with merges will
get a lot messier.

-- 
Rich


  reply	other threads:[~2016-02-25 14:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 19:49 [gentoo-user] Attic (cvs) -> ???(git) James
2016-02-22 21:05 ` Rich Freeman
2016-02-22 21:49   ` [gentoo-user] " James
2016-02-25 14:31     ` Rich Freeman [this message]
2016-02-25 19:46       ` James
2016-02-25  2:21 ` walt
2016-02-25  3:35   ` Mike Gilbert
2016-02-25 13:07   ` James
2016-02-26  1:49     ` walt
2016-02-26 16:43       ` James
2016-02-26 17:15         ` »Q«

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGfcS_kgrBNTdDEYWfQNsB9+kgSmquHDfBqNAVEh+J_yp0_dQg@mail.gmail.com \
    --to=rich0@gentoo.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox