SSHStore in bfile

David Douard david.douard at logilab.fr
Tue Nov 3 02:39:40 CST 2009


Le Tuesday 03 November 2009 08:50:18 David Douard, vous avez écrit :
> Le Monday 02 November 2009 21:01:29 Greg Ward, vous avez écrit :
> > On Mon, Nov 2, 2009 at 10:54 AM, David Douard <david.douard at logilab.fr>
>
> wrote:
> > > I'll try to do this this evening during, in my train back home.
> >
> > Fantastic!  Thank you again.  I am going to start writing a test
> > script now based on the patch you already sent.  Will send it to you
> > when it seems to work.  Then I can commit it right after your main
> > patch.
>
> I have been digging for this yesterday. In fact, current tests can (well,
> should, since 'verify' is not yet implemented in SSHStore) run fine against
> the SSHstore simply by changing the "store" parameter of the hgrc.

I spoke a bit to quick. The shell scripts  describing tests should run fine, 
however, the expected outputs might be slightly different (eg. because of the 
presence of the .hg directory in the store). 

A simple solution might be to make sshstore tests use existing tests, like:

--- test-create-sshstore ---
#!/bin/sh

# Test initial creation/population of a bfiles repo+sshstore: bfadd,
# bfrefresh, bfput.

STOREPROTOCOL="ssh://localhost/"
. "$TESTDIR/test-create"
----------------------------

with expected outputs given normally in .out files.


> In my repo, I have modified a bit tests/common like:
>
> [bfiles]
> store = ${STOREPROTOCOL}$STOREDIR
>
> so I can run the test suite using SSHStore simply by setting the
> STOREPROTOCOL shell variable to "ssh://localhost/".
>
> I wonder now how I can make run-test.py execute the whole testsuite twice
> changing only a Shell variable. Any idea?

The proposed solution assert this problem.

Another thing, do you mind if I also write, in common:

createrc() {
    cat > $HGRCPATH << __EOF__
$USERHGRC

[extensions]
bfiles = $TESTDIR/../bfiles.py

[bfiles]
store = ${STOREPROTOCOL}$STOREDIR
__EOF__
}

This USERHGRC is useful for me when running sshstore tests to be able to 
configure ui.remotecmd (which I need on my station, default hg being my 
disctribution's one) using this shell variable.

> David
>
> > Greg



-- 
David Douard                        LOGILAB, Paris (France), +33 1 45 32 03 12
Formations Python, Zope, Debian :   http://www.logilab.fr/formations
Développement logiciel sur mesure : http://www.logilab.fr/services
Informatique scientifique :         http://www.logilab.fr/science



More information about the Mercurial-devel mailing list