code
stringlengths
3
6.57k
paged_diffs()
self.assertEqual(sorted(actual.keys()
sorted(empty.keys()
test_diff_create_file(self)
self.repo.commit(next(self.repo.log(1, id_only=True, limit=1)
test_diff_create_path(self)
self.repo.commit(next(self.repo.log(2, id_only=True, limit=1)
sorted(actual.added)
test_diff_modify_file(self)
self.repo.commit(next(self.repo.log(3, id_only=True, limit=1)
test_diff_delete(self)
self.repo.commit(next(self.repo.log(4, id_only=True, limit=1)
test_diff_copy(self)
self.repo.commit(next(self.repo.log(5, id_only=True, limit=1)
assert_equals(dict(entry.diffs)
test_commit(self)
self.repo.commit(1)
test_svn_path_exists(self)
svn_path_exists("file://%s/a" % repo_path)
svn_path_exists("file://%s" % repo_path)
svn_path_exists("file://%s/badpath" % repo_path)
mock.patch('forgesvn.model.svn.pysvn')
svn_path_exists('dummy')
skipUnless(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')
test_tarball(self)
os.path.join(tmpdir, 'svn/t/te/test/testsvn')
assert_equal(self.repo.tarball_url('1')
self.repo.tarball('1')
os.path.join(tmpdir, "svn/t/te/test/testsvn/test-src-r1.zip")
os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-r1.zip')
assert_equal(tarball_zip.namelist()
shutil.rmtree(self.repo.tarball_path.encode('utf-8')
skipUnless(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')
test_tarball_paths(self)
h.set_context('test', 'svn-tags', neighborhood='Projects')
os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
self.svn_tags.tarball(rev, '/tags/tag-1.0/')
os.path.isfile(fn)
ZipFile(fn, 'r')
assert_equal(sorted(snapshot.namelist()
os.remove(fn)
directory (of tags)
self.svn_tags.tarball(rev, '/tags/')
os.path.isfile(fn)
ZipFile(fn, 'r')
assert_equal(sorted(snapshot.namelist()
os.remove(fn)
self.svn_tags.tarball(rev)
os.path.isfile(fn)
ZipFile(fn, 'r')
assert_equal(sorted(snapshot.namelist()
os.remove(fn)
h.set_context('test', 'src', neighborhood='Projects')
os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-r1.zip')
self.repo.tarball('1')
os.path.isfile(fn)
ZipFile(fn, 'r')
assert_equal(snapshot.namelist()
shutil.rmtree(os.path.join(tmpdir, 'svn/t/te/test/testsvn/')
shutil.rmtree(tarball_path, ignore_errors=True)
test_is_empty(self)
self.repo.is_empty()
TempDirectory()
repo2.init()
repo2.is_empty()
repo2.refresh()
ThreadLocalORMSession.flush_all()
repo2.is_empty()
test_webhook_payload(self)
RepoPushWebhookSender()
list(self.repo.all_commit_ids()
len(all_commits)
sender.get_payload(commit_ids=cids)
datetime(2013, 11, 8, 13, 38, 11, 152000)
datetime(2010, 11, 18, 20, 14, 21, 515000)
assert_equals(payload, expected_payload)
TestSVNRev(unittest.TestCase)
setUp(self)
setup_basic_test()
self.setup_with_tools()
setup_with_tools(self)
setup_global_objects()
h.set_context('test', 'src', neighborhood='Projects')
self.repo.refresh()
self.repo.commit(1)
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
test_url(self)
self.rev.url()
endswith('/1/')
test_primary(self)
self.rev.primary()
test_shorthand(self)
self.rev.shorthand_id()
test_diff(self)
print(d)
_oid(self, rev_id)
test_log(self)
list(self.repo.log(self.repo.head, id_only=True, limit=25)
assert_equal(commits, [7, 6, 5, 4, 3, 2, 1])