Re: Patch for syncing using hashes





On Sat, Sep 27, 2008 at 6:39 PM, Matt Colyer <matt colyer name> wrote:
On Sat, 2008-09-27 at 11:01 +0200, John Stowers wrote:
>
>
> 2008/9/27 Matt Colyer <matt colyer name>
>         So currently if a data source doesn't have mtimes, the
>         synchronization
>         pretty much just gives up.
>
>         I have attached a patch to compute whether both sides of the
>         synchronization have been modified. If they haven't been both
>         modified
>         we can safely assume that the modified one is the one that we
>         want. If
>         they have been both modified we retain the original behavior.
>
> Hi Matt,
>
> This sounds good. I will have a play with this today. Any chance you
> could also add a test for this, perhaps to TestCoreSyncLogic.py?
>
> Otherwise i will work on adding a test later today

Forgive me for being a bit dense but I couldn't figure out how to run
the tests. Is there a command that I need to install (like nosetests)?

I tried looking on the website and the README and couldn't find
anything.

Good point. I should update those.

Basically from the top level dir you can do

./scripts/run-tests.sh -h

(for help)

./scripts/run-tests.sh -s TestCoreSyncLogic.py

(will run just the single - s, CoreSyncLogic Test)

The -c (code coverage) switch is useful to see if you are testing the new code.

There are other details to the test suite, such as the ability to provide local files for the file based tests to use, but the above information should be sufficient for the test you are looking at.

Hope that explains everything

John
 


-Matt




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]