def load_repos(id, name, repos, wc, setup_fn, log): # Create the repository first run("svnadmin", "create", repos, output=log) ensure_dir() try: os.stat(cache_dir + "/" + name) except: # The cache doesn't contain a dump # for this repository yet insert(id, name, repos, wc, setup_fn, log) return # Regenerate if neccessary if dirty(id, name): os.unlink(cache_dir + "/" + name) insert(id, name, repos, wc, setup_fn, log) return else: # Import the cached dump using svnadmin run("svnadmin", "load", repos, input=cache_dir + "/" + name, output=log)
def setup(step, log): if step == 0: os.mkdir("dir1") os.mkdir("dir1/sdir1") os.mkdir("dir1/sdir2") f = open("dir1/file1","wb") print >>f, "hello1" f = open("dir1/sdir1/file1","wb") print >>f, "hello2" f = open("dir1/sdir2/file1","wb") print >>f, "hello3" f = open("dir1/sdir2/file2","wb") print >>f, "hello4" test_api.run("svn", "add", "dir1", output = log) return True elif step == 1: f = open("dir1/sdir1/file2","wb") print >>f, "hello6" test_api.run("svn", "add", "dir1/sdir1/file2", output = log) return True elif step == 2: test_api.run("svn", "cp", "dir1", "dir2", output = log) test_api.run("svn", "rm", "dir2/sdir1", output = log) test_api.run("svn", "rm", "dir2/sdir2/file1", output = log) return True elif step == 3: f = open("dir2/sdir2/file2","ab") print >>f, "just copied!" return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1","wb") print >>f, "hello1" print >>f, "hello2" f = open("dir1/file2","wb") print >>f, "hello3" test_api.run("svn", "add", "dir1", output = log) return True elif step == 1: f = open("dir1/file2","wb") print >>f, "hello4" return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1", "wb") print >> f, "hello1" print >> f, "hello2" f = open("dir1/file2", "wb") print >> f, "hello3" test_api.run("svn", "add", "dir1", output=log) return True elif step == 1: f = open("dir1/file2", "wb") print >> f, "hello4" return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1","wb") print >>f, "hello1" print >>f, "hello2" f = open("dir1/file2","wb") print >>f, "hello3" test_api.run("svn", "add", "dir1", output = log) return True elif step == 1: f = open("file1","wb") print >>f, "hello4" f = open("file12","wb") print >>f, "hello5" test_api.run("svn", "add", "file1", "file12", output = log) return True elif step == 2: test_api.run("svn", "rm", "file1", output=log) return True elif step == 3: f = open("file12","ab") print >>f, "hello6" return True elif step == 4: test_api.run("svn", "rm", "dir1", output=log) return True elif step == 5: os.mkdir("dir1") f = open("dir1/file1","wb") print >>f, "hello7" f = open("dir1/file2","wb") print >>f, "hello8" print >>f, "hello9" test_api.run("svn", "add", "dir1", output = log) return True elif step == 6: f = open("dir1/file1","ab") print >>f, "hello10" return True else: return False
def insert(id, name, repos, wc, setup_fn, log): # Checkout and commit tmp = os.getcwd() os.chdir(wc + "/..") run("svn", "checkout", uri("file://" + repos), output=log) os.chdir(id) step = 0 while setup_fn(step, log): os.chdir(wc + "/..") run("svn", "commit", id, "-m", "commit step " + str(step), "--username", "test", output=log) step += 1 os.chdir(id) os.chdir(tmp) # Create dump run("svnadmin", "dump", repos, output=cache_dir + "/" + name, error=log) # Save the module's sha-1 sum m = hashlib.sha224() f = open(test.path(id), "r") m.update(f.read()) f.close() f = open(cache_dir + "/" + name + ".sha", "w") print >> f, m.hexdigest(), f.close()
def setup(step, log): if step == 0: os.mkdir("dir1") os.mkdir("dir1/sdir1") os.mkdir("dir1/sdir2") f = open("dir1/file1", 'wb') print >> f, 'hello1' f = open("dir1/sdir1/file1", 'wb') print >> f, 'hello2' f = open("dir1/sdir2/file1", 'wb') print >> f, 'hello3' f = open("dir1/sdir2/file2", 'wb') print >> f, 'hello4' test_api.run("svn", "add", "dir1", output=log) return True elif step == 1: f = open("dir1/sdir2/file2", 'ab') print >> f, 'hello5' return True elif step == 2: f = open("dir1/sdir1/file2", 'wb') print >> f, 'hello6' test_api.run("svn", "add", "dir1/sdir1/file2", output=log) return True elif step == 3: test_api.run("svn", "cp", "dir1/sdir1", "sdir1", output=log) return True elif step == 4: f = open("sdir1/file1", 'ab') print >> f, "just copied!" return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") os.mkdir("dir1/sdir1") os.mkdir("dir1/sdir2") f = open("dir1/file1",'wb') print >>f, 'hello1' f = open("dir1/sdir1/file1",'wb') print >>f, 'hello2' f = open("dir1/sdir2/file1",'wb') print >>f, 'hello3' f = open("dir1/sdir2/file2",'wb') print >>f, 'hello4' test_api.run("svn", "add", "dir1", output = log) return True elif step == 1: f = open("dir1/sdir2/file2",'ab') print >>f, 'hello5' return True elif step == 2: f = open("dir1/sdir1/file2",'wb') print >>f, 'hello6' test_api.run("svn", "add", "dir1/sdir1/file2", output = log) return True elif step == 3: test_api.run("svn", "cp", "dir1/sdir1", "sdir1", output = log) return True elif step == 4: f = open("sdir1/file1",'ab') print >>f, "just copied!" return True else: return False
def setup(step, log): global wc_dir if step == 0: wc_dir = os.path.split(os.getcwd())[1] + "/" os.chdir("..") f = open(wc_dir + "file1", "wb") print >> f, "This is the original text" test_api.run("svn", "add", wc_dir + "file1", output=log) return True elif step == 1: os.chdir("..") test_api.run("svn", "cp", wc_dir + "file1", wc_dir + "file2", output=log) return True elif step == 2: os.chdir("..") test_api.run("svn", "cp", wc_dir + "file1", wc_dir + "file3", output=log) f = open(wc_dir + "file3", "wb") print >> f, "This is the modified text" return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") os.mkdir("dir1/sdir1") os.mkdir("dir1/sdir2") f = open("dir1/file1", "wb") print >> f, "hello1" f = open("dir1/sdir1/file1", "wb") print >> f, "hello2" f = open("dir1/sdir2/file1", "wb") print >> f, "hello3" f = open("dir1/sdir2/file2", "wb") print >> f, "hello4" test_api.run("svn", "add", "dir1", output=log) return 1 elif step == 1: f = open("dir1/sdir2/file2", "ab") print >> f, "hello5" return 1 elif step == 2: f = open("dir1/sdir1/file2", "wb") print >> f, "hello6" test_api.run("svn", "add", "dir1/sdir1/file2", output=log) return 1 elif step == 3: test_api.run("svn", "up", output=log) test_api.run("svn", "rm", "dir1/sdir1", output=log) return 1 elif step == 4: test_api.run("svn", "rm", "dir1/sdir2/file1", output=log) return 1 elif step == 5: f = open("dir1/sdir2/file2", "ab") print >> f, "still there!" return 1 else: return 0
def setup(step, log): if step == 0: os.mkdir("dir1") os.mkdir("dir1/sdir1") os.mkdir("dir1/sdir2") f = open("dir1/file1","wb") print >>f, "hello1" f = open("dir1/sdir1/file1","wb") print >>f, "hello2" f = open("dir1/sdir2/file1","wb") print >>f, "hello3" f = open("dir1/sdir2/file2","wb") print >>f, "hello4" test_api.run("svn", "add", "dir1", output=log) return 1 elif step == 1: f = open("dir1/sdir2/file2","ab") print >>f, "hello5" return 1 elif step == 2: f = open("dir1/sdir1/file2","wb") print >>f, "hello6" test_api.run("svn", "add", "dir1/sdir1/file2", output=log) return 1 elif step == 3: test_api.run("svn", "up", output=log) test_api.run("svn", "rm", "dir1/sdir1", output=log) return 1 elif step == 4: test_api.run("svn", "rm", "dir1/sdir2/file1", output=log) return 1 elif step == 5: f = open("dir1/sdir2/file2","ab") print >>f, "still there!" return 1 else: return 0
def setup(step,log): if step == 0: os.mkdir("a") os.mkdir("a/dir1") os.mkdir("a/dir2") f = open("a/dir1/file1","wb") print >>f, "file1" f = open("a/dir1/file2","wb") print >>f, "file2" f = open("a/dir2/file3","wb") print >>f, "file3" test_api.run("svn", "add", "a", output = log) return True elif step == 1: test_api.run("svn", "cp", "a", "b", output=log) test_api.run("svn", "propset", "svn:ignore", "bogus", "b/dir1", output=log) return True else: return False
def setup(step, log): global wc_dir if step == 0: wc_dir = os.path.split(os.getcwd())[1] + "/" os.chdir("..") f = open(wc_dir + "file1", "wb") print >> f, "This is the original text" test_api.run("svn", "add", wc_dir + "file1", output=log) return True elif step == 1: os.chdir("..") test_api.run("svn", "cp", wc_dir + "file1", wc_dir + "file2", output=log) return True elif step == 2: os.chdir("..") test_api.run("svn", "cp", wc_dir + "file1", wc_dir + "file3", output=log) f = open(wc_dir + "file3", "wb") print >> f, "This is the modified text" return True else: return False
def setup(step, log): if step == 0: os.mkdir("a") os.mkdir("a/dir1") os.mkdir("a/dir2") f = open("a/dir1/file1", "wb") print >> f, "file1" f = open("a/dir1/file2", "wb") print >> f, "file2" f = open("a/dir2/file3", "wb") print >> f, "file3" test_api.run("svn", "add", "a", output=log) return True elif step == 1: test_api.run("svn", "cp", "a", "b", output=log) f = open("b/dir2/file4", "wb") print >> f, "file4" test_api.run("svn", "add", "b/dir2/file4", output=log) return True else: return False
def setup(step, log): if step == 0: os.makedirs("dir/dir2") test_api.run("svn", "add", "dir", output=log) return True elif step == 1: os.makedirs("dir/dir1/subdir") f = open("dir/dir1/file1", "wb") print >> f, "bli" f = open("dir/dir1/file2", "wb") print >> f, "bla" f = open("dir/dir1/subdir/file3", "wb") print >> f, "blubb" f = open("dir/dir1/subdir/file4", "wb") print >> f, "blubb 2" f = open("dir/dir1/subdir/file5", "wb") print >> f, "blubb" f = open("dir/dir1/subdir/file6", "wb") print >> f, "blubb 2" test_api.run("svn", "add", "dir/dir1", output=log) return True elif step == 2: f = open("dir/dir1/subdir/file6", "wb") print >> f, "fixed" return True elif step == 3: f = open("dir/dir2/file7", "wb") print >> f, "schibu" f = open("dir/dir2/file8", "wb") print >> f, "dubi" f = open("dir/dir2/file9", "wb") print >> f, "du" test_api.run("svn", "add", "dir/dir2/file7", "dir/dir2/file8", "dir/dir2/file9", output=log) return True elif step == 4: test_api.run("svn", "mv", "dir/dir1/file1", "dir/dir1/file10", output=log) test_api.run("svn", "mv", "dir/dir1/file2", "dir/dir1/file11", output=log) return True elif step == 5: f = open("dir/dir2/Printer.java", "wb") print >> f, "juhu" test_api.run("svn", "add", "dir/dir2/Printer.java", output=log) return True elif step == 6: f = open("dir/dir2/file7", "wb") print >> f, "yippie" return True elif step == 7: f = open("dir/dir2/file7", "wb") print >> f, "yeah" return True elif step == 8: test_api.run("svn", "up", output=log) test_api.run("svn", "cp", "dir/dir1@2", "dir/dir1_new", output=log) test_api.run("svn", "rm", "dir/dir1_new/file1", output=log) test_api.run("svn", "rm", "dir/dir1_new/file2", output=log) f = open("dir/dir1_new/file12.java", "wb") print >> f, "some" f = open("dir/dir1_new/file13.java", "wb") print >> f, "content" test_api.run("svn", "add", "dir/dir1_new/file12.java", "dir/dir1_new/file13.java", output=log) # test_api.run("svn", "rm", "dir2/subdir/file5", output = log) # test_api.run("svn", "rm", "dir2/subdir/file6", output = log) # test_api.run("svn", "rm", "dir2/subdir", output = log) # test_api.run("rm", "-rf", "dir2/subdir", output = log) # test_api.run("svn", "cp", "dir1/subdir", "dir2", output = log) # # f = open("dir2/subdir/file5_new","wb") # print >>f, "content_of_file5_new" # f = open("dir2/subdir/file6_new","wb") # print >>f, "content_of_file6_new" # test_api.run("svn", "add", "dir2/subdir/file5_new", "dir2/subdir/file6_new", output = log) # test_api.run("svn", "rm", "dir2/subdir/file5", "dir2/subdir/file6", output = log) # # f = open("dir2/subdir/file7_new","wb") # print >>f, "content_of_file7_new" # f = open("dir2/subdir/file8_new","wb") # print >>f, "content_of_file8_new" # test_api.run("svn", "add", "dir2/subdir/file7_new", "dir2/subdir/file8_new", output = log) # test_api.run("svn", "rm", "dir2/subdir/file7", "dir2/subdir/file8", output = log) # test_api.run("svn", "rm", "dir1/", output = log) return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1", "wb") print >>f, "hello1" print >>f, "hello2" test_api.run("svn", "add", "dir1", output = log) return True elif step == 1: test_api.run("svn", "propset", "eol-style", "LF", "dir1/file1", output = log) return True elif step == 2: f = open("dir1/file2", "wb") print >>f, "hello3" test_api.run("svn", "add", "dir1/file2", output = log) return True elif step == 3: test_api.run("svn", "copy", "dir1", "dir2", output = log) return True elif step == 4: f = open("dir2/file2", "ab") print >>f, "hello4" return True elif step == 5: os.mkdir("dir2/sdir1") f = open("dir2/sdir1/file1", "wb") print >>f, "hello5" f = open("dir1/file1", "wb") print >>f, "hello6" test_api.run("svn", "add", "dir2/sdir1", output = log) return True elif step == 6: f = open("dir2/sdir1/file1", "wb") print >>f, "hello7" f = open("dir2/sdir1/file2", "wb") print >>f, "hello8" test_api.run("svn", "add", "dir2/sdir1/file2", output = log) return True else: return False
def setup(step, log): if step == 0: os.makedirs("dir/dir2") test_api.run("svn", "add", "dir", output = log) return True elif step == 1: os.makedirs("dir/dir1/subdir") f = open("dir/dir1/file1", "wb") print >>f, "bli" f = open("dir/dir1/file2", "wb") print >>f, "bla" f = open("dir/dir1/subdir/file3", "wb") print >>f, "blubb" f = open("dir/dir1/subdir/file4", "wb") print >>f, "blubb 2" f = open("dir/dir1/subdir/file5", "wb") print >>f, "blubb" f = open("dir/dir1/subdir/file6", "wb") print >>f, "blubb 2" test_api.run("svn", "add", "dir/dir1", output = log) return True elif step == 2: f = open("dir/dir1/subdir/file6", "wb") print >>f, "fixed" return True elif step == 3: f = open("dir/dir2/file7", "wb") print >>f, "schibu" f = open("dir/dir2/file8", "wb") print >>f, "dubi" f = open("dir/dir2/file9", "wb") print >>f, "du" test_api.run("svn", "add", "dir/dir2/file7", "dir/dir2/file8", "dir/dir2/file9", output = log) return True elif step == 4: test_api.run("svn", "mv", "dir/dir1/file1", "dir/dir1/file10", output = log) test_api.run("svn", "mv", "dir/dir1/file2", "dir/dir1/file11", output = log) return True elif step == 5: f = open("dir/dir2/Printer.java", "wb") print >>f, "juhu" test_api.run("svn", "add", "dir/dir2/Printer.java", output = log) return True elif step == 6: f = open("dir/dir2/file7", "wb") print >>f, "yippie" return True elif step == 7: f = open("dir/dir2/file7", "wb") print >>f, "yeah" return True elif step == 8: test_api.run("svn", "up", output = log) test_api.run("svn", "cp", "dir/dir1@2", "dir/dir1_new", output = log) test_api.run("svn", "rm", "dir/dir1_new/file1", output = log) test_api.run("svn", "rm", "dir/dir1_new/file2", output = log) f = open("dir/dir1_new/file12.java", "wb") print >>f, "some" f = open("dir/dir1_new/file13.java", "wb") print >>f, "content" test_api.run("svn", "add", "dir/dir1_new/file12.java", "dir/dir1_new/file13.java", output = log) # test_api.run("svn", "rm", "dir2/subdir/file5", output = log) # test_api.run("svn", "rm", "dir2/subdir/file6", output = log) # test_api.run("svn", "rm", "dir2/subdir", output = log) # test_api.run("rm", "-rf", "dir2/subdir", output = log) # test_api.run("svn", "cp", "dir1/subdir", "dir2", output = log) # # f = open("dir2/subdir/file5_new","wb") # print >>f, "content_of_file5_new" # f = open("dir2/subdir/file6_new","wb") # print >>f, "content_of_file6_new" # test_api.run("svn", "add", "dir2/subdir/file5_new", "dir2/subdir/file6_new", output = log) # test_api.run("svn", "rm", "dir2/subdir/file5", "dir2/subdir/file6", output = log) # # f = open("dir2/subdir/file7_new","wb") # print >>f, "content_of_file7_new" # f = open("dir2/subdir/file8_new","wb") # print >>f, "content_of_file8_new" # test_api.run("svn", "add", "dir2/subdir/file7_new", "dir2/subdir/file8_new", output = log) # test_api.run("svn", "rm", "dir2/subdir/file7", "dir2/subdir/file8", output = log) # test_api.run("svn", "rm", "dir1/", output = log) return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1", "wb") print >> f, "hello1" print >> f, "hello2" test_api.run("svn", "add", "dir1", output=log) return True elif step == 1: test_api.run("svn", "propset", "eol-style", "LF", "dir1/file1", output=log) return True elif step == 2: f = open("dir1/file2", "wb") print >> f, "hello3" test_api.run("svn", "add", "dir1/file2", output=log) return True elif step == 3: test_api.run("svn", "copy", "dir1", "dir2", output=log) return True elif step == 4: f = open("dir2/file2", "ab") print >> f, "hello4" return True elif step == 5: os.mkdir("dir2/sdir1") f = open("dir2/sdir1/file1", "wb") print >> f, "hello5" f = open("dir1/file1", "wb") print >> f, "hello6" test_api.run("svn", "add", "dir2/sdir1", output=log) return True elif step == 6: f = open("dir2/sdir1/file1", "wb") print >> f, "hello7" f = open("dir2/sdir1/file2", "wb") print >> f, "hello8" test_api.run("svn", "add", "dir2/sdir1/file2", output=log) return True elif step == 7: test_api.run("svn", "copy", "dir2/sdir1", "dir2/sdir2", output=log) return True elif step == 8: f = open("dir2/sdir1/file2", "wb") print >> f, "hello10" return True elif step == 9: test_api.run("svn", "up", output=log) test_api.run("svn", "copy", "dir2/sdir2", "dir2/sdir3", output=log) return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1","wb") print >>f, "hello1" test_api.run("svn", "add", "dir1", output = log) return True elif step == 1: test_api.run("svn", "propset", "copyright", "(c) ME", "dir1/file1", output = log) test_api.run("svn", "propset", "license", "public domain", "dir1/file1", output = log) test_api.run("svn", "propset", "bla", "blubb", "dir1/file1", output = log) return True elif step == 2: test_api.run("svn", "up", output = log) test_api.run("svn", "propset", "svn:ignore", "*.o", "dir1", output = log) return True elif step == 3: os.mkdir("dir2") test_api.run("svn", "add", "dir2", output = log) test_api.run("svn", "propset", "svn:externals", "ext/test http://svn.collab.net/repos/svn/trunk/", "dir2", output = log) return True elif step == 4: os.mkdir("dir3") os.mkdir("dir3/subdir") f = open("dir3/subdir/file1","wb") print >>f, "hello1" test_api.run("svn", "add", "dir3", output = log) test_api.run("svn", "propset", "svn:externals", "ext/subversion http://svn.collab.net/repos/svn/trunk/", "dir3", output = log) return True elif step == 5: test_api.run("svn", "propset", "svn:eol-style", "native", "dir1/file1", output = log) return True elif step == 6: test_api.run("svn", "up", "--ignore-externals", output = log) test_api.run("svn", "propdel", "svn:ignore", "dir1", output = log) return True elif step == 7: f = open("dir1/file1","wb") print >>f, "hello2" test_api.run("svn", "propset", "svn:eol-style", "LF", "dir1/file1", output = log) return True elif step == 8: test_api.run("svn", "propdel", "copyright", "dir1/file1", output = log) return True # elif step == 9: # test_api.run("svn", "cp", "dir3", "dir4", output = log) # return True # elif step == 10: # test_api.run("svn", "up", output = log) # test_api.run("svn", "mv", "dir1", "dir4", output = log) # test_api.run("svn", "propset", "svn:ignore", "*.[oa]", "dir4", output = log) # return True # elif step == 11: # test_api.run("svn", "up", output = log) # test_api.run("svn", "mv", "dir4/file1", "dir4/file2", output = log) # return True else: return False
def setup(step, log): if step == 0: os.mkdir("foo") os.mkdir("foo/sdir1") os.mkdir("foo/sdir2") os.mkdir("foobar") os.mkdir("foobar/sdir1") f = open("foo/file1","wb") print >>f, "hello1" f = open("foo/sdir1/file1","wb") print >>f, "hello2" f = open("foo/sdir2/file1","wb") print >>f, "hello3" f = open("foobar/file1","wb") print >>f, "hello bar" f = open("foobar/sdir1/file1","wb") print >>f, "hello bar sub" test_api.run("svn", "add", "foo", output = log) test_api.run("svn", "add", "foobar", output = log) return True elif step == 1: f = open("foobar/file2","wb") print >>f, "hello4" test_api.run("svn", "add", "foobar/file2", output = log) return True elif step == 2: test_api.run("svn", "rm", "foobar/sdir1", output = log) f = open("foo/file2","wb") print >>f, "hello5" test_api.run("svn", "add", "foo/file2", output = log) return True elif step == 3: f = open("foo/file3","wb") print >>f, "hello5" test_api.run("svn", "add", "foo/file3", output = log) return True elif step == 4: test_api.run("svn", "rm", "foo/file2", output = log) return True else: return False
def setup(step, log): if step == 0: os.mkdir("dir1") f = open("dir1/file1", "wb") print >> f, "hello1" test_api.run("svn", "add", "dir1", output=log) return True elif step == 1: test_api.run("svn", "propset", "copyright", "(c) ME", "dir1/file1", output=log) test_api.run("svn", "propset", "license", "public domain", "dir1/file1", output=log) test_api.run("svn", "propset", "bla", "blubb", "dir1/file1", output=log) return True elif step == 2: test_api.run("svn", "up", output=log) test_api.run("svn", "propset", "svn:ignore", "*.o", "dir1", output=log) return True elif step == 3: os.mkdir("dir2") test_api.run("svn", "add", "dir2", output=log) test_api.run("svn", "propset", "svn:externals", "ext/test http://svn.collab.net/repos/svn/trunk/", "dir2", output=log) return True elif step == 4: os.mkdir("dir3") os.mkdir("dir3/subdir") f = open("dir3/subdir/file1", "wb") print >> f, "hello1" test_api.run("svn", "add", "dir3", output=log) test_api.run( "svn", "propset", "svn:externals", "ext/subversion http://svn.collab.net/repos/svn/trunk/", "dir3", output=log) return True elif step == 5: test_api.run("svn", "propset", "svn:eol-style", "native", "dir1/file1", output=log) return True elif step == 6: test_api.run("svn", "up", "--ignore-externals", output=log) test_api.run("svn", "propdel", "svn:ignore", "dir1", output=log) return True elif step == 7: f = open("dir1/file1", "wb") print >> f, "hello2" test_api.run("svn", "propset", "svn:eol-style", "LF", "dir1/file1", output=log) return True elif step == 8: test_api.run("svn", "propdel", "copyright", "dir1/file1", output=log) return True # elif step == 9: # test_api.run("svn", "cp", "dir3", "dir4", output = log) # return True # elif step == 10: # test_api.run("svn", "up", output = log) # test_api.run("svn", "mv", "dir1", "dir4", output = log) # test_api.run("svn", "propset", "svn:ignore", "*.[oa]", "dir4", output = log) # return True # elif step == 11: # test_api.run("svn", "up", output = log) # test_api.run("svn", "mv", "dir4/file1", "dir4/file2", output = log) # return True else: return False
def setup(step, log): if step == 0: os.mkdir("foo") os.mkdir("foo/sdir1") os.mkdir("foo/sdir2") os.mkdir("foobar") os.mkdir("foobar/sdir1") f = open("foo/file1", "wb") print >> f, "hello1" f = open("foo/sdir1/file1", "wb") print >> f, "hello2" f = open("foo/sdir2/file1", "wb") print >> f, "hello3" f = open("foobar/file1", "wb") print >> f, "hello bar" f = open("foobar/sdir1/file1", "wb") print >> f, "hello bar sub" test_api.run("svn", "add", "foo", output=log) test_api.run("svn", "add", "foobar", output=log) return True elif step == 1: f = open("foobar/file2", "wb") print >> f, "hello4" test_api.run("svn", "add", "foobar/file2", output=log) return True elif step == 2: test_api.run("svn", "rm", "foobar/sdir1", output=log) f = open("foo/file2", "wb") print >> f, "hello5" test_api.run("svn", "add", "foo/file2", output=log) return True elif step == 3: f = open("foo/file3", "wb") print >> f, "hello5" test_api.run("svn", "add", "foo/file3", output=log) return True elif step == 4: test_api.run("svn", "rm", "foo/file2", output=log) return True else: return False