On Mon, May 09, 2016 at 10:32:59AM +0200, Oleg Broytman <p...@phdru.name> wrote:
> Hi!
> 
> On Sun, May 08, 2016 at 07:40:15PM -0400, ??manuel Barry <vgr...@live.ca> 
> wrote:
> > Take each X commit (say, every 100th or 1000th commit, or even every commit 
> > if we decide to be insane^Wprecise), store hashes of all files at that 
> > revision with possibly the file tree, in a .py file as a list or dict, or 
> > json or anything you prefer. Then I upload it for you to look at and you 
> > can compare with the mercurial repo. Or we run the same script on the 
> > mercurial repo and compare the resulting files.
> 
> IMO the tool can be designed like this:
> 
> 1. Generate the list of commits in a branch::
> 
>     git log -m --first-parent --format='%H'
> 
> 2. For every commit in the list generate the list of files in the
> commit::
> 
>         git cat-file -p $SHA1^{tree}
> 
> This produces a list in the format like this:
> 
> 040000 tree e0fd616e5707b006f1a2df8be85d0be973192ee0  Doc
> 040000 tree 33e09fe5cdcd421c989de911c97fd1d901ac0e8e  Grammar
> 040000 tree 39ca3d725f190d61aa45ea1c8bf4802f44f52e47  Include
> 100644 blob 84a3337c2e5289fb8e50e5ef6d8ac2ac78be70b2  LICENSE
> 040000 tree 08eeead22b72c75d84624509286e6c54ec6656ec  Lib
> 040000 tree b1a2357d3d461d161d92d73aabb74f0a9ab52294  Mac
> 100644 blob 2a687e58c9141b44520db9ad0b07b71525fd051d  Makefile.pre.in
> 
> For every blob in the list store its hash. For every tree use
> 
>         git cat-file -p $SHA1^{tree}

Oops, my mistake::

        git cat-file -p $TREE-SHA1

> recursively.
> 
> I don't have any idea how to do that in Mercurial, though.
> 
> > -Emanuel

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            p...@phdru.name
           Programmers don't die, they just GOSUB without RETURN.
_______________________________________________
core-workflow mailing list
core-workflow@python.org
https://mail.python.org/mailman/listinfo/core-workflow
This list is governed by the PSF Code of Conduct: 
https://www.python.org/psf/codeofconduct

Reply via email to