From cc4805c059332e531979968d61a6f171e0fa7a0d Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Wed, 8 Sep 2010 18:57:21 +0200 Subject: [PATCH] - added testsuite for new "repairwc" command --- tests/repairwc_fixtures/oscrc | 104 ++++++++++ tests/repairwc_fixtures/osctest/.osc/_apiurl | 1 + .../repairwc_fixtures/osctest/.osc/_packages | 1 + tests/repairwc_fixtures/osctest/.osc/_project | 1 + tests/repairwc_fixtures/osctest/_packages | 1 + .../osctest/buildfiles/.osc/_apiurl | 1 + .../buildfiles/.osc/_buildconfig_prj_arch | 0 .../buildfiles/.osc/_buildinfo_prj_arch.xml | 0 .../osctest/buildfiles/.osc/_files | 5 + .../osctest/buildfiles/.osc/_in_conflict | 1 + .../osctest/buildfiles/.osc/_osclib_version | 1 + .../osctest/buildfiles/.osc/_package | 1 + .../osctest/buildfiles/.osc/_project | 1 + .../osctest/buildfiles/.osc/_to_be_added | 1 + .../osctest/buildfiles/.osc/_to_be_deleted | 1 + .../osctest/buildfiles/.osc/foo | 1 + .../osctest/buildfiles/.osc/merge | 4 + .../osctest/buildfiles/.osc/nochange | 1 + .../osctest/buildfiles/foobar | 0 .../osctest/buildfiles/merge | 4 + .../osctest/buildfiles/nochange | 2 + .../osctest/buildfiles/toadd1 | 1 + .../osctest/multiple/.osc/_apiurl | 1 + .../osctest/multiple/.osc/_files | 5 + .../osctest/multiple/.osc/_in_conflict | 1 + .../osctest/multiple/.osc/_osclib_version | 1 + .../osctest/multiple/.osc/_package | 1 + .../osctest/multiple/.osc/_project | 1 + .../osctest/multiple/.osc/_to_be_added | 1 + .../osctest/multiple/.osc/_to_be_deleted | 2 + .../osctest/multiple/.osc/foo | 1 + .../osctest/multiple/.osc/unknown_file | 0 .../repairwc_fixtures/osctest/multiple/foobar | 0 .../repairwc_fixtures/osctest/multiple/merge | 4 + .../osctest/multiple/nochange | 2 + .../repairwc_fixtures/osctest/multiple/toadd1 | 1 + .../osctest/simple/.osc/_apiurl | 1 + .../osctest/simple/.osc/_files | 5 + .../osctest/simple/.osc/_osclib_version | 1 + .../osctest/simple/.osc/_package | 1 + .../osctest/simple/.osc/_project | 1 + .../osctest/simple/.osc/_to_be_deleted | 1 + .../repairwc_fixtures/osctest/simple/.osc/foo | 1 + .../osctest/simple/.osc/merge | 4 + .../osctest/simple/.osc/nochange | 1 + tests/repairwc_fixtures/osctest/simple/merge | 4 + .../repairwc_fixtures/osctest/simple/nochange | 2 + tests/repairwc_fixtures/osctest/simple/toadd1 | 1 + tests/repairwc_fixtures/osctest/simple/toadd2 | 1 + .../osctest/simple1/.osc/_apiurl | 1 + .../osctest/simple1/.osc/_files | 5 + .../osctest/simple1/.osc/_osclib_version | 1 + .../osctest/simple1/.osc/_package | 1 + .../osctest/simple1/.osc/_project | 1 + .../osctest/simple1/.osc/_to_be_deleted | 1 + .../osctest/simple1/.osc/merge | 4 + .../osctest/simple1/.osc/nochange | 1 + tests/repairwc_fixtures/osctest/simple1/merge | 4 + .../osctest/simple1/nochange | 2 + .../repairwc_fixtures/osctest/simple1/toadd1 | 1 + .../repairwc_fixtures/osctest/simple1/toadd2 | 1 + .../osctest/simple2/.osc/_apiurl | 1 + .../osctest/simple2/.osc/_files | 5 + .../osctest/simple2/.osc/_osclib_version | 1 + .../osctest/simple2/.osc/_package | 1 + .../osctest/simple2/.osc/_project | 1 + .../osctest/simple2/.osc/_to_be_deleted | 1 + .../osctest/simple2/.osc/foo | 1 + .../osctest/simple2/.osc/merge | 4 + .../osctest/simple2/.osc/nochange | 1 + .../osctest/simple2/.osc/somefile | 1 + tests/repairwc_fixtures/osctest/simple2/merge | 4 + .../osctest/simple2/nochange | 2 + .../repairwc_fixtures/osctest/simple2/toadd1 | 1 + .../repairwc_fixtures/osctest/simple2/toadd2 | 1 + .../osctest/simple3/.osc/_apiurl | 1 + .../osctest/simple3/.osc/_files | 5 + .../osctest/simple3/.osc/_osclib_version | 1 + .../osctest/simple3/.osc/_package | 1 + .../osctest/simple3/.osc/_project | 1 + .../osctest/simple3/.osc/_to_be_added | 1 + .../osctest/simple3/.osc/_to_be_deleted | 1 + .../osctest/simple3/.osc/foo | 1 + .../osctest/simple3/.osc/merge | 4 + .../osctest/simple3/.osc/nochange | 1 + .../osctest/simple3/.osc/toadd1 | 0 tests/repairwc_fixtures/osctest/simple3/merge | 4 + .../osctest/simple3/nochange | 2 + .../repairwc_fixtures/osctest/simple3/toadd1 | 1 + .../repairwc_fixtures/osctest/simple3/toadd2 | 1 + .../osctest/simple4/.osc/_apiurl | 1 + .../osctest/simple4/.osc/_files | 5 + .../osctest/simple4/.osc/_osclib_version | 1 + .../osctest/simple4/.osc/_package | 1 + .../osctest/simple4/.osc/_project | 1 + .../osctest/simple4/.osc/_to_be_deleted | 2 + .../osctest/simple4/.osc/foo | 1 + .../osctest/simple4/.osc/merge | 4 + .../osctest/simple4/.osc/nochange | 1 + tests/repairwc_fixtures/osctest/simple4/merge | 4 + .../osctest/simple4/nochange | 2 + .../repairwc_fixtures/osctest/simple4/toadd1 | 1 + .../osctest/simple5/.osc/_apiurl | 1 + .../osctest/simple5/.osc/_files | 5 + .../osctest/simple5/.osc/_in_conflict | 1 + .../osctest/simple5/.osc/_osclib_version | 1 + .../osctest/simple5/.osc/_package | 1 + .../osctest/simple5/.osc/_project | 1 + .../osctest/simple5/.osc/_to_be_deleted | 1 + .../osctest/simple5/.osc/foo | 1 + .../osctest/simple5/.osc/merge | 4 + .../osctest/simple5/.osc/nochange | 1 + tests/repairwc_fixtures/osctest/simple5/merge | 4 + .../osctest/simple5/nochange | 2 + .../repairwc_fixtures/osctest/simple5/toadd1 | 1 + .../osctest/simple6/.osc/_apiurl | 1 + .../osctest/simple6/.osc/_files | 5 + .../osctest/simple6/.osc/_osclib_version | 1 + .../osctest/simple6/.osc/_package | 1 + .../osctest/simple6/.osc/_project | 1 + .../osctest/simple6/.osc/_to_be_added | 1 + .../osctest/simple6/.osc/_to_be_deleted | 1 + .../osctest/simple6/.osc/merge | 4 + .../osctest/simple6/.osc/nochange | 1 + tests/repairwc_fixtures/osctest/simple6/merge | 4 + .../osctest/simple6/nochange | 2 + .../repairwc_fixtures/osctest/simple6/toadd1 | 1 + .../osctest/simple7/.osc/_apiurl | 1 + .../osctest/simple7/.osc/_files | 6 + .../osctest/simple7/.osc/_in_conflict | 1 + .../osctest/simple7/.osc/_osclib_version | 1 + .../osctest/simple7/.osc/_package | 1 + .../osctest/simple7/.osc/_project | 1 + .../osctest/simple7/.osc/_to_be_added | 1 + .../osctest/simple7/.osc/_to_be_deleted | 1 + .../osctest/simple7/.osc/foo | 1 + .../osctest/simple7/.osc/merge | 4 + .../osctest/simple7/.osc/nochange | 1 + .../repairwc_fixtures/osctest/simple7/foobar | 0 tests/repairwc_fixtures/osctest/simple7/merge | 4 + .../osctest/simple7/nochange | 2 + .../repairwc_fixtures/osctest/simple7/toadd1 | 1 + .../osctest/simple8/.osc/_apiurl | 1 + .../osctest/simple8/.osc/_files | 6 + .../osctest/simple8/.osc/_osclib_version | 1 + .../osctest/simple8/.osc/_package | 1 + .../osctest/simple8/.osc/_project | 1 + .../osctest/simple8/.osc/_to_be_added | 1 + .../osctest/simple8/.osc/_to_be_deleted | 1 + .../osctest/simple8/.osc/foo | 1 + .../osctest/simple8/.osc/merge | 4 + .../osctest/simple8/.osc/nochange | 1 + .../osctest/simple8/.osc/skipped | 0 tests/repairwc_fixtures/osctest/simple8/merge | 4 + .../osctest/simple8/nochange | 2 + .../repairwc_fixtures/osctest/simple8/toadd1 | 1 + .../osctest/working_empty/.osc/_apiurl | 1 + .../osctest/working_empty/.osc/_files | 1 + .../working_empty/.osc/_osclib_version | 1 + .../osctest/working_empty/.osc/_package | 1 + .../osctest/working_empty/.osc/_project | 1 + .../osctest/working_nonempty/.osc/_apiurl | 1 + .../osctest/working_nonempty/.osc/_files | 5 + .../working_nonempty/.osc/_in_conflict | 1 + .../working_nonempty/.osc/_osclib_version | 1 + .../osctest/working_nonempty/.osc/_package | 1 + .../osctest/working_nonempty/.osc/_project | 1 + .../working_nonempty/.osc/_to_be_added | 1 + .../working_nonempty/.osc/_to_be_deleted | 1 + .../osctest/working_nonempty/.osc/foo | 1 + .../osctest/working_nonempty/.osc/merge | 4 + .../osctest/working_nonempty/.osc/nochange | 1 + .../osctest/working_nonempty/foobar | 0 .../osctest/working_nonempty/merge | 4 + .../osctest/working_nonempty/nochange | 2 + .../osctest/working_nonempty/toadd1 | 1 + tests/suite.py | 2 + tests/test_repairwc.py | 189 ++++++++++++++++++ 178 files changed, 594 insertions(+) create mode 100644 tests/repairwc_fixtures/oscrc create mode 100644 tests/repairwc_fixtures/osctest/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/.osc/_packages create mode 100644 tests/repairwc_fixtures/osctest/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/_packages create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_buildconfig_prj_arch create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_buildinfo_prj_arch.xml create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_in_conflict create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/foobar create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/merge create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/nochange create mode 100644 tests/repairwc_fixtures/osctest/buildfiles/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_in_conflict create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/multiple/.osc/unknown_file create mode 100644 tests/repairwc_fixtures/osctest/multiple/foobar create mode 100644 tests/repairwc_fixtures/osctest/multiple/merge create mode 100644 tests/repairwc_fixtures/osctest/multiple/nochange create mode 100644 tests/repairwc_fixtures/osctest/multiple/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple/merge create mode 100644 tests/repairwc_fixtures/osctest/simple/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple/toadd2 create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple1/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple1/merge create mode 100644 tests/repairwc_fixtures/osctest/simple1/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple1/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple1/toadd2 create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple2/.osc/somefile create mode 100644 tests/repairwc_fixtures/osctest/simple2/merge create mode 100644 tests/repairwc_fixtures/osctest/simple2/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple2/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple2/toadd2 create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple3/.osc/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple3/merge create mode 100644 tests/repairwc_fixtures/osctest/simple3/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple3/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple3/toadd2 create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple4/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple4/merge create mode 100644 tests/repairwc_fixtures/osctest/simple4/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple4/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_in_conflict create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple5/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple5/merge create mode 100644 tests/repairwc_fixtures/osctest/simple5/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple5/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple6/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple6/merge create mode 100644 tests/repairwc_fixtures/osctest/simple6/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple6/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_in_conflict create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple7/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple7/foobar create mode 100644 tests/repairwc_fixtures/osctest/simple7/merge create mode 100644 tests/repairwc_fixtures/osctest/simple7/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple7/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple8/.osc/skipped create mode 100644 tests/repairwc_fixtures/osctest/simple8/merge create mode 100644 tests/repairwc_fixtures/osctest/simple8/nochange create mode 100644 tests/repairwc_fixtures/osctest/simple8/toadd1 create mode 100644 tests/repairwc_fixtures/osctest/working_empty/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/working_empty/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/working_empty/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/working_empty/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/working_empty/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_apiurl create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_files create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_in_conflict create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_osclib_version create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_package create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_project create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_added create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_deleted create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/foo create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/merge create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/.osc/nochange create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/foobar create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/merge create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/nochange create mode 100644 tests/repairwc_fixtures/osctest/working_nonempty/toadd1 create mode 100644 tests/test_repairwc.py diff --git a/tests/repairwc_fixtures/oscrc b/tests/repairwc_fixtures/oscrc new file mode 100644 index 00000000..04b2b0ab --- /dev/null +++ b/tests/repairwc_fixtures/oscrc @@ -0,0 +1,104 @@ +[general] +# URL to access API server, e.g. https://api.opensuse.org +# you also need a section [https://api.opensuse.org] with the credentials +apiurl = http://localhost +# Downloaded packages are cached here. Must be writable by you. +#packagecachedir = /var/tmp/osbuild-packagecache +# Wrapper to call build as root (sudo, su -, ...) +#su-wrapper = su -c +# rootdir to setup the chroot environment +# can contain %(repo)s, %(arch)s, %(project)s and %(package)s for replacement, e.g. +# /srv/oscbuild/%(repo)s-%(arch)s or +# /srv/oscbuild/%(repo)s-%(arch)s-%(project)s-%(package)s +#build-root = /var/tmp/build-root +# compile with N jobs (default: "getconf _NPROCESSORS_ONLN") +#build-jobs = N +# build-type to use - values can be (depending on the capabilities of the 'build' script) +# empty - chroot build +# kvm - kvm VM build (needs build-device, build-swap, build-memory) +# xen - xen VM build (needs build-device, build-swap, build-memory) +# experimental: +# qemu - qemu VM build +# lxc - lxc build +#build-type = +# build-device is the disk-image file to use as root for VM builds +# e.g. /var/tmp/FILE.root +#build-device = /var/tmp/FILE.root +# build-swap is the disk-image to use as swap for VM builds +# e.g. /var/tmp/FILE.swap +#build-swap = /var/tmp/FILE.swap +# build-memory is the amount of memory used in the VM +# value in MB - e.g. 512 +#build-memory = 512 +# build-vmdisk-rootsize is the size of the disk-image used as root in a VM build +# values in MB - e.g. 4096 +#build-vmdisk-rootsize = 4096 +# build-vmdisk-swapsize is the size of the disk-image used as swap in a VM build +# values in MB - e.g. 1024 +#build-vmdisk-swapsize = 1024 +# Numeric uid:gid to assign to the "abuild" user in the build-root +# or "caller" to use the current users uid:gid +# This is convenient when sharing the buildroot with ordinary userids +# on the host. +# This should not be 0 +# build-uid = +# extra packages to install when building packages locally (osc build) +# this corresponds to osc build's -x option and can be overridden with that +# -x '' can also be given on the command line to override this setting, or +# you can have an empty setting here. +#extra-pkgs = vim gdb strace +# build platform is used if the platform argument is omitted to osc build +#build_repository = openSUSE_Factory +# default project for getpac or bco +#getpac_default_project = openSUSE:Factory +# alternate filesystem layout: have multiple subdirs, where colons were. +#checkout_no_colon = 0 +# local files to ignore with status, addremove, .... +#exclude_glob = .osc CVS .svn .* _linkerror *~ #*# *.orig *.bak *.changes.* +# keep passwords in plaintext. If you see this comment, your osc +# already uses the encrypted password, and only keeps them in plain text +# for backwards compatibility. Default will change to 0 in future releases. +# You can remove the plaintext password without harm, if you do not need +# backwards compatibility. +#plaintext_passwd = 1 +# limit the age of requests shown with 'osc req list'. +# this is a default only, can be overridden by 'osc req list -D NNN' +# Use 0 for unlimted. +#request_list_days = 0 +# show info useful for debugging +#debug = 1 +# show HTTP traffic useful for debugging +#http_debug = 1 +# Skip signature verification of packages used for build. +#no_verify = 1 +# jump into the debugger in case of errors +#post_mortem = 1 +# print call traces in case of errors +#traceback = 1 +# use KDE/Gnome/MacOS/Windows keyring for credentials if available +#use_keyring = 1 +# check for unversioned/removed files before commit +#check_filelist = 1 +# check for pending requests after executing an action (e.g. checkout, update, commit) +#check_for_request_on_action = 0 +# what to do with the source package if the submitrequest has been accepted. If +# nothing is specified the API default is used +#submitrequest_on_accept_action = cleanup|update|noupdate +#review requests interactively (default: off) +#request_show_review = 1 +# Directory with executables to validate sources, esp before committing +#source_validator_directory = /usr/lib/osc/source_validators + +[http://localhost] +user = Admin +pass = opensuse +passx = QlpoOTFBWSZTWeTSblkAAAGBgAIBygAgADDACGNEHxaYXckU4UJDk0m5ZA== +# set aliases for this apiurl +# aliases = foo, bar +# email used in .changes, unless the one from osc meta prj will be used +# email = +# additional headers to pass to a request, e.g. for special authentication +#http_headers = Host: foofoobar, +# User: mumblegack +# Force using of keyring for this API +#keyring = 1 diff --git a/tests/repairwc_fixtures/osctest/.osc/_apiurl b/tests/repairwc_fixtures/osctest/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/.osc/_packages b/tests/repairwc_fixtures/osctest/.osc/_packages new file mode 100644 index 00000000..04e56f00 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/.osc/_packages @@ -0,0 +1 @@ + diff --git a/tests/repairwc_fixtures/osctest/.osc/_project b/tests/repairwc_fixtures/osctest/.osc/_project new file mode 100644 index 00000000..b83ffd3c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/.osc/_project @@ -0,0 +1 @@ +osctest diff --git a/tests/repairwc_fixtures/osctest/_packages b/tests/repairwc_fixtures/osctest/_packages new file mode 100644 index 00000000..04e56f00 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/_packages @@ -0,0 +1 @@ + diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_apiurl b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_buildconfig_prj_arch b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_buildconfig_prj_arch new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_buildinfo_prj_arch.xml b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_buildinfo_prj_arch.xml new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_files b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_files new file mode 100644 index 00000000..d8e2ba46 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_in_conflict b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_in_conflict new file mode 100644 index 00000000..55aa7469 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_in_conflict @@ -0,0 +1 @@ +nochange diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_package b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_package new file mode 100644 index 00000000..8c26334d --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_package @@ -0,0 +1 @@ +buildfiles diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_project b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_added new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_added @@ -0,0 +1 @@ +foobar diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/foo b/tests/repairwc_fixtures/osctest/buildfiles/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/merge b/tests/repairwc_fixtures/osctest/buildfiles/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/buildfiles/.osc/nochange b/tests/repairwc_fixtures/osctest/buildfiles/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/buildfiles/foobar b/tests/repairwc_fixtures/osctest/buildfiles/foobar new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/buildfiles/merge b/tests/repairwc_fixtures/osctest/buildfiles/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/buildfiles/nochange b/tests/repairwc_fixtures/osctest/buildfiles/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/buildfiles/toadd1 b/tests/repairwc_fixtures/osctest/buildfiles/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/buildfiles/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_apiurl b/tests/repairwc_fixtures/osctest/multiple/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_files b/tests/repairwc_fixtures/osctest/multiple/.osc/_files new file mode 100644 index 00000000..8a96986c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_in_conflict b/tests/repairwc_fixtures/osctest/multiple/.osc/_in_conflict new file mode 100644 index 00000000..55aa7469 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_in_conflict @@ -0,0 +1 @@ +nochange diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/multiple/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_package b/tests/repairwc_fixtures/osctest/multiple/.osc/_package new file mode 100644 index 00000000..5c4139db --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_package @@ -0,0 +1 @@ +multiple diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_project b/tests/repairwc_fixtures/osctest/multiple/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_added new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_added @@ -0,0 +1 @@ +foobar diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_deleted new file mode 100644 index 00000000..300a93bc --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/_to_be_deleted @@ -0,0 +1,2 @@ +foo +nofilesentry diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/foo b/tests/repairwc_fixtures/osctest/multiple/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/multiple/.osc/unknown_file b/tests/repairwc_fixtures/osctest/multiple/.osc/unknown_file new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/multiple/foobar b/tests/repairwc_fixtures/osctest/multiple/foobar new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/multiple/merge b/tests/repairwc_fixtures/osctest/multiple/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/multiple/nochange b/tests/repairwc_fixtures/osctest/multiple/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/multiple/toadd1 b/tests/repairwc_fixtures/osctest/multiple/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/multiple/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/_files b/tests/repairwc_fixtures/osctest/simple/.osc/_files new file mode 100644 index 00000000..f0dac1f4 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/_files @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/_package b/tests/repairwc_fixtures/osctest/simple/.osc/_package new file mode 100644 index 00000000..8fd32466 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/_package @@ -0,0 +1 @@ +simple \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/_project b/tests/repairwc_fixtures/osctest/simple/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/foo b/tests/repairwc_fixtures/osctest/simple/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/merge b/tests/repairwc_fixtures/osctest/simple/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple/.osc/nochange b/tests/repairwc_fixtures/osctest/simple/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple/merge b/tests/repairwc_fixtures/osctest/simple/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple/nochange b/tests/repairwc_fixtures/osctest/simple/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple/toadd1 b/tests/repairwc_fixtures/osctest/simple/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple/toadd2 b/tests/repairwc_fixtures/osctest/simple/toadd2 new file mode 100644 index 00000000..6f1ab97c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple/toadd2 @@ -0,0 +1 @@ +toadd2 diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple1/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/_files b/tests/repairwc_fixtures/osctest/simple1/.osc/_files new file mode 100644 index 00000000..f0dac1f4 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/_files @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple1/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/_package b/tests/repairwc_fixtures/osctest/simple1/.osc/_package new file mode 100644 index 00000000..e2464cdd --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/_package @@ -0,0 +1 @@ +simple1 diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/_project b/tests/repairwc_fixtures/osctest/simple1/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple1/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/merge b/tests/repairwc_fixtures/osctest/simple1/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple1/.osc/nochange b/tests/repairwc_fixtures/osctest/simple1/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple1/merge b/tests/repairwc_fixtures/osctest/simple1/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple1/nochange b/tests/repairwc_fixtures/osctest/simple1/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple1/toadd1 b/tests/repairwc_fixtures/osctest/simple1/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple1/toadd2 b/tests/repairwc_fixtures/osctest/simple1/toadd2 new file mode 100644 index 00000000..6f1ab97c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple1/toadd2 @@ -0,0 +1 @@ +toadd2 diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple2/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/_files b/tests/repairwc_fixtures/osctest/simple2/.osc/_files new file mode 100644 index 00000000..f0dac1f4 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/_files @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple2/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/_package b/tests/repairwc_fixtures/osctest/simple2/.osc/_package new file mode 100644 index 00000000..e268fff4 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/_package @@ -0,0 +1 @@ +simple2 diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/_project b/tests/repairwc_fixtures/osctest/simple2/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple2/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/foo b/tests/repairwc_fixtures/osctest/simple2/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/merge b/tests/repairwc_fixtures/osctest/simple2/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/nochange b/tests/repairwc_fixtures/osctest/simple2/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple2/.osc/somefile b/tests/repairwc_fixtures/osctest/simple2/.osc/somefile new file mode 100644 index 00000000..ebf038b9 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/.osc/somefile @@ -0,0 +1 @@ +somefile diff --git a/tests/repairwc_fixtures/osctest/simple2/merge b/tests/repairwc_fixtures/osctest/simple2/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple2/nochange b/tests/repairwc_fixtures/osctest/simple2/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple2/toadd1 b/tests/repairwc_fixtures/osctest/simple2/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple2/toadd2 b/tests/repairwc_fixtures/osctest/simple2/toadd2 new file mode 100644 index 00000000..6f1ab97c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple2/toadd2 @@ -0,0 +1 @@ +toadd2 diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple3/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_files b/tests/repairwc_fixtures/osctest/simple3/.osc/_files new file mode 100644 index 00000000..0479b49a --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple3/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_package b/tests/repairwc_fixtures/osctest/simple3/.osc/_package new file mode 100644 index 00000000..3d7b9c9c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_package @@ -0,0 +1 @@ +simple3 diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_project b/tests/repairwc_fixtures/osctest/simple3/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_added new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_added @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/foo b/tests/repairwc_fixtures/osctest/simple3/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/merge b/tests/repairwc_fixtures/osctest/simple3/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/nochange b/tests/repairwc_fixtures/osctest/simple3/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple3/.osc/toadd1 b/tests/repairwc_fixtures/osctest/simple3/.osc/toadd1 new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/simple3/merge b/tests/repairwc_fixtures/osctest/simple3/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple3/nochange b/tests/repairwc_fixtures/osctest/simple3/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple3/toadd1 b/tests/repairwc_fixtures/osctest/simple3/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple3/toadd2 b/tests/repairwc_fixtures/osctest/simple3/toadd2 new file mode 100644 index 00000000..6f1ab97c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple3/toadd2 @@ -0,0 +1 @@ +toadd2 diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple4/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/_files b/tests/repairwc_fixtures/osctest/simple4/.osc/_files new file mode 100644 index 00000000..9fa8a9fe --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple4/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/_package b/tests/repairwc_fixtures/osctest/simple4/.osc/_package new file mode 100644 index 00000000..6ece159d --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/_package @@ -0,0 +1 @@ +working_nonempty diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/_project b/tests/repairwc_fixtures/osctest/simple4/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple4/.osc/_to_be_deleted new file mode 100644 index 00000000..6db8a6fb --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/_to_be_deleted @@ -0,0 +1,2 @@ +foo +remove diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/foo b/tests/repairwc_fixtures/osctest/simple4/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/merge b/tests/repairwc_fixtures/osctest/simple4/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple4/.osc/nochange b/tests/repairwc_fixtures/osctest/simple4/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple4/merge b/tests/repairwc_fixtures/osctest/simple4/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple4/nochange b/tests/repairwc_fixtures/osctest/simple4/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple4/toadd1 b/tests/repairwc_fixtures/osctest/simple4/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple4/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple5/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_files b/tests/repairwc_fixtures/osctest/simple5/.osc/_files new file mode 100644 index 00000000..9fa8a9fe --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_in_conflict b/tests/repairwc_fixtures/osctest/simple5/.osc/_in_conflict new file mode 100644 index 00000000..9b1719f5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_in_conflict @@ -0,0 +1 @@ +conflict diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple5/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_package b/tests/repairwc_fixtures/osctest/simple5/.osc/_package new file mode 100644 index 00000000..6ece159d --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_package @@ -0,0 +1 @@ +working_nonempty diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_project b/tests/repairwc_fixtures/osctest/simple5/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple5/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/foo b/tests/repairwc_fixtures/osctest/simple5/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/merge b/tests/repairwc_fixtures/osctest/simple5/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple5/.osc/nochange b/tests/repairwc_fixtures/osctest/simple5/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple5/merge b/tests/repairwc_fixtures/osctest/simple5/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple5/nochange b/tests/repairwc_fixtures/osctest/simple5/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple5/toadd1 b/tests/repairwc_fixtures/osctest/simple5/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple5/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple6/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_files b/tests/repairwc_fixtures/osctest/simple6/.osc/_files new file mode 100644 index 00000000..65eb1841 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple6/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_package b/tests/repairwc_fixtures/osctest/simple6/.osc/_package new file mode 100644 index 00000000..29a27467 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_package @@ -0,0 +1 @@ +simple6 diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_project b/tests/repairwc_fixtures/osctest/simple6/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_added new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_added @@ -0,0 +1 @@ +foobar diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/merge b/tests/repairwc_fixtures/osctest/simple6/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple6/.osc/nochange b/tests/repairwc_fixtures/osctest/simple6/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple6/merge b/tests/repairwc_fixtures/osctest/simple6/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple6/nochange b/tests/repairwc_fixtures/osctest/simple6/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple6/toadd1 b/tests/repairwc_fixtures/osctest/simple6/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple6/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple7/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_files b/tests/repairwc_fixtures/osctest/simple7/.osc/_files new file mode 100644 index 00000000..9ae3788f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_files @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_in_conflict b/tests/repairwc_fixtures/osctest/simple7/.osc/_in_conflict new file mode 100644 index 00000000..55aa7469 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_in_conflict @@ -0,0 +1 @@ +nochange diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple7/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_package b/tests/repairwc_fixtures/osctest/simple7/.osc/_package new file mode 100644 index 00000000..c0cec078 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_package @@ -0,0 +1 @@ +simple7 diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_project b/tests/repairwc_fixtures/osctest/simple7/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_added new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_added @@ -0,0 +1 @@ +foobar diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/foo b/tests/repairwc_fixtures/osctest/simple7/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/merge b/tests/repairwc_fixtures/osctest/simple7/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple7/.osc/nochange b/tests/repairwc_fixtures/osctest/simple7/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple7/foobar b/tests/repairwc_fixtures/osctest/simple7/foobar new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/simple7/merge b/tests/repairwc_fixtures/osctest/simple7/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple7/nochange b/tests/repairwc_fixtures/osctest/simple7/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple7/toadd1 b/tests/repairwc_fixtures/osctest/simple7/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple7/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_apiurl b/tests/repairwc_fixtures/osctest/simple8/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_files b/tests/repairwc_fixtures/osctest/simple8/.osc/_files new file mode 100644 index 00000000..cd725ff2 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_files @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/simple8/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_package b/tests/repairwc_fixtures/osctest/simple8/.osc/_package new file mode 100644 index 00000000..fc76adf2 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_package @@ -0,0 +1 @@ +simple8 diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_project b/tests/repairwc_fixtures/osctest/simple8/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_added new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_added @@ -0,0 +1 @@ +foobar diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/foo b/tests/repairwc_fixtures/osctest/simple8/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/merge b/tests/repairwc_fixtures/osctest/simple8/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/nochange b/tests/repairwc_fixtures/osctest/simple8/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/simple8/.osc/skipped b/tests/repairwc_fixtures/osctest/simple8/.osc/skipped new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/simple8/merge b/tests/repairwc_fixtures/osctest/simple8/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/simple8/nochange b/tests/repairwc_fixtures/osctest/simple8/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/simple8/toadd1 b/tests/repairwc_fixtures/osctest/simple8/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/simple8/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/repairwc_fixtures/osctest/working_empty/.osc/_apiurl b/tests/repairwc_fixtures/osctest/working_empty/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_empty/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/working_empty/.osc/_files b/tests/repairwc_fixtures/osctest/working_empty/.osc/_files new file mode 100644 index 00000000..98141218 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_empty/.osc/_files @@ -0,0 +1 @@ + diff --git a/tests/repairwc_fixtures/osctest/working_empty/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/working_empty/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_empty/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/working_empty/.osc/_package b/tests/repairwc_fixtures/osctest/working_empty/.osc/_package new file mode 100644 index 00000000..4b1dcd19 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_empty/.osc/_package @@ -0,0 +1 @@ +working_empty diff --git a/tests/repairwc_fixtures/osctest/working_empty/.osc/_project b/tests/repairwc_fixtures/osctest/working_empty/.osc/_project new file mode 100644 index 00000000..b83ffd3c --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_empty/.osc/_project @@ -0,0 +1 @@ +osctest diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_apiurl b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_apiurl new file mode 100644 index 00000000..0afeace7 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_apiurl @@ -0,0 +1 @@ +http://localhost diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_files b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_files new file mode 100644 index 00000000..9fa8a9fe --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_files @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_in_conflict b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_in_conflict new file mode 100644 index 00000000..55aa7469 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_in_conflict @@ -0,0 +1 @@ +nochange diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_osclib_version b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_osclib_version new file mode 100644 index 00000000..d3827e75 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_osclib_version @@ -0,0 +1 @@ +1.0 diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_package b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_package new file mode 100644 index 00000000..6ece159d --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_package @@ -0,0 +1 @@ +working_nonempty diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_project b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_project new file mode 100644 index 00000000..cea3bc84 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_project @@ -0,0 +1 @@ +osctest \ No newline at end of file diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_added b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_added new file mode 100644 index 00000000..323fae03 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_added @@ -0,0 +1 @@ +foobar diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_deleted b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_deleted new file mode 100644 index 00000000..257cc564 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/_to_be_deleted @@ -0,0 +1 @@ +foo diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/foo b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/foo new file mode 100644 index 00000000..3bb34cf8 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/foo @@ -0,0 +1 @@ +This is a simple test. diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/merge b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/.osc/nochange b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/nochange new file mode 100644 index 00000000..0569b03f --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/.osc/nochange @@ -0,0 +1 @@ +This file didn't change. diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/foobar b/tests/repairwc_fixtures/osctest/working_nonempty/foobar new file mode 100644 index 00000000..e69de29b diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/merge b/tests/repairwc_fixtures/osctest/working_nonempty/merge new file mode 100644 index 00000000..0b4685d5 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/merge @@ -0,0 +1,4 @@ +Is it +possible to +merge this file? +I hope so... diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/nochange b/tests/repairwc_fixtures/osctest/working_nonempty/nochange new file mode 100644 index 00000000..3a48a293 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/nochange @@ -0,0 +1,2 @@ +This file didn't change but +is modified. diff --git a/tests/repairwc_fixtures/osctest/working_nonempty/toadd1 b/tests/repairwc_fixtures/osctest/working_nonempty/toadd1 new file mode 100644 index 00000000..15924238 --- /dev/null +++ b/tests/repairwc_fixtures/osctest/working_nonempty/toadd1 @@ -0,0 +1 @@ +toadd1 diff --git a/tests/suite.py b/tests/suite.py index bcbfed49..53b5cd80 100644 --- a/tests/suite.py +++ b/tests/suite.py @@ -7,6 +7,7 @@ import test_revertfiles import test_difffiles import test_init_package import test_commit +import test_repairwc suite = unittest.TestSuite() suite.addTests(test_addfiles.suite()) @@ -16,5 +17,6 @@ suite.addTests(test_update.suite()) suite.addTests(test_difffiles.suite()) suite.addTests(test_init_package.suite()) suite.addTests(test_commit.suite()) +suite.addTests(test_repairwc.suite()) result = unittest.TextTestRunner(verbosity=1).run(suite) sys.exit(not result.wasSuccessful()) diff --git a/tests/test_repairwc.py b/tests/test_repairwc.py new file mode 100644 index 00000000..b88d576c --- /dev/null +++ b/tests/test_repairwc.py @@ -0,0 +1,189 @@ +import osc.core +import osc.oscerr +import os +import sys +from common import GET, PUT, POST, DELETE, OscTestCase +from xml.etree import cElementTree as ET +FIXTURES_DIR = os.path.join(os.getcwd(), 'repairwc_fixtures') + +def suite(): + import unittest + return unittest.makeSuite(TestRepairWC) + +rev_dummy = '\n empty\n' + +class TestRepairWC(OscTestCase): + def _get_fixtures_dir(self): + return FIXTURES_DIR + + def __assertNotRaises(self, exception, meth, *args, **kwargs): + try: + meth(*args, **kwargs) + except exception: + self.fail('%s raised' % exception.__name__) + + def test_working_empty(self): + """consistent, empty working copy""" + self._change_to_pkg('working_empty') + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_working_nonempty(self): + """ + consistent, non-empty working copy. One file is in conflict, + one file is marked for deletion and one file has state 'A' + """ + self._change_to_pkg('working_nonempty') + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_buildfiles(self): + """ + wc has a _buildconfig_prj_arch and a _buildinfo_prj_arch.xml in the storedir + """ + self._change_to_pkg('buildfiles') + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + @GET('http://localhost/source/osctest/simple1/foo?rev=1', text='This is a simple test.\n') + def test_simple1(self): + """a file is marked for deletion but storefile doesn't exist""" + self._change_to_pkg('simple1') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertTrue(os.path.exists(os.path.join('.osc', 'foo'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'toadd1', '?') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_simple2(self): + """a file "somefile" exists in the storedir which isn't tracked""" + self._change_to_pkg('simple2') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertFalse(os.path.exists(os.path.join('.osc', 'somefile'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'toadd1', '?') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_simple3(self): + """toadd1 has state 'A' and a file .osc/toadd1 exists""" + self._change_to_pkg('simple3') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertFalse(os.path.exists(os.path.join('.osc', 'toadd1'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_addlist('toadd1\n') + self._check_status(p, 'toadd1', 'A') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_simple4(self): + """a file is listed in _to_be_deleted but isn't present in _files""" + self._change_to_pkg('simple4') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'toadd1', '?') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_simple5(self): + """a file is listed in _in_conflict but isn't present in _files""" + self._change_to_pkg('simple5') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertFalse(os.path.exists(os.path.join('.osc', '_in_conflict'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'toadd1', '?') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + @GET('http://localhost/source/osctest/simple6/foo?rev=1', text='This is a simple test.\n') + def test_simple6(self): + """ + a file is listed in _to_be_deleted and is present + in _files but the storefile is missing + """ + self._change_to_pkg('simple6') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertTrue(os.path.exists(os.path.join('.osc', 'foo'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'toadd1', '?') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_simple7(self): + """files marked as skipped don't exist in the storedir""" + self._change_to_pkg('simple7') + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + def test_simple8(self): + """ + a file is marked as skipped but the skipped file exists in the storedir + """ + self._change_to_pkg('simple8') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertFalse(os.path.exists(os.path.join('.osc', 'skipped'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'M') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'toadd1', '?') + self._check_status(p, 'skipped', 'S') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + + @GET('http://localhost/source/osctest/multiple/merge?rev=1', text='Is it\npossible to\nmerge this file?I hope so...\n') + @GET('http://localhost/source/osctest/multiple/nochange?rev=1', text='This file didn\'t change.\n') + def test_multiple(self): + """ + a storefile is missing, a file is listed in _to_be_deleted + but is not present in _files, a file is listed in _in_conflict + but the storefile is missing and a file exists in the storedir + but is not present in _files + """ + self._change_to_pkg('multiple') + self.assertRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + p = osc.core.Package('.', wc_check=False) + p.wc_repair() + self.assertTrue(os.path.exists(os.path.join('.osc', 'foo'))) + self.assertFalse(os.path.exists(os.path.join('.osc', 'unknown_file'))) + self._check_deletelist('foo\n') + self._check_status(p, 'foo', 'D') + self._check_status(p, 'nochange', 'C') + self._check_status(p, 'merge', ' ') + self._check_status(p, 'foobar', 'A') + self._check_status(p, 'toadd1', '?') + # additional cleanup check + self.__assertNotRaises(osc.oscerr.WorkingCopyInconsistent, osc.core.Package, '.') + +if __name__ == '__main__': + import unittest + unittest.main()