[PATCH 0 of 4] Begin adding tests and small fixes for Largefiles Extension

Matt Mackall mpm at selenic.com
Thu Oct 6 20:35:03 CDT 2011

On Thu, 2011-10-06 at 21:08 -0400, Greg Ward wrote:
> On Wed, Oct 5, 2011 at 12:31 PM, Na'Tosha Bard <natosha at unity3d.com> wrote:
> > This patchbomb starts the process of adding tests (and fixes for things I find as I write the tests) for the largefiles extension.  These tests cover basic functionality of mercurial operations on largefiles, as well as some more obscure functionality that I know to have been very problematic (hard to fix and easy to break) for largefiles in the past.
> Uhh... I hope you're converting the existing tests, not writing
> brand-new ones! I know I have spent a lot of time writing pretty good
> tests for bfiles, and it looks like folks at Fog Creek spent a *hell*
> of a lot of time writing tests of kbfiles. It's just too bad that they
> made such enthusiastic use of my misguided hgtests.py framework [1].
> Greg
> [1] it was a nice idea, because it lets you write portable tests --
> something Mercurial really needs. But unfortunately, writing those
> tests is a royal PITA.
> The new "unified" format introduced in hg 1.7 is vastly nicer; pity it's
> Unix-only.

As I've tried to point out before, this needn't be the case. Imagine
you've got two tests:


  $ hg init a
  $ mkdir b
  $ echo d > b/c
  $ hg st
  ? b/c


  > hg init a
  > mkdir b
  > echo d > b\c
  > hg st
  ? b\c

These tests can be unified as:

  $ hg init a
  $ mkdir b
  $ echo d > b/c (unix)
  $ echo d > b\c (win)
  $ hg st
  ? b/c (unix)
  ? b\c (win)

..and run-tests can extract a platform-relevant test from it simply by
eliminating all lines that are marked as being for other platforms.

Now Windows command scripts are admittedly a horrible miserable sad
awful thing, but should work in principle. Or we could require some
other shell to run scripts.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list