2011/10/25 Matt Mackall <span dir="ltr"><<a href="mailto:mpm@selenic.com">mpm@selenic.com</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Mon, 2011-10-24 at 20:35 -0400, Greg Ward wrote:<br>
> On Mon, Oct 24, 2011 at 2:15 PM, Lee Cantey <<a href="mailto:lcantey@gmail.com">lcantey@gmail.com</a>> wrote:<br>
> > # HG changeset patch<br>
> > # User Lee Cantey <<a href="mailto:lcantey@gmail.com">lcantey@gmail.com</a>><br>
> > # Date 1319479837 25200<br>
> > # Branch stable<br>
> > # Node ID 17323a5ee76870b1b48e7308511c34c98825f35a<br>
> > # Parent  8b8dd13295dbd733cc03ebb3c2af2f33d24d5428<br>
> > largefiles: Use sha1sum.py since OS X has generic shasum utility.<br>
> ><br>
> > diff -r 8b8dd13295db -r 17323a5ee768 tests/sha1sum.py<br>
> > --- /dev/null   Thu Jan 01 00:00:00 1970 +0000<br>
> > +++ b/tests/sha1sum.py  Mon Oct 24 11:10:37 2011 -0700<br>
> > @@ -0,0 +1,42 @@<br>
> > +#!/usr/bin/env python<br>
> > +#<br>
> > +# Based on python's Tools/scripts/md5sum.py<br>
> > +#<br>
> > +# This software may be used and distributed according to the terms<br>
> > +# of the PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2, which is<br>
> > +# GPL-compatible.<br>
> > +<br>
> > +import sys, os<br>
> > +<br>
> > +try:<br>
> > +    from hashlib import sha1<br>
> > +except ImportError:<br>
> > +    from sha import sha as sha1<br>
><br>
> It looks like you just photocopied tests/md5sum.py and called it<br>
> tests/sha1sum.py. It would be ever so much nicer to refactor, e.g.<br>
><br>
>   * rename md5sum.py to hash.py<br>
>   * make it take two args, hash algorithm and filename<br>
>   * update existing callers in tests/<br>
>   * make test-largefiles.t use it<br>
<br>
</div></div>As far as I'm aware, we only need one hash function for tests and it<br>
needn't be cryptographically strong. I'll change the largefiles test to<br>
use the existing md5sum.py.<br></blockquote><div><br>Is there really a good reason to do this?  This means (as far as I can tell) that suddenly kbfiles users are now going to have to convert their entire repositories to be able to use largefiles.<br>
<br>Cheers,<br>Na'Tosha<br></div></div><br>-- <br><div><div><span style="color: rgb(153, 153, 153);"><b>Na'Tosha Bard</b></span></div><div><font color="#999999">Build & Infrastructure Developer | Unity Technologies</font></div>
<div><font color="#999999"><br></font></div><div><font color="#999999"><b>E-Mail:</b> <a href="mailto:natosha@unity3d.com" target="_blank">natosha@unity3d.com</a></font></div><div><font color="#999999"><b>Skype:</b> natosha.bard</font></div>
</div><br>