You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/06/03 21:19:00 UTC
[01/38] git commit: [#6308] Move tickets in a consistent order
Updated Branches:
refs/heads/cj/6218 253dbae1f -> 2c463e281 (forced update)
[#6308] Move tickets in a consistent order
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a6abdb02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a6abdb02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a6abdb02
Branch: refs/heads/cj/6218
Commit: a6abdb025122f5a234793c70bc09ce8422030375
Parents: 956b6c5
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu May 30 19:48:46 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu May 30 20:21:47 2013 +0000
----------------------------------------------------------------------
ForgeTracker/forgetracker/model/ticket.py | 2 +-
.../forgetracker/tests/functional/test_root.py | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a6abdb02/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index bc2d0c2..204948f 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -231,7 +231,7 @@ class Globals(MappedClass):
tracker = AppConfig.query.get(_id=destination_tracker_id)
tickets = Ticket.query.find(dict(
_id={'$in': [ObjectId(id) for id in ticket_ids]},
- app_config_id=c.app.config._id)).all()
+ app_config_id=c.app.config._id)).sort('ticket_num').all()
filtered = self.filtered_by_subscription({t._id: t for t in tickets})
original_ticket_nums = {t._id: t.ticket_num for t in tickets}
users = User.query.find({'_id': {'$in': filtered.keys()}}).all()
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a6abdb02/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index b7e7dd8..7423e2b 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -2393,8 +2393,13 @@ class TestBulkMove(TrackerTestController):
assert_equal(len(admin_email), 1)
assert_equal(len(monitoring_email), 1)
admin_email_text = admin_email[0].kwargs.text
+ assert_in('test:bugs:#1 --> test2:bugs2:#1 A New Hope', admin_email_text)
+ assert_in('test:bugs:#2 --> test2:bugs2:#2 The Empire Strikes Back', admin_email_text)
+ assert_in('test:bugs:#3 --> test2:bugs2:#3 Return Of The Jedi', admin_email_text)
monitoring_email_text = monitoring_email[0].kwargs.text
- assert_equal(admin_email_text, monitoring_email_text)
+ assert_in('test:bugs:#1 --> test2:bugs2:#1 A New Hope', monitoring_email_text)
+ assert_in('test:bugs:#2 --> test2:bugs2:#2 The Empire Strikes Back', monitoring_email_text)
+ assert_in('test:bugs:#3 --> test2:bugs2:#3 Return Of The Jedi', monitoring_email_text)
@td.with_tool('test2', 'Tickets', 'bugs2')
def test_monitoring_email_public_only(self):
[18/38] git commit: [#6235] ticket:366 Fix tarball_filename for svn
Posted by jo...@apache.org.
[#6235] ticket:366 Fix tarball_filename for svn
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e4064477
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e4064477
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e4064477
Branch: refs/heads/cj/6218
Commit: e4064477183a3b150417aabefffa3fcb53cdd8f8
Parents: 5068fa1
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 24 14:45:23 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/model/svn.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e4064477/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 9d0a521..811380a 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -102,9 +102,9 @@ class Repository(M.Repository):
return self._impl.commit(self.heads[0].object_id)
def tarball_filename(self, revision, path=None):
- fn = super(Repository, self).tarball_filename(revision, path)
+ fn = super(Repository, self).tarball_filename(revision, path)
path = self._impl._path_to_root(path, revision)
- fn += '-' + '-'.join(path.split('/'))
+ fn += ('-' + '-'.join(path.split('/'))) if path else ''
return fn
[28/38] git commit: [#6307] do exact match instead of substring match
on search bin & milestone names
Posted by jo...@apache.org.
[#6307] do exact match instead of substring match on search bin & milestone names
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dafd0e9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dafd0e9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dafd0e9c
Branch: refs/heads/cj/6218
Commit: dafd0e9c3d257ef8f3f9a3bf6bc1218940dc37ec
Parents: 73f84ed
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu May 30 19:19:11 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Mon Jun 3 16:47:16 2013 +0000
----------------------------------------------------------------------
ForgeTracker/forgetracker/tracker_main.py | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dafd0e9c/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 7fbbe9c..223911b 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -311,11 +311,13 @@ class ForgeTrackerApp(Application):
$.ajax({
url:'%(app_url)sbin_counts',
success: function(data) {
+ var $spans = $('.search_bin > span');
$.each(data.bin_counts, function(i, item) {
- var $span = $('.search_bin span:contains("' + item.label + '")');
- if ($span) {
- $span.after('<small>' + item.count + '</small>').fadeIn('fast');
- }
+ $spans.each(function(){
+ if ($(this).text() == item.label) {
+ $(this).after('<small>' + item.count + '</small>').fadeIn('fast');
+ }
+ });
});
}
});
@@ -323,11 +325,13 @@ class ForgeTrackerApp(Application):
$.ajax({
url: '%(app_url)smilestone_counts',
success: function(data) {
+ var $spans = $('.milestones > span');
$.each(data.milestone_counts, function(i, item) {
- var $span = $('.milestones span:contains("' + item.name + '")');
- if ($span) {
- $span.after('<small>' + item.count + '</small>').fadeIn('fast');
- }
+ $spans.each(function(){
+ if ($(this)) {
+ $(this).after('<small>' + item.count + '</small>').fadeIn('fast');
+ }
+ });
});
}
});
[20/38] git commit: [#6235] ticket:366 Test for
SVNImplementation._path_to_root()
Posted by jo...@apache.org.
[#6235] ticket:366 Test for SVNImplementation._path_to_root()
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/85fbe7d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/85fbe7d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/85fbe7d9
Branch: refs/heads/cj/6218
Commit: 85fbe7d9990bdb82e3e729af41ee42e5416cfcfd
Parents: 6a77c65
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 29 06:34:37 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
.../forgesvn/tests/model/test_svnimplementation.py | 32 +++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/85fbe7d9/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py b/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
index 9b78c0c..c23c6b3 100644
--- a/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
+++ b/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
@@ -74,3 +74,35 @@ class TestSVNImplementation(object):
assert_equal(entries, {path.strip('/'): '5057636b9c1040636b81e4b1:1'})
assert_equal(impl._svn.info2.call_args[0][0], 'file://'+g.tmpdir+'/code/trunk')
+
+ @patch('forgesvn.model.svn.svn_path_exists')
+ def test__path_to_root(self, path_exists):
+ repo = Mock(fs_path=g.tmpdir+'/')
+ repo.name = 'code'
+ repo._id = '5057636b9c1040636b81e4b1'
+ impl = SVNImplementation(repo)
+ path_exists.return_value = False
+ # edge cases
+ assert_equal(impl._path_to_root(None), '')
+ assert_equal(impl._path_to_root(''), '')
+ assert_equal(impl._path_to_root('/some/path/'), '')
+ assert_equal(impl._path_to_root('some/path'), '')
+ # tags
+ assert_equal(impl._path_to_root('/some/path/tags/1.0/some/dir'), 'some/path/tags/1.0')
+ assert_equal(impl._path_to_root('/some/path/tags/1.0/'), 'some/path/tags/1.0')
+ assert_equal(impl._path_to_root('/some/path/tags/'), '')
+ # branches
+ assert_equal(impl._path_to_root('/some/path/branches/b1/dir'), 'some/path/branches/b1')
+ assert_equal(impl._path_to_root('/some/path/branches/b1/'), 'some/path/branches/b1')
+ assert_equal(impl._path_to_root('/some/path/branches/'), '')
+ # trunk
+ assert_equal(impl._path_to_root('/some/path/trunk/some/dir/'), 'some/path/trunk')
+ assert_equal(impl._path_to_root('/some/path/trunk'), 'some/path/trunk')
+ # with fallback to trunk
+ path_exists.return_value = True
+ assert_equal(impl._path_to_root(''), 'trunk')
+ assert_equal(impl._path_to_root('/some/path/'), 'trunk')
+ assert_equal(impl._path_to_root('/tags/'), 'trunk')
+ assert_equal(impl._path_to_root('/branches/'), 'trunk')
+ assert_equal(impl._path_to_root('/tags/1.0'), 'tags/1.0')
+ assert_equal(impl._path_to_root('/branches/branch'), 'branches/branch')
[27/38] git commit: [#6307] Only update milestone with matching name
Posted by jo...@apache.org.
[#6307] Only update milestone with matching name
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4caff7c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4caff7c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4caff7c4
Branch: refs/heads/cj/6218
Commit: 4caff7c4961f346fd0a9ffef21aeea81179a42ac
Parents: dafd0e9
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Mon Jun 3 16:45:38 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Mon Jun 3 16:47:16 2013 +0000
----------------------------------------------------------------------
ForgeTracker/forgetracker/tracker_main.py | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4caff7c4/ForgeTracker/forgetracker/tracker_main.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tracker_main.py b/ForgeTracker/forgetracker/tracker_main.py
index 223911b..aabf321 100644
--- a/ForgeTracker/forgetracker/tracker_main.py
+++ b/ForgeTracker/forgetracker/tracker_main.py
@@ -313,8 +313,8 @@ class ForgeTrackerApp(Application):
success: function(data) {
var $spans = $('.search_bin > span');
$.each(data.bin_counts, function(i, item) {
- $spans.each(function(){
- if ($(this).text() == item.label) {
+ $spans.each(function() {
+ if ($(this).text() === item.label) {
$(this).after('<small>' + item.count + '</small>').fadeIn('fast');
}
});
@@ -327,8 +327,8 @@ class ForgeTrackerApp(Application):
success: function(data) {
var $spans = $('.milestones > span');
$.each(data.milestone_counts, function(i, item) {
- $spans.each(function(){
- if ($(this)) {
+ $spans.each(function() {
+ if ($(this).text() === item.name) {
$(this).after('<small>' + item.count + '</small>').fadeIn('fast');
}
});
[02/38] git commit: [#6308] Fixed sporadically failing test due to
non-mocked SMTP
Posted by jo...@apache.org.
[#6308] Fixed sporadically failing test due to non-mocked SMTP
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9bd1343c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9bd1343c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9bd1343c
Branch: refs/heads/cj/6218
Commit: 9bd1343cc7e435ca8a903ecb87519f08768e5aa7
Parents: a6abdb0
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu May 30 20:22:13 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu May 30 20:22:13 2013 +0000
----------------------------------------------------------------------
ForgeUserStats/forgeuserstats/tests/test_stats.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9bd1343c/ForgeUserStats/forgeuserstats/tests/test_stats.py
----------------------------------------------------------------------
diff --git a/ForgeUserStats/forgeuserstats/tests/test_stats.py b/ForgeUserStats/forgeuserstats/tests/test_stats.py
index fad927c..90a467e 100644
--- a/ForgeUserStats/forgeuserstats/tests/test_stats.py
+++ b/ForgeUserStats/forgeuserstats/tests/test_stats.py
@@ -169,9 +169,10 @@ class TestStats(TestController):
assert tickets_artifacts['created'] == initial_tickets_artifacts['created'] + 2
assert tickets_artifacts['modified'] == initial_tickets_artifacts['modified'] + 3
-class TestGitCommit(unittest.TestCase, TestController):
+class TestGitCommit(TestController, unittest.TestCase):
def setUp(self):
+ super(TestGitCommit, self).setUp()
setup_basic_test()
user = User.by_username('test-admin')
[34/38] git commit: [#6287] Remove symlink workarounds for PIL from
travis-ci.org config file
Posted by jo...@apache.org.
[#6287] Remove symlink workarounds for PIL from travis-ci.org config file
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cf25d5e6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cf25d5e6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cf25d5e6
Branch: refs/heads/cj/6218
Commit: cf25d5e6d4b58955fa90dbbb89b651e458b5dc68
Parents: c33c65f
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Mon Jun 3 17:31:28 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 18:38:36 2013 +0000
----------------------------------------------------------------------
.travis.yml | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cf25d5e6/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 5e8a8d4..c335487 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,8 +20,6 @@ python:
- "2.7"
before_install:
- sudo apt-get install -qq python-svn libjpeg8-dev zlib1g-dev
- - sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib # pending #6255
- - sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib # pending #6255
install: "pip install -r requirements.txt --use-mirrors"
before_script:
- ln -s /usr/lib/python2.7/dist-packages/pysvn $VIRTUAL_ENV/lib/python2.7/site-packages/
[06/38] git commit: [#6235] ticket:352 tags/branches/trunk aware
snapshot names
Posted by jo...@apache.org.
[#6235] ticket:352 tags/branches/trunk aware snapshot names
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8e25e0c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8e25e0c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8e25e0c0
Branch: refs/heads/cj/6218
Commit: 8e25e0c03b895e39ca123441ebcdf1a0ec3df9e5
Parents: 77ae4f6
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 12:09:26 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:05 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 17 +++++---
ForgeSVN/forgesvn/model/svn.py | 40 +++++++++++++----
ForgeSVN/forgesvn/tests/model/test_repository.py | 29 +++++++-----
3 files changed, 58 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8e25e0c0/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 37b95ab..b728987 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -132,7 +132,7 @@ class RepositoryImplementation(object):
'''Return count of the commits related to path'''
raise NotImplementedError, 'commits_count'
- def tarball(self, revision):
+ def tarball(self, revision, path=None):
'''Create a tarball for the revision'''
raise NotImplementedError, 'tarball'
@@ -266,10 +266,13 @@ class Repository(Artifact, ActivityObject):
self.project.shortname,
self.name)
- def tarball_filename(self, revision):
+ def tarball_filename(self, revision, path=None):
shortname = c.project.shortname.replace('/', '-')
mount_point = c.app.config.options.mount_point
filename = '%s-%s-%s' % (shortname, mount_point, revision)
+ if path:
+ path = path.strip('/')
+ filename += '-' + '-'.join(path.split('/'))
return filename
def tarball_url(self, revision):
@@ -282,8 +285,8 @@ class Repository(Artifact, ActivityObject):
filename)
return urljoin(tg.config.get('scm.repos.tarball.url_prefix', '/'), r)
- def get_tarball_status(self, revision):
- pathname = os.path.join(self.tarball_path, self.tarball_filename(revision))
+ def get_tarball_status(self, revision, path=None):
+ pathname = os.path.join(self.tarball_path, self.tarball_filename(revision, path))
filename = '%s%s' % (pathname, '.zip')
tmpfilename = '%s%s' % (pathname, '.tmp')
@@ -551,8 +554,10 @@ class Repository(Artifact, ActivityObject):
def forks(self):
return self.query.find({'upstream_repo.name': self.url()}).all()
- def tarball(self, revision):
- self._impl.tarball(revision)
+ def tarball(self, revision, path=None):
+ if path:
+ path = path.strip('/')
+ self._impl.tarball(revision, path)
class MergeRequest(VersionedArtifact, ActivityObject):
statuses=['open', 'merged', 'rejected']
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8e25e0c0/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 2189a7f..b649dae 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -636,23 +636,45 @@ class SVNImplementation(M.RepositoryImplementation):
entries[path] = self._oid(info.last_changed_rev.number)
return entries
- def tarball(self, commit):
+ def _path_to_root(self, path):
+ '''Return tag/branch/trunk root for given path inside svn repo'''
+ if path:
+ path = path.strip('/').split('/')
+ idx = None
+ if 'tags' in path:
+ idx = path.index('tags')
+ elif 'branches' in path:
+ idx = path.index('branches')
+ if idx is not None and idx < len(path) - 1: # e.g. path/tags/tag-1.0/...
+ return '/'.join(path[:idx + 2]) # path/tags/tag-1.0
+ if 'trunk' in path:
+ idx = path.index('trunk')
+ return '/'.join(path[:idx + 1]) # path/trunk
+ # no tag/brach/trunk in path
+ trunk_exists = svn_path_exists(
+ 'file://%s%s/%s' % (self._repo.fs_path, self._repo.name, 'trunk'))
+ if trunk_exists:
+ return 'trunk'
+ return ''
+
+ def tarball(self, commit, path=None):
+ path = self._path_to_root(path)
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
- archive_name = self._repo.tarball_filename(commit)
- path = os.path.join(self._repo.tarball_path, archive_name)
+ archive_name = self._repo.tarball_filename(commit, path)
+ dest = os.path.join(self._repo.tarball_path, archive_name)
filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.zip'))
tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
- if os.path.exists(path):
- rmtree(path)
+ rmtree(dest, ignore_errors=True)
+ path = os.path.join(self._url, '')#path)
try:
- self._svn.export(self._url,
- path,
+ self._svn.export(path,
+ dest,
revision=pysvn.Revision(pysvn.opt_revision_kind.number, commit))
- zipdir(path, tmpfilename)
+ zipdir(dest, tmpfilename)
os.rename(tmpfilename, filename)
finally:
- rmtree(path)
+ rmtree(dest, ignore_errors=True)
if os.path.exists(tmpfilename):
os.remove(tmpfilename)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8e25e0c0/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index c528004..9a22ae1 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -314,60 +314,63 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_tags(self):
# TODO: check zip that it actually contains only needed files
- tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
self.svn_tags.tarball('1', '/tags/tag-1.0/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# if inside of tags, but no tag is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/tags/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_branches(self):
# TODO: check zip that it actually contains only needed files
- tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
self.svn_tags.tarball('1', '/branches/aaa/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
self.svn_tags.tarball('1', '/branches/aaa/some/path/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# if inside of branches, but no branch is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/branches/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_trunk(self):
# TODO: check zip that it actually contains only needed files
- tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/trunk/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
self.svn_tags.tarball('1', '/trunk/some/path/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# no path, but there are trunk in the repo
# expect snapshot of trunk
self.svn_tags.tarball('1')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# no path, and no trunk dir
# expect snapshot of repo root
fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
self.repo.tarball('1')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
def test_is_empty(self):
[15/38] git commit: [#6235] ticket:352 Don't run test for snapshot if
zip binary isn't available
Posted by jo...@apache.org.
[#6235] ticket:352 Don't run test for snapshot if zip binary isn't available
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d0edb5c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d0edb5c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d0edb5c2
Branch: refs/heads/cj/6218
Commit: d0edb5c2fa3300bc8d9aeaceb1a7537cb004a5f8
Parents: 2e55361
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:51:12 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
.../forgesvn/tests/functional/test_controllers.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d0edb5c2/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 5a69ee6..2575f58 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -17,11 +17,14 @@
import json
import shutil
+import os
+import tg
import pkg_resources
from pylons import tmpl_context as c
from ming.orm import ThreadLocalORMSession
from nose.tools import assert_equal
+from IPython.testing.decorators import onlyif
from allura import model as M
from allura.lib import helpers as h
@@ -185,6 +188,7 @@ class TestRootController(SVNTestController):
r = self.app.get('/src/2/log/?path=does/not/exist/')
assert 'No (more) commits' in r
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball(self):
r = self.app.get('/src/3/tree/')
assert 'Download Snapshot' in r
@@ -195,6 +199,7 @@ class TestRootController(SVNTestController):
r = self.app.get('/src/3/tarball_status')
assert '{"status": "ready"}' in r
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_tags_aware(self):
h.set_context('test', 'svn-tags', neighborhood='Projects')
shutil.rmtree(c.app.repo.tarball_path, ignore_errors=True)
[21/38] git commit: [#6235] include path in logging
Posted by jo...@apache.org.
[#6235] include path in logging
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7f945398
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7f945398
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7f945398
Branch: refs/heads/cj/6218
Commit: 7f945398e8828c6c13b424cc95aed2f86dcdae99
Parents: ab5f161
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:13:54 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:10 2013 +0000
----------------------------------------------------------------------
Allura/allura/tasks/repo_tasks.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7f945398/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 95d7052..a99d7d0 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -132,6 +132,6 @@ def tarball(revision=None, path=None):
try:
repo.tarball(revision, path)
except:
- log.error('Could not create tarball for repository %s:%s revision %s' % (c.project.shortname, c.app.config.options.mount_point, revision), exc_info=True)
+ log.error('Could not create tarball for repository %s:%s revision %s path %s' % (c.project.shortname, c.app.config.options.mount_point, revision, path), exc_info=True)
else:
log.warn('Creation of tarball for %s:%s skipped because revision is not specified' % (c.project.shortname, c.app.config.options.mount_point))
[33/38] git commit: [#6287] provide travis-ci.org config file
Posted by jo...@apache.org.
[#6287] provide travis-ci.org config file
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c33c65fe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c33c65fe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c33c65fe
Branch: refs/heads/cj/6218
Commit: c33c65fe47cf378aa12b92737eb126c08b263f34
Parents: ec7b960
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed May 29 10:03:21 2013 -0400
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 18:38:35 2013 +0000
----------------------------------------------------------------------
.travis.yml | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c33c65fe/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..5e8a8d4
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+language: python
+python:
+ - "2.7"
+before_install:
+ - sudo apt-get install -qq python-svn libjpeg8-dev zlib1g-dev
+ - sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib # pending #6255
+ - sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib # pending #6255
+install: "pip install -r requirements.txt --use-mirrors"
+before_script:
+ - ln -s /usr/lib/python2.7/dist-packages/pysvn $VIRTUAL_ENV/lib/python2.7/site-packages/
+ - ./rebuild-all.bash
+script: ./run_tests
[32/38] git commit: [#5646] upgrade pygments
Posted by jo...@apache.org.
[#5646] upgrade pygments
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ec7b960e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ec7b960e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ec7b960e
Branch: refs/heads/cj/6218
Commit: ec7b960e40ccce5490c284de6480d0826d6992a1
Parents: 8463818
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Jun 3 18:21:43 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Jun 3 18:21:43 2013 +0000
----------------------------------------------------------------------
requirements-common.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ec7b960e/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 1f5067e..f80e240 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -29,7 +29,7 @@ PasteDeploy==1.5.0
PasteScript==1.7.4.2
Pillow==2.0.0
poster==0.8.1
-Pygments==1.5
+Pygments==1.6
pymongo==2.4.2
Pypeline==0.1dev
pysolr==2.1.0-beta
[38/38] git commit: [#6218] Added docstring to
get_heads/branches/tags explaining why it's not a property
Posted by jo...@apache.org.
[#6218] Added docstring to get_heads/branches/tags explaining why it's not a property
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2c463e28
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2c463e28
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2c463e28
Branch: refs/heads/cj/6218
Commit: 2c463e28126af7c870a643ccf0a6966a412929a6
Parents: 0028dd4
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Mon Jun 3 19:18:39 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 19:18:39 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2c463e28/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 78e16e2..dfb92f1 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -331,10 +331,31 @@ class Repository(Artifact, ActivityObject):
def is_empty(self):
return self._impl.is_empty()
def get_heads(self):
+ """
+ Return list of heads for the repo.
+
+ It's get_heads() instead of a heads (lazy) property because it would
+ conflict with the now deprecated heads field. Eventually, we should
+ try to remove the deprecated fields and clean this up.
+ """
return self._impl.heads
def get_branches(self):
+ """
+ Return list of branches for the repo.
+
+ It's get_branches() instead of a branches (lazy) property because it
+ would conflict with the now deprecated branches field. Eventually, we
+ should try to remove the deprecated fields and clean this up.
+ """
return self._impl.branches
def get_tags(self):
+ """
+ Return list of tags for the repo.
+
+ It's get_tags() instead of a tags (lazy) property because it
+ would conflict with the now deprecated tags field. Eventually, we
+ should try to remove the deprecated fields and clean this up.
+ """
return self._impl.tags
def _log(self, rev, skip, limit):
[23/38] git commit: [#6235] bump forgehg version
Posted by jo...@apache.org.
[#6235] bump forgehg version
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8a71b16d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8a71b16d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8a71b16d
Branch: refs/heads/cj/6218
Commit: 8a71b16d63440fd65bc305fd917f53fc08b0f246
Parents: 7f94539
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:26:27 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:26:27 2013 +0000
----------------------------------------------------------------------
requirements-sf.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8a71b16d/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 6686610..5ea8a38 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -4,7 +4,7 @@ akismet==0.2.0
amqplib==0.6.1
kombu==1.0.4
coverage==3.5a1-20110413
-ForgeHg==0.1.10
+ForgeHg==0.1.11
ForgePastebin==0.2.6
mechanize==0.2.4
MySQL-python==1.2.3c1
[14/38] git commit: [#6235] ticket:366 Use g.tmpdir in tests
Posted by jo...@apache.org.
[#6235] ticket:366 Use g.tmpdir in tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2cd57fd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2cd57fd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2cd57fd8
Branch: refs/heads/cj/6218
Commit: 2cd57fd8c4a2e5227f3c58b48c9e74ef154e5045
Parents: d0edb5c
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 24 14:04:55 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2cd57fd8/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 28b980b..5840033 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -319,7 +319,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
'test-svn-tags-19-tags-tag-1.0/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+ tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
self.svn_tags.tarball(rev, '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
@@ -353,7 +353,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-branches-aaa/svn-commit.tmp',
'test-svn-tags-19-branches-aaa/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+ tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
self.svn_tags.tarball(rev, '/branches/aaa/')
assert os.path.isfile(fn), fn
@@ -388,7 +388,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-trunk/ccc.txt',
'test-svn-tags-19-trunk/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+ tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-trunk.zip'
self.svn_tags.tarball(rev, '/trunk/')
assert os.path.isfile(fn), fn
@@ -410,12 +410,12 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
# no path, and no trunk dir
# expect snapshot of repo root
h.set_context('test', 'src', neighborhood='Projects')
- fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
+ fn = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/test-src-1.zip')
self.repo.tarball('1')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
- shutil.rmtree('/tmp/tarball/svn/t/te/test/testsvn/', ignore_errors=True)
+ shutil.rmtree(os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/'), ignore_errors=True)
shutil.rmtree(tarball_path, ignore_errors=True)
def test_is_empty(self):
[04/38] git commit: [#6235] ticket:352 Add svn repo with
trunk/tags/branches for tests
Posted by jo...@apache.org.
[#6235] ticket:352 Add svn repo with trunk/tags/branches for tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/67a10215
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/67a10215
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/67a10215
Branch: refs/heads/cj/6218
Commit: 67a102151d6789ec38e0cef5a87a09156831a33a
Parents: 56830d9
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 09:49:40 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:03 2013 +0000
----------------------------------------------------------------------
.../.SOURCEFORGE-REPOSITORY | 1 +
.../data/testsvn-trunk-tags-branches/README.txt | 5 +
.../data/testsvn-trunk-tags-branches/conf/authz | 32 ++++++
.../data/testsvn-trunk-tags-branches/conf/passwd | 8 ++
.../testsvn-trunk-tags-branches/conf/svnserve.conf | 47 +++++++++
.../data/testsvn-trunk-tags-branches/db/current | 1 +
.../data/testsvn-trunk-tags-branches/db/format | 2 +
.../data/testsvn-trunk-tags-branches/db/fs-type | 1 +
.../data/testsvn-trunk-tags-branches/db/fsfs.conf | 37 +++++++
.../db/min-unpacked-rev | 1 +
.../testsvn-trunk-tags-branches/db/revprops/0/0 | 17 +++
.../testsvn-trunk-tags-branches/db/revprops/0/1 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/10 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/11 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/12 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/13 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/14 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/15 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/16 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/17 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/18 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/19 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/2 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/3 | 14 +++
.../testsvn-trunk-tags-branches/db/revprops/0/4 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/5 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/6 | 14 +++
.../testsvn-trunk-tags-branches/db/revprops/0/7 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/8 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/9 | 13 +++
.../data/testsvn-trunk-tags-branches/db/revs/0/0 | 11 ++
.../data/testsvn-trunk-tags-branches/db/revs/0/1 | 25 +++++
.../data/testsvn-trunk-tags-branches/db/revs/0/10 | Bin 0 -> 717 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/11 | Bin 0 -> 727 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/12 | Bin 0 -> 698 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/13 | 41 ++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/14 | 50 +++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/15 | Bin 0 -> 780 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/16 | 50 +++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/17 | Bin 0 -> 816 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/18 | 50 +++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/19 | Bin 0 -> 810 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/2 | Bin 0 -> 628 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/3 | Bin 0 -> 723 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/4 | Bin 0 -> 708 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/5 | Bin 0 -> 687 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/6 | Bin 0 -> 692 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/7 | Bin 0 -> 696 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/8 | Bin 0 -> 700 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/9 | Bin 0 -> 704 bytes
.../testsvn-trunk-tags-branches/db/txn-current | 1 +
.../tests/data/testsvn-trunk-tags-branches/db/uuid | 1 +
.../tests/data/testsvn-trunk-tags-branches/format | 1 +
.../testsvn-trunk-tags-branches/hooks/post-commit | 8 ++
.../hooks/post-commit.tmpl | 50 +++++++++
.../hooks/post-lock.tmpl | 44 ++++++++
.../hooks/post-revprop-change.tmpl | 56 ++++++++++
.../hooks/post-unlock.tmpl | 42 ++++++++
.../hooks/pre-commit.tmpl | 81 +++++++++++++++
.../hooks/pre-lock.tmpl | 71 +++++++++++++
.../hooks/pre-revprop-change | 1 +
.../hooks/pre-revprop-change.tmpl | 66 ++++++++++++
.../hooks/pre-unlock.tmpl | 63 +++++++++++
.../hooks/start-commit.tmpl | 65 ++++++++++++
.../testsvn-trunk-tags-branches/locks/db-logs.lock | 3 +
.../data/testsvn-trunk-tags-branches/locks/db.lock | 3 +
66 files changed, 1184 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY
new file mode 100644
index 0000000..f2990b4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY
@@ -0,0 +1 @@
+svn
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt
new file mode 100644
index 0000000..3bf5a57
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt
@@ -0,0 +1,5 @@
+This is a Subversion repository; use the 'svnadmin' tool to examine
+it. Do not add, delete, or modify files here unless you know how
+to avoid corrupting the repository.
+
+Visit http://subversion.tigris.org/ for more information.
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz
new file mode 100644
index 0000000..0b9a410
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz
@@ -0,0 +1,32 @@
+### This file is an example authorization file for svnserve.
+### Its format is identical to that of mod_authz_svn authorization
+### files.
+### As shown below each section defines authorizations for the path and
+### (optional) repository specified by the section name.
+### The authorizations follow. An authorization line can refer to:
+### - a single user,
+### - a group of users defined in a special [groups] section,
+### - an alias defined in a special [aliases] section,
+### - all authenticated users, using the '$authenticated' token,
+### - only anonymous users, using the '$anonymous' token,
+### - anyone, using the '*' wildcard.
+###
+### A match can be inverted by prefixing the rule with '~'. Rules can
+### grant read ('r') access, read-write ('rw') access, or no access
+### ('').
+
+[aliases]
+# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average
+
+[groups]
+# harry_and_sally = harry,sally
+# harry_sally_and_joe = harry,sally,&joe
+
+# [/foo/bar]
+# harry = rw
+# &joe = r
+# * =
+
+# [repository:/baz/fuz]
+# @harry_and_sally = rw
+# * = r
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd
new file mode 100644
index 0000000..ecaa08d
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd
@@ -0,0 +1,8 @@
+### This file is an example password file for svnserve.
+### Its format is similar to that of svnserve.conf. As shown in the
+### example below it contains one section labelled [users].
+### The name and password for each user follow, one account per line.
+
+[users]
+# harry = harryssecret
+# sally = sallyssecret
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf
new file mode 100644
index 0000000..e62a01e
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf
@@ -0,0 +1,47 @@
+### This file controls the configuration of the svnserve daemon, if you
+### use it to allow access to this repository. (If you only allow
+### access through http: and/or file: URLs, then this file is
+### irrelevant.)
+
+### Visit http://subversion.tigris.org/ for more information.
+
+[general]
+### These options control access to the repository for unauthenticated
+### and authenticated users. Valid values are "write", "read",
+### and "none". The sample settings below are the defaults.
+# anon-access = read
+# auth-access = write
+### The password-db option controls the location of the password
+### database file. Unless you specify a path starting with a /,
+### the file's location is relative to the directory containing
+### this configuration file.
+### If SASL is enabled (see below), this file will NOT be used.
+### Uncomment the line below to use the default password file.
+# password-db = passwd
+### The authz-db option controls the location of the authorization
+### rules for path-based access control. Unless you specify a path
+### starting with a /, the file's location is relative to the the
+### directory containing this file. If you don't specify an
+### authz-db, no path-based access control is done.
+### Uncomment the line below to use the default authorization file.
+# authz-db = authz
+### This option specifies the authentication realm of the repository.
+### If two repositories have the same authentication realm, they should
+### have the same password database, and vice versa. The default realm
+### is repository's uuid.
+# realm = My First Repository
+
+[sasl]
+### This option specifies whether you want to use the Cyrus SASL
+### library for authentication. Default is false.
+### This section will be ignored if svnserve is not built with Cyrus
+### SASL support; to check, run 'svnserve --version' and look for a line
+### reading 'Cyrus SASL authentication is available.'
+# use-sasl = true
+### These options specify the desired strength of the security layer
+### that you want SASL to provide. 0 means no encryption, 1 means
+### integrity-checking only, values larger than 1 are correlated
+### to the effective key length for encryption (e.g. 128 means 128-bit
+### encryption). The values below are the defaults.
+# min-encryption = 0
+# max-encryption = 256
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current
new file mode 100644
index 0000000..d6b2404
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current
@@ -0,0 +1 @@
+19
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format
new file mode 100644
index 0000000..db06890
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format
@@ -0,0 +1,2 @@
+4
+layout sharded 1000
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type
new file mode 100644
index 0000000..4fdd953
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type
@@ -0,0 +1 @@
+fsfs
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf
new file mode 100644
index 0000000..0a5f1fe
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf
@@ -0,0 +1,37 @@
+### This file controls the configuration of the FSFS filesystem.
+
+[memcached-servers]
+### These options name memcached servers used to cache internal FSFS
+### data. See http://www.danga.com/memcached/ for more information on
+### memcached. To use memcached with FSFS, run one or more memcached
+### servers, and specify each of them as an option like so:
+# first-server = 127.0.0.1:11211
+# remote-memcached = mymemcached.corp.example.com:11212
+### The option name is ignored; the value is of the form HOST:PORT.
+### memcached servers can be shared between multiple repositories;
+### however, if you do this, you *must* ensure that repositories have
+### distinct UUIDs and paths, or else cached data from one repository
+### might be used by another accidentally. Note also that memcached has
+### no authentication for reads or writes, so you must ensure that your
+### memcached servers are only accessible by trusted users.
+
+[caches]
+### When a cache-related error occurs, normally Subversion ignores it
+### and continues, logging an error if the server is appropriately
+### configured (and ignoring it with file:// access). To make
+### Subversion never ignore cache errors, uncomment this line.
+# fail-stop = true
+
+[rep-sharing]
+### To conserve space, the filesystem can optionally avoid storing
+### duplicate representations. This comes at a slight cost in performace,
+### as maintaining a database of shared representations can increase
+### commit times. The space savings are dependent upon the size of the
+### repository, the number of objects it contains and the amount of
+### duplication between them, usually a function of the branching and
+### merging process.
+###
+### The following parameter enables rep-sharing in the repository. It can
+### be switched on and off at will, but for best space-saving results
+### should be enabled consistently over the life of the repository.
+# enable-rep-sharing = false
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev
@@ -0,0 +1 @@
+0
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0
new file mode 100644
index 0000000..4b35d85
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0
@@ -0,0 +1,17 @@
+K 8
+svn:date
+V 27
+2012-09-14T09:24:53.167845Z
+K 17
+svn:sync-from-url
+V 45
+svn://svn.code.sf.net/p/jetest/test-svn/trunk
+K 18
+svn:sync-from-uuid
+V 36
+2f15bc49-05cb-4844-b76f-9b7a511244b3
+K 24
+svn:sync-last-merged-rev
+V 1
+3
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1
new file mode 100644
index 0000000..21befe5
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+allura
+K 8
+svn:date
+V 27
+2012-09-14T09:24:59.657361Z
+K 7
+svn:log
+V 14
+Initial commit
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10
new file mode 100644
index 0000000..7563361
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:49.331144Z
+K 7
+svn:log
+V 2
+10
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11
new file mode 100644
index 0000000..1a7c57b
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:54.222285Z
+K 7
+svn:log
+V 2
+11
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12
new file mode 100644
index 0000000..e5261de
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-14T13:42:47.373667Z
+K 7
+svn:log
+V 3
+123
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13
new file mode 100644
index 0000000..98e59b4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:14:58.547186Z
+K 7
+svn:log
+V 28
+Added tags and branches dirs
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14
new file mode 100644
index 0000000..0038f28
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:15:06.279256Z
+K 7
+svn:log
+V 7
+Tag 1.0
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15
new file mode 100644
index 0000000..2defcf4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:16:49.265539Z
+K 7
+svn:log
+V 13
+added aaa.txt
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16
new file mode 100644
index 0000000..0c9fa72
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:17:11.372670Z
+K 7
+svn:log
+V 10
+aaa branch
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17
new file mode 100644
index 0000000..2cb2c2e
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:17:43.720670Z
+K 7
+svn:log
+V 13
+added bbb.txt
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18
new file mode 100644
index 0000000..0d76491
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:18:43.367408Z
+K 7
+svn:log
+V 22
+deleted svn-commit.tmp
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19
new file mode 100644
index 0000000..8009d60
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:23:35.675301Z
+K 7
+svn:log
+V 8
+ccc.txt.
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2
new file mode 100644
index 0000000..57aaf4c
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 7
+jetmind
+K 8
+svn:date
+V 27
+2012-09-14T09:29:26.468596Z
+K 7
+svn:log
+V 4
+init
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3
new file mode 100644
index 0000000..c49edff
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3
@@ -0,0 +1,14 @@
+K 10
+svn:author
+V 7
+jetmind
+K 8
+svn:date
+V 27
+2013-02-20T11:09:25.047049Z
+K 7
+svn:log
+V 4
+wqe
+
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4
new file mode 100644
index 0000000..e69fa20
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-03-12T11:07:12.499418Z
+K 7
+svn:log
+V 3
+yep
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5
new file mode 100644
index 0000000..1d776d9
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-03-12T11:08:27.707083Z
+K 7
+svn:log
+V 5
+yep 2
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6
new file mode 100644
index 0000000..cd6b553
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6
@@ -0,0 +1,14 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:26.168654Z
+K 7
+svn:log
+V 2
+6
+
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7
new file mode 100644
index 0000000..a140dbd
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:34.856691Z
+K 7
+svn:log
+V 1
+7
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8
new file mode 100644
index 0000000..507c862
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:40.650304Z
+K 7
+svn:log
+V 1
+8
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9
new file mode 100644
index 0000000..c5a3bf0
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:45.270886Z
+K 7
+svn:log
+V 1
+9
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0
new file mode 100644
index 0000000..10f5c45
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0
@@ -0,0 +1,11 @@
+PLAIN
+END
+ENDREP
+id: 0.0.r0/17
+type: dir
+count: 0
+text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
+cpath: /
+
+
+17 107
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1
new file mode 100644
index 0000000..ab1abdb
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1
@@ -0,0 +1,25 @@
+id: 0-1.0.r1/0
+type: dir
+count: 0
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+trunk
+V 14
+dir 0-1.0.r1/0
+END
+ENDREP
+id: 0.0.r1/110
+type: dir
+pred: 0.0.r0/17
+count: 1
+text: 1 63 34 34 a669707b1f7dfac13baa7cbf8b292233
+cpath: /
+copyroot: 0 /
+
+_0.0.t0-0 add-dir false false /trunk
+
+
+110 234
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10
new file mode 100644
index 0000000..17f46f8
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11
new file mode 100644
index 0000000..f3de3e1
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12
new file mode 100644
index 0000000..9ec8607
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13
new file mode 100644
index 0000000..2429ed6
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13
@@ -0,0 +1,41 @@
+id: 0-13.0.r13/0
+type: dir
+count: 0
+cpath: /branches
+copyroot: 0 /
+
+id: 2-13.0.r13/68
+type: dir
+count: 0
+cpath: /tags
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 16
+dir 0-13.0.r13/0
+K 4
+tags
+V 17
+dir 2-13.0.r13/68
+K 5
+trunk
+V 17
+dir 0-1.0.r12/320
+END
+ENDREP
+id: 0.0.r13/250
+type: dir
+pred: 0.0.r12/509
+count: 13
+text: 13 133 104 104 3f9f56b54a923ea2d82149d15bed2320
+cpath: /
+copyroot: 0 /
+
+_0.0.t12-d add-dir false false /branches
+
+_2.0.t12-d add-dir false false /tags
+
+
+250 382
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14
new file mode 100644
index 0000000..bf3c497
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14
@@ -0,0 +1,50 @@
+id: 0-1.0-14.r14/0
+type: dir
+pred: 0-1.0.r12/320
+count: 12
+text: 12 227 80 80 ba64294fc83c48c9c7a1bd3ce032b6d9
+cpath: /tags/tag-1.0
+copyfrom: 13 /trunk
+
+PLAIN
+K 7
+tag-1.0
+V 18
+dir 0-1.0-14.r14/0
+END
+ENDREP
+id: 2-13.0.r14/206
+type: dir
+pred: 2-13.0.r13/68
+count: 1
+text: 14 153 40 40 6443a2eb5a20cc1d22a37071980805b0
+cpath: /tags
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 16
+dir 0-13.0.r13/0
+K 4
+tags
+V 18
+dir 2-13.0.r14/206
+K 5
+trunk
+V 17
+dir 0-1.0.r12/320
+END
+ENDREP
+id: 0.0.r14/462
+type: dir
+pred: 0.0.r13/250
+count: 14
+text: 14 344 105 105 2bda7023698b9f41502d02d11b6e019b
+cpath: /
+copyroot: 0 /
+
+0-1._0.t13-e add-dir false false /tags/tag-1.0
+13 /trunk
+
+462 594
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15
new file mode 100644
index 0000000..1a80c35
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16
new file mode 100644
index 0000000..f9be716
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16
@@ -0,0 +1,50 @@
+id: 0-1.0-16.r16/0
+type: dir
+pred: 0-1.0.r15/333
+count: 13
+text: 15 204 116 116 079f4d91976dc8c436c1666ad1d957b1
+cpath: /branches/aaa
+copyfrom: 15 /trunk
+
+PLAIN
+K 3
+aaa
+V 18
+dir 0-1.0-16.r16/0
+END
+ENDREP
+id: 0-13.0.r16/204
+type: dir
+pred: 0-13.0.r13/0
+count: 1
+text: 16 155 36 36 cabd976ed21bae7b43e6eeddc5ffad5f
+cpath: /branches
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 18
+dir 0-13.0.r16/204
+K 4
+tags
+V 18
+dir 2-13.0.r14/206
+K 5
+trunk
+V 17
+dir 0-1.0.r15/333
+END
+ENDREP
+id: 0.0.r16/465
+type: dir
+pred: 0.0.r15/592
+count: 16
+text: 16 345 107 107 76fe20fadbbc96a664e8c348c6bcb6c8
+cpath: /
+copyroot: 0 /
+
+0-1._0.t15-g add-dir false false /branches/aaa
+15 /trunk
+
+465 597
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17
new file mode 100644
index 0000000..511ce79
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18
new file mode 100644
index 0000000..e32a413
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18
@@ -0,0 +1,50 @@
+PLAIN
+K 6
+README
+V 17
+file 1-2.0.r12/37
+K 7
+aaa.txt
+V 18
+file 1-15.0.r15/31
+K 7
+bbb.txt
+V 18
+file 1-17.0.r17/29
+END
+ENDREP
+id: 0-1.0.r18/123
+type: dir
+pred: 0-1.0.r17/367
+count: 14
+text: 18 0 110 110 2272a90f79e98a1cbae4a108ee067708
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 18
+dir 0-13.0.r16/204
+K 4
+tags
+V 18
+dir 2-13.0.r14/206
+K 5
+trunk
+V 17
+dir 0-1.0.r18/123
+END
+ENDREP
+id: 0.0.r18/382
+type: dir
+pred: 0.0.r17/628
+count: 18
+text: 18 262 107 107 438df4be71cf3d5878ab91f8cdb6b9e9
+cpath: /
+copyroot: 0 /
+
+1-3.0.r3/82 delete-file false false /trunk/svn-commit.tmp
+
+
+382 514
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19
new file mode 100644
index 0000000..c7358c8
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2
new file mode 100644
index 0000000..7e631b9
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3
new file mode 100644
index 0000000..8500fa5
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4
new file mode 100644
index 0000000..5185805
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5
new file mode 100644
index 0000000..0e44839
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6
new file mode 100644
index 0000000..5e704e1
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7
new file mode 100644
index 0000000..9786f31
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8
new file mode 100644
index 0000000..a4bb09f
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9
new file mode 100644
index 0000000..30dad50
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current
new file mode 100644
index 0000000..b68fde2
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current
@@ -0,0 +1 @@
+k
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current-lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current-lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current-lock
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid
new file mode 100644
index 0000000..311e288
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid
@@ -0,0 +1 @@
+e99d3fac-e2e0-4e27-8871-fe0e37559895
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/write-lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/write-lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/write-lock
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format
@@ -0,0 +1 @@
+5
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit
new file mode 100755
index 0000000..1ad70a4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit
@@ -0,0 +1,8 @@
+#!/bin/bash
+# The following is required for site integration, do not remove/modify.
+# Place user hook code in post-commit-user and it will be called from here.
+curl -s http://sf-fortytwo-7045.sb.sf.net/auth/refresh_repo/p/test/code-1/
+
+DIR="$(dirname "${BASH_SOURCE[0]}")"
+if [ -x $DIR/post-commit-user ]; then exec $DIR/post-commit-user "$@"
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl
new file mode 100644
index 0000000..98e4f80
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# POST-COMMIT HOOK
+#
+# The post-commit hook is invoked after a commit. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-commit' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the number of the revision just committed)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the commit has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-committed tree.
+#
+# On a Unix system, the normal procedure is to have 'post-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-commit.bat' or 'post-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+
+mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl
new file mode 100644
index 0000000..c779f11
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# POST-LOCK HOOK
+#
+# The post-lock hook is run after a path is locked. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-lock' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the user who created the lock)
+#
+# The paths that were just locked are passed to the hook via STDIN (as
+# of Subversion 1.2, only one path is passed per invocation, but the
+# plan is to pass all locked paths at once, so the hook program
+# should be written accordingly).
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the lock has already been created and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# newly-created lock.
+#
+# On a Unix system, the normal procedure is to have 'post-lock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-lock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-lock.bat' or 'post-lock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+USER="$2"
+
+# Send email to interested parties, let them know a lock was created:
+mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl
new file mode 100644
index 0000000..3254f5e
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+# POST-REVPROP-CHANGE HOOK
+#
+# The post-revprop-change hook is invoked after a revision property
+# has been added, modified or deleted. Subversion runs this hook by
+# invoking a program (script, executable, binary, etc.) named
+# 'post-revprop-change' (for which this file is a template), with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REV (the revision that was tweaked)
+# [3] USER (the username of the person tweaking the property)
+# [4] PROPNAME (the property that was changed)
+# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted)
+#
+# [STDIN] PROPVAL ** the old property value is passed via STDIN.
+#
+# Because the propchange has already completed and cannot be undone,
+# the exit code of the hook program is ignored. The hook program
+# can use the 'svnlook' utility to help it examine the
+# new property value.
+#
+# On a Unix system, the normal procedure is to have 'post-revprop-change'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-revprop-change' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-revprop-change.bat' or 'post-revprop-change.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+mailer.py propchange2 "$REPOS" "$REV" "$USER" "$PROPNAME" "$ACTION" /path/to/mailer.conf
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl
new file mode 100644
index 0000000..ae95c4b
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# POST-UNLOCK HOOK
+#
+# The post-unlock hook runs after a path is unlocked. Subversion runs
+# this hook by invoking a program (script, executable, binary, etc.)
+# named 'post-unlock' (for which this file is a template) with the
+# following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the user who destroyed the lock)
+#
+# The paths that were just unlocked are passed to the hook via STDIN
+# (as of Subversion 1.2, only one path is passed per invocation, but
+# the plan is to pass all unlocked paths at once, so the hook program
+# should be written accordingly).
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# Because the lock has already been destroyed and cannot be undone,
+# the exit code of the hook program is ignored.
+#
+# On a Unix system, the normal procedure is to have 'post-unlock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'post-unlock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'post-unlock.bat' or 'post-unlock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+USER="$2"
+
+# Send email to interested parties, let them know a lock was removed:
+mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl
new file mode 100644
index 0000000..ab65642
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl
@@ -0,0 +1,81 @@
+#!/bin/sh
+
+# PRE-COMMIT HOOK
+#
+# The pre-commit hook is invoked before a Subversion txn is
+# committed. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-commit' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] TXN-NAME (the name of the txn about to be committed)
+#
+# [STDIN] LOCK-TOKENS ** the lock tokens are passed via STDIN.
+#
+# If STDIN contains the line "LOCK-TOKENS:\n" (the "\n" denotes a
+# single newline), the lines following it are the lock tokens for
+# this commit. The end of the list is marked by a line containing
+# only a newline character.
+#
+# Each lock token line consists of a URI-escaped path, followed
+# by the separator character '|', followed by the lock token string,
+# followed by a newline.
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the txn is committed; but
+# if it exits with failure (non-zero), the txn is aborted, no commit
+# takes place, and STDERR is returned to the client. The hook
+# program can use the 'svnlook' utility to help it examine the txn.
+#
+# On a Unix system, the normal procedure is to have 'pre-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT ***
+# *** FOR REVISION PROPERTIES (like svn:log or svn:author). ***
+#
+# This is why we recommend using the read-only 'svnlook' utility.
+# In the future, Subversion may enforce the rule that pre-commit
+# hooks should not modify the versioned data in txns, or else come
+# up with a mechanism to make it safe to do so (by informing the
+# committing client of the changes). However, right now neither
+# mechanism is implemented, so hook writers just have to be careful.
+#
+# Note that 'pre-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-commit.bat' or 'pre-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+TXN="$2"
+
+# Make sure that the log message contains some text.
+SVNLOOK=/usr/bin/svnlook
+$SVNLOOK log -t "$TXN" "$REPOS" | \
+ grep "[a-zA-Z0-9]" > /dev/null || exit 1
+
+# Check that the author of this commit has the rights to perform
+# the commit on the files and directories being modified.
+commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1
+
+# All checks passed, so allow the commit.
+exit 0
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl
new file mode 100644
index 0000000..13827fb
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+# PRE-LOCK HOOK
+#
+# The pre-lock hook is invoked before an exclusive lock is
+# created. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-lock' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] PATH (the path in the repository about to be locked)
+# [3] USER (the user creating the lock)
+# [4] COMMENT (the comment of the lock)
+# [5] STEAL-LOCK (1 if the user is trying to steal the lock, else 0)
+#
+# If the hook program outputs anything on stdout, the output string will
+# be used as the lock token for this lock operation. If you choose to use
+# this feature, you must guarantee the tokens generated are unique across
+# the repository each time.
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the lock is created; but
+# if it exits with failure (non-zero), the lock action is aborted
+# and STDERR is returned to the client.
+
+# On a Unix system, the normal procedure is to have 'pre-lock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-lock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-lock.bat' or 'pre-lock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+PATH="$2"
+USER="$3"
+
+# If a lock exists and is owned by a different person, don't allow it
+# to be stolen (e.g., with 'svn lock --force ...').
+
+# (Maybe this script could send email to the lock owner?)
+SVNLOOK=/usr/bin/svnlook
+GREP=/bin/grep
+SED=/bin/sed
+
+LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
+ $GREP '^Owner: ' | $SED 's/Owner: //'`
+
+# If we get no result from svnlook, there's no lock, allow the lock to
+# happen:
+if [ "$LOCK_OWNER" = "" ]; then
+ exit 0
+fi
+
+# If the person locking matches the lock's owner, allow the lock to
+# happen:
+if [ "$LOCK_OWNER" = "$USER" ]; then
+ exit 0
+fi
+
+# Otherwise, we've got an owner mismatch, so return failure:
+echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2
+exit 1
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change
new file mode 100755
index 0000000..1a24852
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change
@@ -0,0 +1 @@
+#!/bin/sh
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl
new file mode 100644
index 0000000..f72ad01
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# PRE-REVPROP-CHANGE HOOK
+#
+# The pre-revprop-change hook is invoked before a revision property
+# is added, modified or deleted. Subversion runs this hook by invoking
+# a program (script, executable, binary, etc.) named 'pre-revprop-change'
+# (for which this file is a template), with the following ordered
+# arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] REVISION (the revision being tweaked)
+# [3] USER (the username of the person tweaking the property)
+# [4] PROPNAME (the property being set on the revision)
+# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted)
+#
+# [STDIN] PROPVAL ** the new property value is passed via STDIN.
+#
+# If the hook program exits with success, the propchange happens; but
+# if it exits with failure (non-zero), the propchange doesn't happen.
+# The hook program can use the 'svnlook' utility to examine the
+# existing value of the revision property.
+#
+# WARNING: unlike other hooks, this hook MUST exist for revision
+# properties to be changed. If the hook does not exist, Subversion
+# will behave as if the hook were present, but failed. The reason
+# for this is that revision properties are UNVERSIONED, meaning that
+# a successful propchange is destructive; the old value is gone
+# forever. We recommend the hook back up the old value somewhere.
+#
+# On a Unix system, the normal procedure is to have 'pre-revprop-change'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-revprop-change' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-revprop-change.bat' or 'pre-revprop-change.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi
+
+echo "Changing revision properties other than svn:log is prohibited" >&2
+exit 1
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl
new file mode 100644
index 0000000..d1aa858
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# PRE-UNLOCK HOOK
+#
+# The pre-unlock hook is invoked before an exclusive lock is
+# destroyed. Subversion runs this hook by invoking a program
+# (script, executable, binary, etc.) named 'pre-unlock' (for which
+# this file is a template), with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] PATH (the path in the repository about to be unlocked)
+# [3] USER (the user destroying the lock)
+# [4] TOKEN (the lock token to be destroyed)
+# [5] BREAK-UNLOCK (1 if the user is breaking the lock, else 0)
+#
+# The default working directory for the invocation is undefined, so
+# the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the lock is destroyed; but
+# if it exits with failure (non-zero), the unlock action is aborted
+# and STDERR is returned to the client.
+
+# On a Unix system, the normal procedure is to have 'pre-unlock'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'pre-unlock' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'pre-unlock.bat' or 'pre-unlock.exe',
+# but the basic idea is the same.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter:
+
+REPOS="$1"
+PATH="$2"
+USER="$3"
+
+# If a lock is owned by a different person, don't allow it be broken.
+# (Maybe this script could send email to the lock owner?)
+
+SVNLOOK=/usr/bin/svnlook
+GREP=/bin/grep
+SED=/bin/sed
+
+LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \
+ $GREP '^Owner: ' | $SED 's/Owner: //'`
+
+# If we get no result from svnlook, there's no lock, return success:
+if [ "$LOCK_OWNER" = "" ]; then
+ exit 0
+fi
+
+# If the person unlocking matches the lock's owner, return success:
+if [ "$LOCK_OWNER" = "$USER" ]; then
+ exit 0
+fi
+
+# Otherwise, we've got an owner mismatch, so return failure:
+echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2
+exit 1
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl
new file mode 100644
index 0000000..53690d1
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl
@@ -0,0 +1,65 @@
+#!/bin/sh
+
+# START-COMMIT HOOK
+#
+# The start-commit hook is invoked before a Subversion txn is created
+# in the process of doing a commit. Subversion runs this hook
+# by invoking a program (script, executable, binary, etc.) named
+# 'start-commit' (for which this file is a template)
+# with the following ordered arguments:
+#
+# [1] REPOS-PATH (the path to this repository)
+# [2] USER (the authenticated user attempting to commit)
+# [3] CAPABILITIES (a colon-separated list of capabilities reported
+# by the client; see note below)
+#
+# Note: The CAPABILITIES parameter is new in Subversion 1.5, and 1.5
+# clients will typically report at least the "mergeinfo" capability.
+# If there are other capabilities, then the list is colon-separated,
+# e.g.: "mergeinfo:some-other-capability" (the order is undefined).
+#
+# The list is self-reported by the client. Therefore, you should not
+# make security assumptions based on the capabilities list, nor should
+# you assume that clients reliably report every capability they have.
+#
+# The working directory for this hook program's invocation is undefined,
+# so the program should set one explicitly if it cares.
+#
+# If the hook program exits with success, the commit continues; but
+# if it exits with failure (non-zero), the commit is stopped before
+# a Subversion txn is created, and STDERR is returned to the client.
+#
+# On a Unix system, the normal procedure is to have 'start-commit'
+# invoke other programs to do the real work, though it may do the
+# work itself too.
+#
+# Note that 'start-commit' must be executable by the user(s) who will
+# invoke it (typically the user httpd runs as), and that user must
+# have filesystem-level permission to access the repository.
+#
+# On a Windows system, you should name the hook program
+# 'start-commit.bat' or 'start-commit.exe',
+# but the basic idea is the same.
+#
+# The hook program typically does not inherit the environment of
+# its parent process. For example, a common problem is for the
+# PATH environment variable to not be set to its usual value, so
+# that subprograms fail to launch unless invoked via absolute path.
+# If you're having unexpected problems with a hook program, the
+# culprit may be unusual (or missing) environment variables.
+#
+# Here is an example hook script, for a Unix /bin/sh interpreter.
+# For more examples and pre-written hooks, see those in
+# the Subversion repository at
+# http://svn.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+USER="$2"
+
+commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1
+special-auth-check.py --user "$USER" --auth-level 3 || exit 1
+
+# All checks passed, so allow the commit.
+exit 0
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock
new file mode 100644
index 0000000..20dd636
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock
@@ -0,0 +1,3 @@
+This file is not used by Subversion 1.3.x or later.
+However, its existence is required for compatibility with
+Subversion 1.2.x or earlier.
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock
new file mode 100644
index 0000000..20dd636
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock
@@ -0,0 +1,3 @@
+This file is not used by Subversion 1.3.x or later.
+However, its existence is required for compatibility with
+Subversion 1.2.x or earlier.
[29/38] git commit: [#6255] change to work with either PIL or Pillow
Posted by jo...@apache.org.
[#6255] change to work with either PIL or Pillow
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/686ae83a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/686ae83a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/686ae83a
Branch: refs/heads/cj/6218
Commit: 686ae83a1b7e305d0363b309ecb2ca36f95d3735
Parents: 4caff7c
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon May 20 17:26:07 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 17:01:51 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/filesystem.py | 12 ++++++------
Allura/allura/tests/functional/test_admin.py | 11 ++++++-----
.../allura/tests/functional/test_neighborhood.py | 6 +++---
.../tests/functional/test_forum_admin.py | 4 ++--
.../forgetracker/tests/functional/test_root.py | 9 +++++----
ForgeWiki/forgewiki/tests/functional/test_root.py | 10 +++++-----
scripts/rethumb.py | 5 ++---
7 files changed, 29 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/Allura/allura/model/filesystem.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/filesystem.py b/Allura/allura/model/filesystem.py
index 41a64ab..c56e595 100644
--- a/Allura/allura/model/filesystem.py
+++ b/Allura/allura/model/filesystem.py
@@ -20,7 +20,7 @@ from cStringIO import StringIO
import logging
import pylons
-import Image
+import PIL
from gridfs import GridFS
from tg import config
from paste.deploy.converters import asint
@@ -136,9 +136,9 @@ class File(MappedClass):
if square and height != width:
sz = max(width, height)
if 'transparency' in image.info:
- new_image = Image.new('RGBA', (sz,sz))
+ new_image = PIL.Image.new('RGBA', (sz,sz))
else:
- new_image = Image.new('RGB', (sz,sz), 'white')
+ new_image = PIL.Image.new('RGB', (sz,sz), 'white')
if height < width:
# image is wider than tall, so center horizontally
new_image.paste(image, ((width-height)/2, 0))
@@ -148,7 +148,7 @@ class File(MappedClass):
image = new_image
if thumbnail_size:
- image.thumbnail(thumbnail_size, Image.ANTIALIAS)
+ image.thumbnail(thumbnail_size, PIL.Image.ANTIALIAS)
thumbnail_meta = thumbnail_meta or {}
thumbnail = cls(
@@ -175,9 +175,9 @@ class File(MappedClass):
return None, None
try:
- image = Image.open(fp)
+ image = PIL.Image.open(fp)
except IOError as e:
- log.error('Error opening image %s %s', filename, e)
+ log.error('Error opening image %s %s', filename, e, exc_info=True)
return None, None
format = image.format
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/Allura/allura/tests/functional/test_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_admin.py b/Allura/allura/tests/functional/test_admin.py
index 9741d3c..79f595e 100644
--- a/Allura/allura/tests/functional/test_admin.py
+++ b/Allura/allura/tests/functional/test_admin.py
@@ -18,9 +18,10 @@
import re
import os, allura
import pkg_resources
-import Image, StringIO
+import StringIO
from contextlib import contextmanager
+import PIL
from nose.tools import assert_equals
from ming.orm.ormsession import ThreadLocalORMSession
@@ -216,7 +217,7 @@ class TestProjectAdmin(TestController):
short_description='A Test Project'),
upload_files=[upload])
r = self.app.get('/p/test/icon')
- image = Image.open(StringIO.StringIO(r.body))
+ image = PIL.Image.open(StringIO.StringIO(r.body))
assert image.size == (48,48)
r = self.app.get('/p/test/icon?foo=bar')
@@ -236,11 +237,11 @@ class TestProjectAdmin(TestController):
project = M.Project.query.get(shortname='test', neighborhood_id=p_nbhd._id)
filename = project.get_screenshots()[0].filename
r = self.app.get('/p/test/screenshot/'+filename)
- uploaded = Image.open(file_path)
- screenshot = Image.open(StringIO.StringIO(r.body))
+ uploaded = PIL.Image.open(file_path)
+ screenshot = PIL.Image.open(StringIO.StringIO(r.body))
assert uploaded.size == screenshot.size
r = self.app.get('/p/test/screenshot/'+filename+'/thumb')
- thumb = Image.open(StringIO.StringIO(r.body))
+ thumb = PIL.Image.open(StringIO.StringIO(r.body))
assert thumb.size == (150,150)
#FIX: home pages don't currently support screenshots (now that they're a wiki);
# reinstate this code (or appropriate) when we have a macro for that
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/Allura/allura/tests/functional/test_neighborhood.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_neighborhood.py b/Allura/allura/tests/functional/test_neighborhood.py
index a641f74..c45d50e 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -20,7 +20,7 @@ import os
from cStringIO import StringIO
import urllib2
-import Image
+import PIL
from tg import config
from nose.tools import assert_equal
from ming.orm.ormsession import ThreadLocalORMSession
@@ -234,7 +234,7 @@ class TestNeighborhood(TestController):
params=dict(name='Mozq1', css='', homepage='# MozQ1'),
extra_environ=dict(username='root'), upload_files=[upload])
r = self.app.get('/adobe/icon')
- image = Image.open(StringIO(r.body))
+ image = PIL.Image.open(StringIO(r.body))
assert image.size == (48, 48)
r = self.app.get('/adobe/icon?foo=bar')
@@ -788,7 +788,7 @@ class TestNeighborhood(TestController):
assert 'Updated description.' in r
r = self.app.get('/adobe/_admin/awards/%s' % foo_id, extra_environ=dict(username='root'))
r = self.app.get('/adobe/_admin/awards/%s/icon' % foo_id, extra_environ=dict(username='root'))
- image = Image.open(StringIO(r.body))
+ image = PIL.Image.open(StringIO(r.body))
assert image.size == (48, 48)
self.app.post('/adobe/_admin/awards/grant',
params=dict(grant='FOO', recipient='adobe-1'),
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
----------------------------------------------------------------------
diff --git a/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py b/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
index d8d460a..a1bc1a2 100644
--- a/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
+++ b/ForgeDiscussion/forgediscussion/tests/functional/test_forum_admin.py
@@ -17,10 +17,10 @@
import os
import allura
-import Image
from StringIO import StringIO
import logging
+import PIL
from alluratest.controller import TestController
from allura.lib import helpers as h
@@ -136,7 +136,7 @@ class TestForumAdmin(TestController):
},
upload_files=[upload]),
r = self.app.get('/discussion/testforum/icon')
- image = Image.open(StringIO(r.body))
+ image = PIL.Image.open(StringIO(r.body))
assert image.size == (48,48)
def test_delete_undelete(self):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/ForgeTracker/forgetracker/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/tests/functional/test_root.py b/ForgeTracker/forgetracker/tests/functional/test_root.py
index 7423e2b..5c2be7a 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -21,9 +21,10 @@ import urllib
import os
import time
import json
-import Image, StringIO
+import StringIO
import allura
+import PIL
from mock import patch
from nose.tools import assert_true, assert_false, assert_equal, assert_in
from nose.tools import assert_raises, assert_not_in
@@ -543,13 +544,13 @@ class TestFunctionalController(TrackerTestController):
ticket = tm.Ticket.query.find({'ticket_num':1}).first()
filename = ticket.attachments.first().filename
- uploaded = Image.open(file_path)
+ uploaded = PIL.Image.open(file_path)
r = self.app.get('/bugs/1/attachment/'+filename)
- downloaded = Image.open(StringIO.StringIO(r.body))
+ downloaded = PIL.Image.open(StringIO.StringIO(r.body))
assert uploaded.size == downloaded.size
r = self.app.get('/bugs/1/attachment/'+filename+'/thumb')
- thumbnail = Image.open(StringIO.StringIO(r.body))
+ thumbnail = PIL.Image.open(StringIO.StringIO(r.body))
assert thumbnail.size == (100,100)
def test_sidebar_static_page(self):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/ForgeWiki/forgewiki/tests/functional/test_root.py
----------------------------------------------------------------------
diff --git a/ForgeWiki/forgewiki/tests/functional/test_root.py b/ForgeWiki/forgewiki/tests/functional/test_root.py
index 362d8bd..9e8cf58 100644
--- a/ForgeWiki/forgewiki/tests/functional/test_root.py
+++ b/ForgeWiki/forgewiki/tests/functional/test_root.py
@@ -18,12 +18,12 @@
# under the License.
import os
-import Image, StringIO
+import StringIO
import allura
import json
+import PIL
from nose.tools import assert_true, assert_equal, assert_in
-
from ming.orm.ormsession import ThreadLocalORMSession
from mock import patch
@@ -379,13 +379,13 @@ class TestRootController(TestController):
page = model.Page.query.find(dict(title='TEST')).first()
filename = page.attachments.first().filename
- uploaded = Image.open(file_path)
+ uploaded = PIL.Image.open(file_path)
r = self.app.get('/wiki/TEST/attachment/'+filename)
- downloaded = Image.open(StringIO.StringIO(r.body))
+ downloaded = PIL.Image.open(StringIO.StringIO(r.body))
assert uploaded.size == downloaded.size
r = self.app.get('/wiki/TEST/attachment/'+filename+'/thumb')
- thumbnail = Image.open(StringIO.StringIO(r.body))
+ thumbnail = PIL.Image.open(StringIO.StringIO(r.body))
assert thumbnail.size == (255,255)
# Make sure thumbnail is present
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/686ae83a/scripts/rethumb.py
----------------------------------------------------------------------
diff --git a/scripts/rethumb.py b/scripts/rethumb.py
index 0cae31c..5f753ff 100644
--- a/scripts/rethumb.py
+++ b/scripts/rethumb.py
@@ -19,7 +19,7 @@ import sys
import time
import pkg_resources
-import Image
+import PIL
import tg
from pylons import tmpl_context as c
from paste.deploy.converters import asint
@@ -55,7 +55,7 @@ class RethumbCommand(base.Command):
base.log.warning("There are %d thumbnails for '%s' - consider clearing them with --force", count, attachment.filename)
return
- image = Image.open(attachment.rfile())
+ image = PIL.Image.open(attachment.rfile())
del doc['content_type']
del doc['filename']
att_cls.save_thumbnail(attachment.filename, image, attachment.content_type, att_cls.thumbnail_size, doc, square=True)
@@ -133,4 +133,3 @@ if __name__ == '__main__':
command = RethumbCommand('rethumb')
command.parse_args(sys.argv)
command.command()
-
[07/38] git commit: [#6235] ticket:352 Test that snapshot contains
only tag/branch/trunk if specified
Posted by jo...@apache.org.
[#6235] ticket:352 Test that snapshot contains only tag/branch/trunk if specified
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d01f821a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d01f821a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d01f821a
Branch: refs/heads/cj/6218
Commit: d01f821a714074194c01b5dbd2032de32dcf5cd8
Parents: 8e25e0c
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 12:30:37 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:06 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 43 +++++++++++++++-
1 files changed, 40 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d01f821a/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 9a22ae1..e131764 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -313,64 +313,101 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_tags(self):
- # TODO: check zip that it actually contains only needed files
+ tag_content = ['test-svn-tags-1-tags-tag-1.0/',
+ 'test-svn-tags-1-tags-tag-1.0/svn-commit.tmp',
+ 'test-svn-tags-1-tags-tag-1.0/README']
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
self.svn_tags.tarball('1', '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), tag_content)
os.remove(fn)
self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), tag_content)
os.remove(fn)
# if inside of tags, but no tag is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/tags/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
+ 'test-svn-tags-1-trunk/aaa.txt',
+ 'test-svn-tags-1-trunk/bbb.txt',
+ 'test-svn-tags-1-trunk/ccc.txt',
+ 'test-svn-tags-1-trunk/README'])
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_branches(self):
- # TODO: check zip that it actually contains only needed files
+ branch_content = ['test-svn-tags-1-branches-aaa/',
+ 'test-svn-tags-1-branches-aaa/aaa.txt',
+ 'test-svn-tags-1-branches-aaa/svn-commit.tmp',
+ 'test-svn-tags-1-branches-aaa/README']
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
self.svn_tags.tarball('1', '/branches/aaa/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), branch_content)
os.remove(fn)
self.svn_tags.tarball('1', '/branches/aaa/some/path/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), branch_content)
os.remove(fn)
# if inside of branches, but no branch is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/branches/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
+ 'test-svn-tags-1-trunk/aaa.txt',
+ 'test-svn-tags-1-trunk/bbb.txt',
+ 'test-svn-tags-1-trunk/ccc.txt',
+ 'test-svn-tags-1-trunk/README'])
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_trunk(self):
- # TODO: check zip that it actually contains only needed files
+ trunk_content = ['test-svn-tags-1-trunk/',
+ 'test-svn-tags-1-trunk/aaa.txt',
+ 'test-svn-tags-1-trunk/bbb.txt',
+ 'test-svn-tags-1-trunk/ccc.txt',
+ 'test-svn-tags-1-trunk/README']
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/trunk/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), trunk_content)
os.remove(fn)
self.svn_tags.tarball('1', '/trunk/some/path/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), trunk_content)
os.remove(fn)
# no path, but there are trunk in the repo
# expect snapshot of trunk
self.svn_tags.tarball('1')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), trunk_content)
os.remove(fn)
# no path, and no trunk dir
# expect snapshot of repo root
fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
self.repo.tarball('1')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
os.remove(fn)
def test_is_empty(self):
[17/38] git commit: [#6235] ticket:366 Fix tests
Posted by jo...@apache.org.
[#6235] ticket:366 Fix tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6a77c658
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6a77c658
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6a77c658
Branch: refs/heads/cj/6218
Commit: 6a77c658413aba128cad594526e5da558acf3109
Parents: e406447
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 29 06:12:19 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
.../forgegit/tests/functional/test_controllers.py | 2 +-
.../forgesvn/tests/functional/test_controllers.py | 26 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6a77c658/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 787cef1..fd61b4a 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -353,7 +353,7 @@ class TestRootController(_TestCase):
r = self.app.get('/p/test/testgit-index/ci/master/tree/index/')
links = r.html.findAll('a')
download_link = [a for a in links if a.text == 'Download Snapshot'][0]
- assert_equal(download_link.get('href'), '/p/test/testgit-index/ci/master/tarball')
+ assert_equal(download_link.get('href'), '/p/test/testgit-index/ci/master/tarball?path=/index')
class TestRestController(_TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6a77c658/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 2575f58..e07543a 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -203,51 +203,51 @@ class TestRootController(SVNTestController):
def test_tarball_tags_aware(self):
h.set_context('test', 'svn-tags', neighborhood='Projects')
shutil.rmtree(c.app.repo.tarball_path, ignore_errors=True)
- r = self.app.get('/svn-tags/19/tree/')
+ r = self.app.get('/p/test/svn-tags/19/tree/')
link = r.html.find('h2', attrs={'class': 'dark title'})
link = link.find('small').findAll('a')[0]
assert_equal(link.text, 'Download Snapshot')
assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball')
- r = self.app.get('/svn-tags/19/tree/tags/tag-1.0/')
+ r = self.app.get('/p/test/svn-tags/19/tree/tags/tag-1.0/')
link = r.html.find('h2', attrs={'class': 'dark title'})
link = link.find('small').findAll('a')[0]
assert_equal(link.text, 'Download Snapshot')
assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball?path=/tags/tag-1.0')
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/tag-1.0')
assert_equal(r.json['status'], None)
r = self.app.get(link.get('href'))
assert 'Generating snapshot...' in r
M.MonQTask.run_ready()
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/tag-1.0')
assert_equal(r.json['status'], 'ready')
- r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/trunk')
assert_equal(r.json['status'], None)
- r = self.app.get('/svn-tags/19/tarball?path=/trunk/')
+ r = self.app.get('/p/test/svn-tags/19/tarball?path=/trunk/')
assert 'Generating snapshot...' in r
M.MonQTask.run_ready()
- r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/trunk')
assert_equal(r.json['status'], 'ready')
- r = self.app.get('/svn-tags/19/tarball_status?path=/branches/aaa/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/branches/aaa/')
assert_equal(r.json['status'], None)
# All of the following also should be ready because...
# ...this is essentially the same as trunk snapshot
- r = self.app.get('/svn-tags/19/tarball_status?path=/trunk/some/path/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/trunk/some/path/')
assert_equal(r.json['status'], 'ready')
- r = self.app.get('/svn-tags/19/tarball_status')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status')
assert_equal(r.json['status'], 'ready')
# ...the same as trunk, 'cause concrete tag isn't specified
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/')
assert_equal(r.json['status'], 'ready')
# ...the same as trunk, 'cause concrete branch isn't specified
- r = self.app.get('/svn-tags/19/tarball_status?path=/branches/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/branches/')
assert_equal(r.json['status'], 'ready')
# ...this is essentially the same as tag snapshot
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0/dir')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/tag-1.0/dir')
assert_equal(r.json['status'], 'ready')
[36/38] git commit: [#6218] Get branches and tags directly from SCM
Posted by jo...@apache.org.
[#6218] Get branches and tags directly from SCM
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dac0b4c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dac0b4c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dac0b4c8
Branch: refs/heads/cj/6218
Commit: dac0b4c8cf19df2fbf5749a7c33f1391d92b62f6
Parents: cf25d5e
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu May 23 23:35:00 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 19:14:49 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/repository.py | 27 +++++++++------
Allura/allura/model/repository.py | 10 +++++
ForgeGit/forgegit/model/git_repo.py | 6 +++
.../forgegit/tests/data/testgit.git/refs/tags/foo | 1 +
ForgeGit/forgegit/tests/model/test_repository.py | 20 +++++++++++
ForgeSVN/forgesvn/model/svn.py | 6 +++
6 files changed, 59 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dac0b4c8/Allura/allura/lib/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index 3a432ec..afd5557 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -130,29 +130,34 @@ class RepositoryApp(Application):
self.repo.upstream_repo.name + 'merge-requests/',
small=pending_upstream_merges))
ref_url = self.repo.url_for_commit(self.default_branch_name, url_type='ref')
- if self.repo.branches:
+ branches = self.repo.get_branches()
+ if branches:
links.append(SitemapEntry('Branches'))
+ for branch in branches:
+ if branch.name == self.default_branch_name:
+ branches.remove(branch)
+ branches.insert(0, branch)
+ break
max_branches = 10
- for b in self.repo.branches[:max_branches]:
+ for branch in branches[:max_branches]:
links.append(SitemapEntry(
- b.name,
- quote(self.repo.url_for_commit(b.name) + 'tree/'),
- small=b.count))
- if len(self.repo.branches) > max_branches:
+ branch.name,
+ quote(self.repo.url_for_commit(branch.name) + 'tree/')))
+ if len(branches) > max_branches:
links.append(
SitemapEntry(
'More Branches',
ref_url + 'branches/',
))
- if self.repo.repo_tags:
+ tags = self.repo.get_tags()
+ if tags:
links.append(SitemapEntry('Tags'))
max_tags = 10
- for b in self.repo.repo_tags[:max_tags]:
+ for b in tags[:max_tags]:
links.append(SitemapEntry(
b.name,
- quote(self.repo.url_for_commit(b.name) + 'tree/'),
- small=b.count))
- if len(self.repo.repo_tags) > max_tags:
+ quote(self.repo.url_for_commit(b.name) + 'tree/')))
+ if len(tags) > max_tags:
links.append(
SitemapEntry(
'More Tags',
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dac0b4c8/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 1b6cfc4..1960d59 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -214,6 +214,12 @@ class RepositoryImplementation(object):
os.chmod(magic_file, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH)
self._setup_hooks(source_path)
+ def get_branches(self):
+ return self.repo.branches
+
+ def get_tags(self):
+ return self.repo.tags
+
class Repository(Artifact, ActivityObject):
BATCH_SIZE=100
class __mongometa__:
@@ -326,6 +332,10 @@ class Repository(Artifact, ActivityObject):
return self._impl.last_commit_ids(commit, paths)
def is_empty(self):
return self._impl.is_empty()
+ def get_branches(self):
+ return self._impl.get_branches()
+ def get_tags(self):
+ return self._impl.get_tags()
def _log(self, rev, skip, limit):
head = self.commit(rev)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dac0b4c8/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index c656dfd..5683296 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -361,6 +361,12 @@ class GitImplementation(M.RepositoryImplementation):
def is_empty(self):
return not self._git or len(self._git.heads) == 0
+ def get_branches(self):
+ return [Object(name=b.name,object_id=b.commit.hexsha) for b in self._git.heads]
+
+ def get_tags(self):
+ return [Object(name=t.name, object_id=t.commit.hexsha) for t in self._git.tags]
+
class _OpenedGitBlob(object):
CHUNK_SIZE=4096
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dac0b4c8/ForgeGit/forgegit/tests/data/testgit.git/refs/tags/foo
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testgit.git/refs/tags/foo b/ForgeGit/forgegit/tests/data/testgit.git/refs/tags/foo
new file mode 100644
index 0000000..7e970a5
--- /dev/null
+++ b/ForgeGit/forgegit/tests/data/testgit.git/refs/tags/foo
@@ -0,0 +1 @@
+1e146e67985dcd71c74de79613719bef7bddca4a
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dac0b4c8/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 316f202..60bbd38 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -340,6 +340,26 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
ThreadLocalORMSession.flush_all()
assert repo2.is_empty()
+class TestGitImplementation(unittest.TestCase):
+ def test_get_branches(self):
+ repo_dir = pkg_resources.resource_filename(
+ 'forgegit', 'tests/data/testgit.git')
+ repo = mock.Mock(full_fs_path=repo_dir)
+ impl = GM.git_repo.GitImplementation(repo)
+ self.assertEqual(impl.get_branches(), [
+ Object(name='master', object_id='1e146e67985dcd71c74de79613719bef7bddca4a'),
+ Object(name='zz', object_id='5c47243c8e424136fd5cdd18cd94d34c66d1955c')
+ ])
+
+ def test_get_tags(self):
+ repo_dir = pkg_resources.resource_filename(
+ 'forgegit', 'tests/data/testgit.git')
+ repo = mock.Mock(full_fs_path=repo_dir)
+ impl = GM.git_repo.GitImplementation(repo)
+ self.assertEqual(impl.get_tags(), [
+ Object(name='foo', object_id='1e146e67985dcd71c74de79613719bef7bddca4a'),
+ ])
+
class TestGitCommit(unittest.TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dac0b4c8/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 811380a..f017f0b 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -698,5 +698,11 @@ class SVNImplementation(M.RepositoryImplementation):
else:
raise
+ def get_branches(self):
+ return []
+
+ def get_tags(self):
+ return []
+
Mapper.compile_all()
[11/38] git commit: [#6235] ticket:352 Fix path existence check
Posted by jo...@apache.org.
[#6235] ticket:352 Fix path existence check
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/91b68daf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/91b68daf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/91b68daf
Branch: refs/heads/cj/6218
Commit: 91b68daffc63f5bdb3f36703a1e4905b0c4cbc36
Parents: c0fb628
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:17:51 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:08 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/model/svn.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/91b68daf/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 363dd27..9d0a521 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -125,7 +125,7 @@ def svn_path_exists(path, rev=None):
if rev:
rev = pysvn.Revision(pysvn.opt_revision_kind.number, rev)
else:
- rev = pysvn.Revision(pysvn.opt_revision_kind.unspecified)
+ rev = pysvn.Revision(pysvn.opt_revision_kind.head)
try:
svn.info2(path, revision=rev)
return True
[35/38] git commit: [#6218] Fixed failing test due to added tag
Posted by jo...@apache.org.
[#6218] Fixed failing test due to added tag
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6aa17e1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6aa17e1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6aa17e1d
Branch: refs/heads/cj/6218
Commit: 6aa17e1d9780586f0411ade48fe9a6933af282a0
Parents: dac0b4c
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Fri May 24 14:35:10 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 19:14:49 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/tests/model/test_repository.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6aa17e1d/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index 60bbd38..ba79ead 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -76,7 +76,7 @@ class TestNewGit(unittest.TestCase):
assert self.rev.tree._id == self.rev.tree_id
assert self.rev.summary == self.rev.message.splitlines()[0]
assert self.rev.shorthand_id() == '[1e146e]'
- assert self.rev.symbolic_ids == (['master', 'zz'], [])
+ assert self.rev.symbolic_ids == (['master', 'zz'], ['foo'])
assert self.rev.url() == (
'/p/test/src-git/ci/'
'1e146e67985dcd71c74de79613719bef7bddca4a/')
[25/38] git commit: [#6235] use tarball tmp dir from ini,
rather than g.tmpdir
Posted by jo...@apache.org.
[#6235] use tarball tmp dir from ini, rather than g.tmpdir
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e31e5494
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e31e5494
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e31e5494
Branch: refs/heads/cj/6218
Commit: e31e549478f9de0c22245d71ca9ce20cf359d0a4
Parents: 9d4285f
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon Jun 3 15:48:56 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Mon Jun 3 15:48:56 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e31e5494/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 5840033..01ca3df 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -319,7 +319,8 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
'test-svn-tags-19-tags-tag-1.0/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
+ tmpdir = tg.config['scm.repos.tarball.root']
+ tarball_path = os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
self.svn_tags.tarball(rev, '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
@@ -353,7 +354,8 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-branches-aaa/svn-commit.tmp',
'test-svn-tags-19-branches-aaa/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
+ tmpdir = tg.config['scm.repos.tarball.root']
+ tarball_path = os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
self.svn_tags.tarball(rev, '/branches/aaa/')
assert os.path.isfile(fn), fn
@@ -388,7 +390,8 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-trunk/ccc.txt',
'test-svn-tags-19-trunk/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
+ tmpdir = tg.config['scm.repos.tarball.root']
+ tarball_path = os.path.join(tmpdir, 'svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-trunk.zip'
self.svn_tags.tarball(rev, '/trunk/')
assert os.path.isfile(fn), fn
@@ -410,12 +413,12 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
# no path, and no trunk dir
# expect snapshot of repo root
h.set_context('test', 'src', neighborhood='Projects')
- fn = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/test-src-1.zip')
+ fn = os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-1.zip')
self.repo.tarball('1')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
- shutil.rmtree(os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/'), ignore_errors=True)
+ shutil.rmtree(os.path.join(tmpdir, 'svn/t/te/test/testsvn/'), ignore_errors=True)
shutil.rmtree(tarball_path, ignore_errors=True)
def test_is_empty(self):
[30/38] git commit: [#6255] switch dependencies from PIL to Pillow
Posted by jo...@apache.org.
[#6255] switch dependencies from PIL to Pillow
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3f51e124
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3f51e124
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3f51e124
Branch: refs/heads/cj/6218
Commit: 3f51e124dc0681869e76ca7f37348a028b39c6b6
Parents: 686ae83
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon May 20 17:26:20 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 17:01:52 2013 +0000
----------------------------------------------------------------------
Allura/setup.py | 1 -
requirements-common.txt | 2 +-
2 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3f51e124/Allura/setup.py
----------------------------------------------------------------------
diff --git a/Allura/setup.py b/Allura/setup.py
index 983cff0..4a5f4f1 100644
--- a/Allura/setup.py
+++ b/Allura/setup.py
@@ -68,7 +68,6 @@ setup(
"Pygments >= 1.1.1",
"python-openid >= 2.2.4",
"EasyWidgets >= 0.1.1",
- "PIL >= 1.1.7",
"iso8601",
"chardet >= 1.0.1",
"feedparser >= 5.0.1",
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3f51e124/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 445d8be..1f5067e 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -27,7 +27,7 @@ oauth2==1.5.170
Paste==1.7.5.1
PasteDeploy==1.5.0
PasteScript==1.7.4.2
-PIL==1.1.7
+Pillow==2.0.0
poster==0.8.1
Pygments==1.5
pymongo==2.4.2
[10/38] git commit: [#6235] ticket:352 Pass path parameter only to
svn snapshot urls
Posted by jo...@apache.org.
[#6235] ticket:352 Pass path parameter only to svn snapshot urls
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/070c5d6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/070c5d6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/070c5d6d
Branch: refs/heads/cj/6218
Commit: 070c5d6d4c74cec705726beddbb81c7b07e92e9e
Parents: 91b68da
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:29:05 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:08 2013 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/tree.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/070c5d6d/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index b2dbcfe..d66a327 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -31,7 +31,7 @@ Tree <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(co
{% block actions %}
{% if tarball_url %}
-<a href="{{ tarball_url + ('?path=' + path if path else '') }}" rel="nofollow">
+<a href="{{ tarball_url + ('?path=' + path if c.app.tool_label.lower() == 'svn' and path else '') }}" rel="nofollow">
<b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
</a>
{% endif %}
[31/38] git commit: [#6255] remove symlink workarounds for PIL
Posted by jo...@apache.org.
[#6255] remove symlink workarounds for PIL
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/84638183
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/84638183
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/84638183
Branch: refs/heads/cj/6218
Commit: 84638183a71bc8f7e40a4dab973c3ce245a8bbfb
Parents: 3f51e12
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Sat May 25 11:23:42 2013 -0400
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 17:01:52 2013 +0000
----------------------------------------------------------------------
README.markdown | 4 +---
vagrant/manifests/ubuntu-1204-server-amd64.pp | 12 ------------
2 files changed, 1 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/84638183/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 4284960..55b6c13 100644
--- a/README.markdown
+++ b/README.markdown
@@ -36,11 +36,9 @@ We'll use [VirtualBox](http://www.virtualbox.org) and [Ubuntu 12.04](http://ubun
# Installation
-Before we begin, you'll need to install some system packages. [Use google if you need additional PIL/jpeg help.](http://www.google.com/search?q=ubuntu+pil+jpeg+virtualenv)
+Before we begin, you'll need to install some system packages.
~$ sudo aptitude install git-core default-jre-headless python-dev libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev
- ~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
- ~$ sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
To install MongoDB 2.2.3, follow the instructions here:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/84638183/vagrant/manifests/ubuntu-1204-server-amd64.pp
----------------------------------------------------------------------
diff --git a/vagrant/manifests/ubuntu-1204-server-amd64.pp b/vagrant/manifests/ubuntu-1204-server-amd64.pp
index 950f2af..be00025 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -45,17 +45,6 @@ package { $packages:
require => Exec[ "package index update" ],
}
-file { '/usr/lib/libz.so':
- ensure => 'link',
- target => '/usr/lib/x86_64-linux-gnu/libz.so',
- require => Package[ "zlib1g-dev" ],
-}
-file { '/usr/lib/libjpeg.so':
- ensure => 'link',
- target => '/usr/lib/x86_64-linux-gnu/libjpeg.so',
- require => Package[ "libjpeg8-dev" ],
-}
-
# install python pip
exec { "install venv":
command => "/usr/bin/pip install virtualenv",
@@ -115,7 +104,6 @@ exec { "pip install":
returns => 0,
tries => 3,
require => [ Exec[ "clone repo"], Exec[ "create allura venv" ],
- File["/usr/lib/libjpeg.so"], File["/usr/lib/libz.so"],
],
}
[12/38] git commit: [#6235] ticket:352 Fix waiting for snapshot page
Posted by jo...@apache.org.
[#6235] ticket:352 Fix waiting for snapshot page
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c0fb628a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c0fb628a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c0fb628a
Branch: refs/heads/cj/6218
Commit: c0fb628a53d8388e123417a9568d76f9a6d05e68
Parents: 20be6df
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:05:08 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:08 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 4 ++--
Allura/allura/templates/repo/tarball.html | 12 +++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0fb628a/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 65ac0a2..1b6cfc4 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -272,8 +272,8 @@ class Repository(Artifact, ActivityObject):
filename = '%s-%s-%s' % (shortname, mount_point, revision)
return filename
- def tarball_url(self, revision):
- filename = '%s%s' % (self.tarball_filename(revision), '.zip')
+ def tarball_url(self, revision, path=None):
+ filename = '%s%s' % (self.tarball_filename(revision, path), '.zip')
r = os.path.join(self.tool,
self.project.shortname[:1],
self.project.shortname[:2],
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0fb628a/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index 91f6f0b..e4a9cad 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -28,10 +28,11 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
{% block extra_js %}
{{ super() }}
<script type="text/javascript">$(function() {
+ {% set path = request.params.get('path', '') %}
{% if status == 'ready' %}
{% if 'no-redirect' not in request.params %}
$(document).ready(function() {
- window.location.href = '{{c.app.repo.tarball_url(revision)}}';
+ window.location.href = '{{c.app.repo.tarball_url(revision, path)}}';
});
{% endif %}
{% else %}
@@ -52,15 +53,15 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
left: 10 // Left position relative to parent in px
};
var spinner = new Spinner(opts).spin($('#snapshot_status')[0]);
- var delay = 5000
+ var delay = 5000;
// Check tarball status every 5 seconds
function check_status() {
- $.get('{{commit.url()}}tarball_status', function(data) {
+ $.get('{{commit.url()}}tarball_status?path={{path}}', function(data) {
if (data.status === 'ready') {
spinner.stop();
$('#snapshot_status h2').toggle();
{% if 'no-redirect' not in request.params %}
- window.location.href = '{{c.app.repo.tarball_url(revision)}}';
+ window.location.href = '{{c.app.repo.tarball_url(revision, path)}}';
{% endif %}
} else {
if (delay < 600000){
@@ -77,9 +78,10 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
{% endblock %}
{% block content %}
+{% set path = request.params.get('path', '') %}
<div id='snapshot_status'>
<h2 class="busy">Generating snapshot...</h2>
- <h2 class="ready">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision)}}">direct link</a>.</h2>
+ <h2 class="ready">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision, path)}}">direct link</a>.</h2>
</div>
{% endblock %}
[05/38] git commit: [#6235] ticket:352 Basic tests for
trunk/tags/branches aware svn
Posted by jo...@apache.org.
[#6235] ticket:352 Basic tests for trunk/tags/branches aware svn
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/77ae4f6c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/77ae4f6c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/77ae4f6c
Branch: refs/heads/cj/6218
Commit: 77ae4f6c953885719a760a762b117a7aea62f618
Parents: 67a1021
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 10:27:17 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:04 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 68 +++++++++++++++++
1 files changed, 68 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/77ae4f6c/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 6026125..c528004 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -44,6 +44,7 @@ from allura.tests.model.test_repo import RepoImplTestBase
from forgesvn import model as SM
from forgesvn.model.svn import svn_path_exists
from forgesvn.tests import with_svn
+from allura.tests.decorators import with_tool
class TestNewRepo(unittest.TestCase):
@@ -110,6 +111,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
self.setup_with_tools()
@with_svn
+ @with_tool('test', 'SVN', 'svn-tags', 'SVN with tags')
def setup_with_tools(self):
setup_global_objects()
h.set_context('test', 'src', neighborhood='Projects')
@@ -122,6 +124,13 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
tool = 'svn',
status = 'creating')
self.repo.refresh()
+ self.svn_tags = SM.Repository(
+ name='testsvn-trunk-tags-branches',
+ fs_path=repo_dir,
+ url_path = '/test/',
+ tool = 'svn',
+ status = 'creating')
+ self.svn_tags.refresh()
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
@@ -302,6 +311,65 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
tarball_zip = ZipFile(os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-1.zip'), 'r')
assert_equal(tarball_zip.namelist(), ['test-src-1/', 'test-src-1/README'])
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
+ def test_tarball_aware_of_tags(self):
+ # TODO: check zip that it actually contains only needed files
+ tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
+ self.svn_tags.tarball('1', '/tags/tag-1.0/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # if inside of tags, but no tag is specified
+ # expect snapshot of trunk
+ fn = tarball_path + 'test-svn-tags-1-trunk.zip'
+ self.svn_tags.tarball('1', '/tags/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
+ def test_tarball_aware_of_branches(self):
+ # TODO: check zip that it actually contains only needed files
+ tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
+ self.svn_tags.tarball('1', '/branches/aaa/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ self.svn_tags.tarball('1', '/branches/aaa/some/path/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # if inside of branches, but no branch is specified
+ # expect snapshot of trunk
+ fn = tarball_path + 'test-svn-tags-1-trunk.zip'
+ self.svn_tags.tarball('1', '/branches/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
+ def test_tarball_aware_of_trunk(self):
+ # TODO: check zip that it actually contains only needed files
+ tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ fn = tarball_path + 'test-svn-tags-1-trunk.zip'
+ self.svn_tags.tarball('1', '/trunk/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ self.svn_tags.tarball('1', '/trunk/some/path/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # no path, but there are trunk in the repo
+ # expect snapshot of trunk
+ self.svn_tags.tarball('1')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # no path, and no trunk dir
+ # expect snapshot of repo root
+ fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
+ self.repo.tarball('1')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+
def test_is_empty(self):
assert not self.repo.is_empty()
with TempDirectory() as d:
[19/38] git commit: [#6235] ticket:366 Pass path for all repo types
Posted by jo...@apache.org.
[#6235] ticket:366 Pass path for all repo types
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5068fa1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5068fa1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5068fa1d
Branch: refs/heads/cj/6218
Commit: 5068fa1da9c49ca7cdbdcbdc8a9e392a40f1a908
Parents: 2cd57fd
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 24 14:30:21 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/tree.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5068fa1d/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index d66a327..b2dbcfe 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -31,7 +31,7 @@ Tree <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(co
{% block actions %}
{% if tarball_url %}
-<a href="{{ tarball_url + ('?path=' + path if c.app.tool_label.lower() == 'svn' and path else '') }}" rel="nofollow">
+<a href="{{ tarball_url + ('?path=' + path if path else '') }}" rel="nofollow">
<b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
</a>
{% endif %}
[09/38] git commit: [#6235] ticket:352 Pass path to the snapshot task
Posted by jo...@apache.org.
[#6235] ticket:352 Pass path to the snapshot task
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/20be6df0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/20be6df0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/20be6df0
Branch: refs/heads/cj/6218
Commit: 20be6df0394588f830731b776b25f9f480775bce
Parents: 43364b2
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 15:28:06 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:07 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 9 +-
Allura/allura/model/repository.py | 3 -
Allura/allura/tasks/repo_tasks.py | 6 +-
Allura/allura/templates/repo/tree.html | 4 +-
ForgeSVN/forgesvn/model/svn.py | 6 ++
.../forgesvn/tests/functional/test_controllers.py | 60 +++++++++++++++
6 files changed, 76 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 6967685..a8f8c68 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -452,20 +452,21 @@ class CommitBrowser(BaseController):
@expose('jinja:allura:templates/repo/tarball.html')
def tarball(self, **kw):
+ path = kw.pop('path', None)
if not asbool(tg.config.get('scm.repos.tarball.enable', False)):
raise exc.HTTPNotFound()
rev = self._commit.url().split('/')[-2]
- status = c.app.repo.get_tarball_status(rev)
+ status = c.app.repo.get_tarball_status(rev, path)
if status is None:
- allura.tasks.repo_tasks.tarball.post(revision=rev)
+ allura.tasks.repo_tasks.tarball.post(revision=rev, path=path)
return dict(commit=self._commit, revision=rev, status=status)
@expose('json:')
- def tarball_status(self):
+ def tarball_status(self, path=None, **kw):
if not asbool(tg.config.get('scm.repos.tarball.enable', False)):
raise exc.HTTPNotFound()
rev = self._commit.url().split('/')[-2]
- return dict(status=c.app.repo.get_tarball_status(rev))
+ return dict(status=c.app.repo.get_tarball_status(rev, path))
@expose('jinja:allura:templates/repo/log.html')
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index b728987..65ac0a2 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -270,9 +270,6 @@ class Repository(Artifact, ActivityObject):
shortname = c.project.shortname.replace('/', '-')
mount_point = c.app.config.options.mount_point
filename = '%s-%s-%s' % (shortname, mount_point, revision)
- if path:
- path = path.strip('/')
- filename += '-' + '-'.join(path.split('/'))
return filename
def tarball_url(self, revision):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 837c686..95d7052 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -120,17 +120,17 @@ def reclone_repo(*args, **kwargs):
g.post_event('repo_clone_task_failed', source_url, source_path, traceback.format_exc())
@task
-def tarball(revision=None):
+def tarball(revision=None, path=None):
log = logging.getLogger(__name__)
if revision:
repo = c.app.repo
- status = repo.get_tarball_status(revision)
+ status = repo.get_tarball_status(revision, path)
if status:
log.info('Skipping tarball for repository %s:%s rev %s because it is already %s' %
(c.project.shortname, c.app.config.options.mount_point, revision, status))
else:
try:
- repo.tarball(revision)
+ repo.tarball(revision, path)
except:
log.error('Could not create tarball for repository %s:%s revision %s' % (c.project.shortname, c.app.config.options.mount_point, revision), exc_info=True)
else:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index 740ed04..b2dbcfe 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -31,8 +31,8 @@ Tree <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(co
{% block actions %}
{% if tarball_url %}
- <a href="{{tarball_url}}" rel="nofollow">
- <b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
+<a href="{{ tarball_url + ('?path=' + path if path else '') }}" rel="nofollow">
+ <b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
</a>
{% endif %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 8c65f78..363dd27 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -101,6 +101,12 @@ class Repository(M.Repository):
if not self.heads: return None
return self._impl.commit(self.heads[0].object_id)
+ def tarball_filename(self, revision, path=None):
+ fn = super(Repository, self).tarball_filename(revision, path)
+ path = self._impl._path_to_root(path, revision)
+ fn += '-' + '-'.join(path.split('/'))
+ return fn
+
class SVNCalledProcessError(Exception):
def __init__(self, cmd, returncode, stdout, stderr):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 46a42e3..5a69ee6 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -16,6 +16,7 @@
# under the License.
import json
+import shutil
import pkg_resources
from pylons import tmpl_context as c
@@ -26,6 +27,7 @@ from allura import model as M
from allura.lib import helpers as h
from alluratest.controller import TestController
from forgesvn.tests import with_svn
+from allura.tests.decorators import with_tool
class SVNTestController(TestController):
def setUp(self):
@@ -33,6 +35,7 @@ class SVNTestController(TestController):
self.setup_with_tools()
@with_svn
+ @with_tool('test', 'SVN', 'svn-tags', 'SVN with tags')
def setup_with_tools(self):
h.set_context('test', 'src', neighborhood='Projects')
repo_dir = pkg_resources.resource_filename(
@@ -46,6 +49,13 @@ class SVNTestController(TestController):
c.app.repo.refresh()
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ c.app.repo.fs_path = repo_dir
+ c.app.repo.status = 'ready'
+ c.app.repo.name = 'testsvn-trunk-tags-branches'
+ c.app.repo.refresh()
+ ThreadLocalORMSession.flush_all()
+ ThreadLocalORMSession.close_all()
h.set_context('test', 'src', neighborhood='Projects')
@@ -185,6 +195,56 @@ class TestRootController(SVNTestController):
r = self.app.get('/src/3/tarball_status')
assert '{"status": "ready"}' in r
+ def test_tarball_tags_aware(self):
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ shutil.rmtree(c.app.repo.tarball_path, ignore_errors=True)
+ r = self.app.get('/svn-tags/19/tree/')
+ link = r.html.find('h2', attrs={'class': 'dark title'})
+ link = link.find('small').findAll('a')[0]
+ assert_equal(link.text, 'Download Snapshot')
+ assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball')
+
+ r = self.app.get('/svn-tags/19/tree/tags/tag-1.0/')
+ link = r.html.find('h2', attrs={'class': 'dark title'})
+ link = link.find('small').findAll('a')[0]
+ assert_equal(link.text, 'Download Snapshot')
+ assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball?path=/tags/tag-1.0')
+
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ assert_equal(r.json['status'], None)
+ r = self.app.get(link.get('href'))
+ assert 'Generating snapshot...' in r
+ M.MonQTask.run_ready()
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ assert_equal(r.json['status'], 'ready')
+
+ r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ assert_equal(r.json['status'], None)
+ r = self.app.get('/svn-tags/19/tarball?path=/trunk/')
+ assert 'Generating snapshot...' in r
+ M.MonQTask.run_ready()
+ r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ assert_equal(r.json['status'], 'ready')
+
+ r = self.app.get('/svn-tags/19/tarball_status?path=/branches/aaa/')
+ assert_equal(r.json['status'], None)
+
+ # All of the following also should be ready because...
+ # ...this is essentially the same as trunk snapshot
+ r = self.app.get('/svn-tags/19/tarball_status?path=/trunk/some/path/')
+ assert_equal(r.json['status'], 'ready')
+ r = self.app.get('/svn-tags/19/tarball_status')
+ assert_equal(r.json['status'], 'ready')
+ # ...the same as trunk, 'cause concrete tag isn't specified
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/')
+ assert_equal(r.json['status'], 'ready')
+ # ...the same as trunk, 'cause concrete branch isn't specified
+ r = self.app.get('/svn-tags/19/tarball_status?path=/branches/')
+ assert_equal(r.json['status'], 'ready')
+ # ...this is essentially the same as tag snapshot
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0/dir')
+ assert_equal(r.json['status'], 'ready')
+
class TestImportController(SVNTestController):
def test_index(self):
[24/38] git commit: move mercurial out of requirements-common.txt
(GPL; only needed if you install ForgeHg)
Posted by jo...@apache.org.
move mercurial out of requirements-common.txt (GPL; only needed if you install ForgeHg)
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9d4285f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9d4285f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9d4285f1
Branch: refs/heads/cj/6218
Commit: 9d4285f17a439c25822f903c45abbc9392d68e04
Parents: 8a71b16
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:27:09 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:27:09 2013 +0000
----------------------------------------------------------------------
requirements-common.txt | 1 -
requirements-sf.txt | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9d4285f1/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 2b5f8b5..a105ba2 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -21,7 +21,6 @@ httplib2==0.7.4
iso8601==0.1.4
Jinja2==2.6
Markdown==2.2.0
-mercurial==1.4.3
Ming==0.3.5dev-20130522
oauth2==1.5.170
# tg2 dep PasteDeploy must specified before TurboGears2, to avoid a version/allow-hosts problem
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9d4285f1/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 5ea8a38..8792c7f 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -7,6 +7,7 @@ coverage==3.5a1-20110413
ForgeHg==0.1.11
ForgePastebin==0.2.6
mechanize==0.2.4
+mercurial==1.4.3
MySQL-python==1.2.3c1
newrelic==1.11.0.55
phpserialize==1.2
[22/38] git commit: [#6235] update rat-excludes.txt for new svn test
data
Posted by jo...@apache.org.
[#6235] update rat-excludes.txt for new svn test data
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ab5f161f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ab5f161f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ab5f161f
Branch: refs/heads/cj/6218
Commit: ab5f161f959443fe04618c4f61d2c526d2f1ecfb
Parents: 30ff42e
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:13:43 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:10 2013 +0000
----------------------------------------------------------------------
rat-excludes.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ab5f161f/rat-excludes.txt
----------------------------------------------------------------------
diff --git a/rat-excludes.txt b/rat-excludes.txt
index 49e640b..78aba56 100644
--- a/rat-excludes.txt
+++ b/rat-excludes.txt
@@ -34,7 +34,7 @@ Allura/allura/tests/data/test_mime/text_file.txt
Allura/run/dummy.txt
AlluraTesting/jslint/
ForgeGit/forgegit/data/post-receive_tmpl
-ForgeSVN/forgesvn/tests/data/testsvn/
+ForgeSVN/forgesvn/tests/data/
solr_config/core0/conf/spellings.txt
solr_config/core1/conf/spellings.txt
solr_config/solr.xml
[16/38] git commit: [#6235] ticket:352 Fix tarball() signature for git
Posted by jo...@apache.org.
[#6235] ticket:352 Fix tarball() signature for git
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2e55361a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2e55361a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2e55361a
Branch: refs/heads/cj/6218
Commit: 2e55361a8290d5e0e6f46cd4ad1fb5825951a2b2
Parents: 070c5d6
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:29:57 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2e55361a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index a9d16c0..c656dfd 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -344,7 +344,7 @@ class GitImplementation(M.RepositoryImplementation):
tree = self.refresh_tree_info(ci.tree, set())
return tree._id
- def tarball(self, commit):
+ def tarball(self, commit, path=None):
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
archive_name = self._repo.tarball_filename(commit)
[26/38] git commit: [#6319] Bump EW version
Posted by jo...@apache.org.
[#6319] Bump EW version
Signed-off-by: Tim Van Steenburgh <tv...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/73f84edc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/73f84edc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/73f84edc
Branch: refs/heads/cj/6218
Commit: 73f84edc952a8868c29dd21a74432d399714ee02
Parents: e31e549
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Mon Jun 3 14:55:58 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Mon Jun 3 16:46:37 2013 +0000
----------------------------------------------------------------------
requirements-common.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/73f84edc/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index a105ba2..445d8be 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -10,7 +10,7 @@ Creoleparser==0.7.3
decorator==3.3.2
# dep of pypeline
docutils==0.8.1
-EasyWidgets==0.2dev-20130116
+EasyWidgets==0.2dev-20130603
faulthandler==2.1
feedparser==5.0.1
FormEncode==1.2.4
[08/38] git commit: [#6235] ticket:352 Path-aware svn snapshots
Posted by jo...@apache.org.
[#6235] ticket:352 Path-aware svn snapshots
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/43364b23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/43364b23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/43364b23
Branch: refs/heads/cj/6218
Commit: 43364b23aa54f39829dedd349406c670015850a8
Parents: d01f821
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 13:02:40 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:07 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/model/svn.py | 16 ++-
ForgeSVN/forgesvn/tests/model/test_repository.py | 100 +++++++++--------
2 files changed, 64 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/43364b23/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index b649dae..8c65f78 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -114,10 +114,14 @@ class SVNCalledProcessError(Exception):
(self.cmd, self.returncode, self.stdout, self.stderr)
-def svn_path_exists(path):
+def svn_path_exists(path, rev=None):
svn = SVNLibWrapper(pysvn.Client())
+ if rev:
+ rev = pysvn.Revision(pysvn.opt_revision_kind.number, rev)
+ else:
+ rev = pysvn.Revision(pysvn.opt_revision_kind.unspecified)
try:
- svn.info2(path)
+ svn.info2(path, revision=rev)
return True
except pysvn.ClientError:
return False
@@ -636,7 +640,7 @@ class SVNImplementation(M.RepositoryImplementation):
entries[path] = self._oid(info.last_changed_rev.number)
return entries
- def _path_to_root(self, path):
+ def _path_to_root(self, path, rev=None):
'''Return tag/branch/trunk root for given path inside svn repo'''
if path:
path = path.strip('/').split('/')
@@ -652,13 +656,13 @@ class SVNImplementation(M.RepositoryImplementation):
return '/'.join(path[:idx + 1]) # path/trunk
# no tag/brach/trunk in path
trunk_exists = svn_path_exists(
- 'file://%s%s/%s' % (self._repo.fs_path, self._repo.name, 'trunk'))
+ 'file://%s%s/%s' % (self._repo.fs_path, self._repo.name, 'trunk'), rev)
if trunk_exists:
return 'trunk'
return ''
def tarball(self, commit, path=None):
- path = self._path_to_root(path)
+ path = self._path_to_root(path, commit)
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
archive_name = self._repo.tarball_filename(commit, path)
@@ -666,7 +670,7 @@ class SVNImplementation(M.RepositoryImplementation):
filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.zip'))
tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
rmtree(dest, ignore_errors=True)
- path = os.path.join(self._url, '')#path)
+ path = os.path.join(self._url, path)
try:
self._svn.export(path,
dest,
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/43364b23/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index e131764..28b980b 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -310,105 +310,113 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
assert os.path.isfile(os.path.join(tmpdir, "svn/t/te/test/testsvn/test-src-1.zip"))
tarball_zip = ZipFile(os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-1.zip'), 'r')
assert_equal(tarball_zip.namelist(), ['test-src-1/', 'test-src-1/README'])
+ shutil.rmtree(self.repo.tarball_path, ignore_errors=True)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_tags(self):
- tag_content = ['test-svn-tags-1-tags-tag-1.0/',
- 'test-svn-tags-1-tags-tag-1.0/svn-commit.tmp',
- 'test-svn-tags-1-tags-tag-1.0/README']
+ rev = '19'
+ tag_content = sorted(['test-svn-tags-19-tags-tag-1.0/',
+ 'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
+ 'test-svn-tags-19-tags-tag-1.0/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
- fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
- self.svn_tags.tarball('1', '/tags/tag-1.0/')
+ fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
+ self.svn_tags.tarball(rev, '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), tag_content)
+ assert_equal(sorted(snapshot.namelist()), tag_content)
os.remove(fn)
- self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
+ self.svn_tags.tarball(rev, '/tags/tag-1.0/some/path/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), tag_content)
+ assert_equal(sorted(snapshot.namelist()), tag_content)
os.remove(fn)
# if inside of tags, but no tag is specified
# expect snapshot of trunk
- fn = tarball_path + 'test-svn-tags-1-trunk.zip'
- self.svn_tags.tarball('1', '/tags/')
+ fn = tarball_path + 'test-svn-tags-19-trunk.zip'
+ self.svn_tags.tarball(rev, '/tags/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
- 'test-svn-tags-1-trunk/aaa.txt',
- 'test-svn-tags-1-trunk/bbb.txt',
- 'test-svn-tags-1-trunk/ccc.txt',
- 'test-svn-tags-1-trunk/README'])
- os.remove(fn)
+ assert_equal(sorted(snapshot.namelist()),
+ sorted(['test-svn-tags-19-trunk/',
+ 'test-svn-tags-19-trunk/aaa.txt',
+ 'test-svn-tags-19-trunk/bbb.txt',
+ 'test-svn-tags-19-trunk/ccc.txt',
+ 'test-svn-tags-19-trunk/README']))
+ shutil.rmtree(tarball_path, ignore_errors=True)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_branches(self):
- branch_content = ['test-svn-tags-1-branches-aaa/',
- 'test-svn-tags-1-branches-aaa/aaa.txt',
- 'test-svn-tags-1-branches-aaa/svn-commit.tmp',
- 'test-svn-tags-1-branches-aaa/README']
+ rev = '19'
+ branch_content = sorted(['test-svn-tags-19-branches-aaa/',
+ 'test-svn-tags-19-branches-aaa/aaa.txt',
+ 'test-svn-tags-19-branches-aaa/svn-commit.tmp',
+ 'test-svn-tags-19-branches-aaa/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
- fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
- self.svn_tags.tarball('1', '/branches/aaa/')
+ fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
+ self.svn_tags.tarball(rev, '/branches/aaa/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), branch_content)
+ assert_equal(sorted(snapshot.namelist()), branch_content)
os.remove(fn)
- self.svn_tags.tarball('1', '/branches/aaa/some/path/')
+ self.svn_tags.tarball(rev, '/branches/aaa/some/path/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), branch_content)
+ assert_equal(sorted(snapshot.namelist()), branch_content)
os.remove(fn)
# if inside of branches, but no branch is specified
# expect snapshot of trunk
- fn = tarball_path + 'test-svn-tags-1-trunk.zip'
- self.svn_tags.tarball('1', '/branches/')
+ fn = tarball_path + 'test-svn-tags-19-trunk.zip'
+ self.svn_tags.tarball(rev, '/branches/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
- 'test-svn-tags-1-trunk/aaa.txt',
- 'test-svn-tags-1-trunk/bbb.txt',
- 'test-svn-tags-1-trunk/ccc.txt',
- 'test-svn-tags-1-trunk/README'])
- os.remove(fn)
+ assert_equal(sorted(snapshot.namelist()),
+ sorted(['test-svn-tags-19-trunk/',
+ 'test-svn-tags-19-trunk/aaa.txt',
+ 'test-svn-tags-19-trunk/bbb.txt',
+ 'test-svn-tags-19-trunk/ccc.txt',
+ 'test-svn-tags-19-trunk/README']))
+ shutil.rmtree(tarball_path, ignore_errors=True)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_trunk(self):
- trunk_content = ['test-svn-tags-1-trunk/',
- 'test-svn-tags-1-trunk/aaa.txt',
- 'test-svn-tags-1-trunk/bbb.txt',
- 'test-svn-tags-1-trunk/ccc.txt',
- 'test-svn-tags-1-trunk/README']
+ rev = '19'
+ trunk_content = sorted(['test-svn-tags-19-trunk/',
+ 'test-svn-tags-19-trunk/aaa.txt',
+ 'test-svn-tags-19-trunk/bbb.txt',
+ 'test-svn-tags-19-trunk/ccc.txt',
+ 'test-svn-tags-19-trunk/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
- fn = tarball_path + 'test-svn-tags-1-trunk.zip'
- self.svn_tags.tarball('1', '/trunk/')
+ fn = tarball_path + 'test-svn-tags-19-trunk.zip'
+ self.svn_tags.tarball(rev, '/trunk/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), trunk_content)
+ assert_equal(sorted(snapshot.namelist()), trunk_content)
os.remove(fn)
- self.svn_tags.tarball('1', '/trunk/some/path/')
+ self.svn_tags.tarball(rev, '/trunk/some/path/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), trunk_content)
+ assert_equal(sorted(snapshot.namelist()), trunk_content)
os.remove(fn)
# no path, but there are trunk in the repo
# expect snapshot of trunk
- self.svn_tags.tarball('1')
+ self.svn_tags.tarball(rev)
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), trunk_content)
+ assert_equal(sorted(snapshot.namelist()), trunk_content)
os.remove(fn)
# no path, and no trunk dir
# expect snapshot of repo root
+ h.set_context('test', 'src', neighborhood='Projects')
fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
self.repo.tarball('1')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
- os.remove(fn)
+ shutil.rmtree('/tmp/tarball/svn/t/te/test/testsvn/', ignore_errors=True)
+ shutil.rmtree(tarball_path, ignore_errors=True)
def test_is_empty(self):
assert not self.repo.is_empty()
[03/38] git commit: [#6275] ticket:367 show edit div after validation
error
Posted by jo...@apache.org.
[#6275] ticket:367 show edit div after validation error
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/56830d92
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/56830d92
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/56830d92
Branch: refs/heads/cj/6218
Commit: 56830d92a82a2e6aad53620254b923fcde1301f3
Parents: 9bd1343
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Tue May 28 03:04:44 2013 +0400
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Fri May 31 07:49:23 2013 +0000
----------------------------------------------------------------------
.../forgetracker/templates/tracker/ticket.html | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/56830d92/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index 8c98002..e6e11f6 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -206,6 +206,9 @@
$(this).trigger('editTicket');
return false;
});
+ if ($('div > div.error').hasClass('error')){
+ $('a.edit_ticket').click();
+ }
$('a.cancel_form').click(function () {
form_holder.hide();
view_holder.show();
[37/38] git commit: [#6218] Deprecated and removed references to
cached heads, branches and tags
Posted by jo...@apache.org.
[#6218] Deprecated and removed references to cached heads, branches and tags
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/0028dd43
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0028dd43
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0028dd43
Branch: refs/heads/cj/6218
Commit: 0028dd436512745a9f175f6407d2b0c092d3a35e
Parents: 6aa17e1
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue May 28 19:26:58 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Jun 3 19:14:49 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 12 ++--
Allura/allura/lib/repository.py | 2 +-
Allura/allura/model/repository.py | 43 ++++++-------
ForgeGit/forgegit/model/git_repo.py | 51 +++++----------
.../forgegit/tests/functional/test_controllers.py | 2 +-
ForgeGit/forgegit/tests/model/test_repository.py | 21 ++----
ForgeSVN/forgesvn/model/svn.py | 49 +++++++--------
ForgeSVN/forgesvn/tests/model/test_repository.py | 9 +--
ForgeUserStats/forgeuserstats/tests/test_model.py | 3 +-
ForgeUserStats/forgeuserstats/tests/test_stats.py | 3 +-
10 files changed, 77 insertions(+), 118 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index e4832aa..084e17a 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -147,11 +147,11 @@ class RepoRootController(BaseController, FeedController):
def mr_widget(self):
source_branches = [
b.name
- for b in c.app.repo.branches + c.app.repo.repo_tags]
+ for b in c.app.repo.get_branches() + c.app.repo.get_tags()]
with c.app.repo.push_upstream_context():
target_branches = [
b.name
- for b in c.app.repo.branches + c.app.repo.repo_tags]
+ for b in c.app.repo.get_branches() + c.app.repo.get_tags()]
return SCMMergeRequestWidget(
source_branches=source_branches,
target_branches=target_branches)
@@ -162,7 +162,7 @@ class RepoRootController(BaseController, FeedController):
security.require(security.has_access(c.app.repo, 'admin'))
c.form = self.mr_widget
if branch is None:
- source_branch=c.app.repo.branches[0].name
+ source_branch=c.app.default_branch_name
return dict(source_branch=source_branch)
@expose()
@@ -205,7 +205,7 @@ class RepoRootController(BaseController, FeedController):
@without_trailing_slash
@expose('json:')
def commit_browser_data(self):
- head_ids = [ head.object_id for head in c.app.repo.heads ]
+ head_ids = [ head.object_id for head in c.app.repo.get_heads() ]
commit_ids = list(c.app.repo.commitlog(head_ids))
log.info('Grab %d commit objects by ID', len(commit_ids))
commits_by_id = dict(
@@ -394,12 +394,12 @@ class BranchBrowser(BaseController):
@expose('jinja:allura:templates/repo/tags.html')
@with_trailing_slash
def tags(self, **kw):
- return dict(tags=c.app.repo.repo_tags)
+ return dict(tags=c.app.repo.get_tags())
@expose('jinja:allura:templates/repo/tags.html')
@with_trailing_slash
def branches(self, **kw):
- return dict(title='Branches', tags=c.app.repo.branches)
+ return dict(title='Branches', tags=c.app.repo.get_branches())
@expose()
@with_trailing_slash
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/Allura/allura/lib/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/repository.py b/Allura/allura/lib/repository.py
index afd5557..5798b21 100644
--- a/Allura/allura/lib/repository.py
+++ b/Allura/allura/lib/repository.py
@@ -119,7 +119,7 @@ class RepositoryApp(Application):
(repo_path_parts[1], repo_path_parts[-1]),
self.repo.upstream_repo.name)
]
- if len(c.app.repo.branches) and has_access(c.app.repo, 'admin'):
+ if not c.app.repo.is_empty() and has_access(c.app.repo, 'admin'):
links.append(SitemapEntry('Request Merge', c.app.url + 'request_merge',
ui_icon=g.icons['merge'],
))
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 1960d59..78e16e2 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -92,10 +92,6 @@ class RepositoryImplementation(object):
commit'''
raise NotImplementedError, 'commit_parents'
- def refresh_heads(self): # pragma no cover
- '''Sets repository metadata such as heads, tags, and branches'''
- raise NotImplementedError, 'refresh_heads'
-
def refresh_commit_info(self, oid, lazy=True): # pragma no cover
'''Refresh the data in the commit with id oid'''
raise NotImplementedError, 'refresh_commit_info'
@@ -173,12 +169,8 @@ class RepositoryImplementation(object):
return '[%s]' % oid[:6]
def symbolics_for_commit(self, commit):
- '''Return symbolic branch and tag names for a commit.
- Default generic implementation is provided, subclasses
- may override if they have more efficient means.'''
- branches = [b.name for b in self._repo.branches if b.object_id == commit._id]
- tags = [t.name for t in self._repo.repo_tags if t.object_id == commit._id]
- return branches, tags
+ '''Return symbolic branch and tag names for a commit.'''
+ raise NotImplementedError, 'symbolics_for_commit'
def url_for_commit(self, commit, url_type='ci'):
'return an URL, given either a commit or object id'
@@ -214,11 +206,17 @@ class RepositoryImplementation(object):
os.chmod(magic_file, stat.S_IRUSR|stat.S_IRGRP|stat.S_IROTH)
self._setup_hooks(source_path)
- def get_branches(self):
- return self.repo.branches
+ @property
+ def heads(self):
+ raise NotImplementedError, 'heads'
- def get_tags(self):
- return self.repo.tags
+ @property
+ def branches(self):
+ raise NotImplementedError, 'branches'
+
+ @property
+ def tags(self):
+ raise NotImplementedError, 'tags'
class Repository(Artifact, ActivityObject):
BATCH_SIZE=100
@@ -237,9 +235,9 @@ class Repository(Artifact, ActivityObject):
status=FieldProperty(str)
email_address=''
additional_viewable_extensions=FieldProperty(str)
- heads = FieldProperty([dict(name=str,object_id=str, count=int)])
- branches = FieldProperty([dict(name=str,object_id=str, count=int)])
- repo_tags = FieldProperty([dict(name=str,object_id=str, count=int)])
+ heads = FieldProperty(S.Deprecated)
+ branches = FieldProperty(S.Deprecated)
+ repo_tags = FieldProperty(S.Deprecated)
upstream_repo = FieldProperty(dict(name=str,url=str))
def __init__(self, **kw):
@@ -332,10 +330,12 @@ class Repository(Artifact, ActivityObject):
return self._impl.last_commit_ids(commit, paths)
def is_empty(self):
return self._impl.is_empty()
+ def get_heads(self):
+ return self._impl.heads
def get_branches(self):
- return self._impl.get_branches()
+ return self._impl.branches
def get_tags(self):
- return self._impl.get_tags()
+ return self._impl.tags
def _log(self, rev, skip, limit):
head = self.commit(rev)
@@ -531,13 +531,8 @@ class Repository(Artifact, ActivityObject):
log.info('... %r analyzing', self)
self.status = 'analyzing'
session(self).flush(self)
- self._impl.refresh_heads()
if asbool(tg.config.get('scm.new_refresh')):
refresh_repo(self, all_commits, notify, new_clone)
- for head in self.heads + self.branches + self.repo_tags:
- ci = self.commit(head.object_id)
- if ci is not None:
- head.count = self.count_revisions(ci)
finally:
log.info('... %s ready', self)
self.status = 'ready'
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 5683296..27b52d9 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -148,13 +148,6 @@ class GitImplementation(M.RepositoryImplementation):
def commit(self, rev):
'''Return a Commit object. rev can be _id or a branch/tag name'''
- # See if the rev is a named ref that we have cached, and use the sha1
- # from the cache. This ensures that we don't return a sha1 that we
- # don't have indexed into mongo yet.
- for ref in self._repo.heads + self._repo.branches + self._repo.repo_tags:
- if ref.name == rev:
- rev = ref.object_id
- break
cache = getattr(c, 'model_cache', '') or M.repo.ModelCache()
result = cache.get(M.repo.Commit, dict(_id=rev))
if result is None:
@@ -170,8 +163,8 @@ class GitImplementation(M.RepositoryImplementation):
except:
pass
log.exception('Error with rev_parse(%s)%s' % (str(rev) + '^0', url))
- if result is None: return None
- result.set_context(self._repo)
+ if result:
+ result.set_context(self._repo)
return result
def all_commit_ids(self):
@@ -189,7 +182,7 @@ class GitImplementation(M.RepositoryImplementation):
def new_commits(self, all_commits=False):
graph = {}
- to_visit = [ self._git.commit(rev=hd.object_id) for hd in self._repo.heads ]
+ to_visit = [ self._git.commit(rev=hd.object_id) for hd in self.heads ]
while to_visit:
obj = to_visit.pop()
if obj.hexsha in graph: continue
@@ -202,21 +195,6 @@ class GitImplementation(M.RepositoryImplementation):
to_visit += obj.parents
return list(topological_sort(graph))
- def refresh_heads(self):
- self._repo.heads = [
- Object(name=head.name, object_id=head.commit.hexsha)
- for head in self._git.heads
- if head.is_valid() ]
- self._repo.branches = [
- Object(name=head.name, object_id=head.commit.hexsha)
- for head in self._git.branches
- if head.is_valid() ]
- self._repo.repo_tags = [
- Object(name=tag.name, object_id=tag.commit.hexsha)
- for tag in self._git.tags
- if tag.is_valid() ]
- session(self._repo).flush()
-
def refresh_commit_info(self, oid, seen, lazy=True):
from allura.model.repo import CommitDoc
ci_doc = CommitDoc.m.get(_id=oid)
@@ -331,13 +309,12 @@ class GitImplementation(M.RepositoryImplementation):
return git.Object.new_from_sha(self._git, binsha)
def symbolics_for_commit(self, commit):
- branch_heads, tags = super(self.__class__, self).symbolics_for_commit(commit)
try:
- containing_branches = self._git.git.branch(contains=commit._id)
+ branches = [b.name for b in self.branches if b.object_id == commit._id]
+ tags = [t.name for t in self.tags if t.object_id == commit._id]
+ return branches, tags
except git.GitCommandError:
- return [], tags
- containing_branches = [br.strip(' *') for br in containing_branches.split('\n')]
- return containing_branches, tags
+ return [], []
def compute_tree_new(self, commit, tree_path='/'):
ci = self._git.rev_parse(commit._id)
@@ -361,11 +338,17 @@ class GitImplementation(M.RepositoryImplementation):
def is_empty(self):
return not self._git or len(self._git.heads) == 0
- def get_branches(self):
- return [Object(name=b.name,object_id=b.commit.hexsha) for b in self._git.heads]
+ @LazyProperty
+ def heads(self):
+ return [Object(name=b.name, object_id=b.commit.hexsha) for b in self._git.heads if b.is_valid()]
+
+ @LazyProperty
+ def branches(self):
+ return [Object(name=b.name, object_id=b.commit.hexsha) for b in self._git.branches if b.is_valid()]
- def get_tags(self):
- return [Object(name=t.name, object_id=t.commit.hexsha) for t in self._git.tags]
+ @LazyProperty
+ def tags(self):
+ return [Object(name=t.name, object_id=t.commit.hexsha) for t in self._git.tags if t.is_valid()]
class _OpenedGitBlob(object):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index fd61b4a..91a1387 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -466,7 +466,7 @@ class TestFork(_TestCase):
assert 'Improve documentation' in r, r.showbrowser()
revs = r.html.findAll('tr', attrs={'class': 'rev'})
links = revs[0].findAll('a')
- c_id = self.forked_repo.heads[0]['object_id']
+ c_id = self.forked_repo.get_heads()[0]['object_id']
assert_equal(links[0].get('href'), '/p/test2/code/ci/%s/' % c_id)
assert_equal(links[0].getText(), '[%s]' % c_id[:6])
assert_equal(links[1].get('href'), '/p/test2/code/ci/%s/tree' % c_id)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeGit/forgegit/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/model/test_repository.py b/ForgeGit/forgegit/tests/model/test_repository.py
index ba79ead..a03650d 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -63,8 +63,7 @@ class TestNewGit(unittest.TestCase):
# tool = 'git',
# status = 'creating')
self.repo.refresh()
- self.rev = M.repo.Commit.query.get(_id=self.repo.heads[0]['object_id'])
- self.rev.repo = self.repo
+ self.rev = self.repo.commit('master')
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
@@ -76,7 +75,7 @@ class TestNewGit(unittest.TestCase):
assert self.rev.tree._id == self.rev.tree_id
assert self.rev.summary == self.rev.message.splitlines()[0]
assert self.rev.shorthand_id() == '[1e146e]'
- assert self.rev.symbolic_ids == (['master', 'zz'], ['foo'])
+ assert self.rev.symbolic_ids == (['master'], ['foo']), self.rev.symbolic_ids
assert self.rev.url() == (
'/p/test/src-git/ci/'
'1e146e67985dcd71c74de79613719bef7bddca4a/')
@@ -234,12 +233,6 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
entry = self.repo.commit('HEAD')
assert str(entry.authored.name) == 'Rick Copeland', entry.authored
assert entry.message
- # Test that sha1s for named refs are looked up in cache first, instead
- # of from disk.
- with mock.patch('forgegit.model.git_repo.M.repo.Commit.query') as q:
- self.repo.heads.append(Object(name='HEAD', object_id='deadbeef'))
- self.repo.commit('HEAD')
- q.get.assert_called_with(_id='deadbeef')
# test the auto-gen tree fall-through
orig_tree = M.repo.Tree.query.get(_id=entry.tree_id)
assert orig_tree
@@ -265,7 +258,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
notifications = M.Notification.query.find().sort('pubdate')
n = notifications.all()[2]
assert_equal(n.subject, '[test:src-git] [1e146e] - Rick Copeland: Change README')
- assert 'master,zz: ' in n.text
+ assert 'master: ' in n.text
send_notifications(self.repo, ['1e146e67985dcd71c74de79613719bef7bddca4a', 'df30427c488aeab84b2352bdf88a3b19223f9d7a'])
ThreadLocalORMSession.flush_all()
notifications = M.Notification.query.find().sort('pubdate')
@@ -341,22 +334,22 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
assert repo2.is_empty()
class TestGitImplementation(unittest.TestCase):
- def test_get_branches(self):
+ def test_branches(self):
repo_dir = pkg_resources.resource_filename(
'forgegit', 'tests/data/testgit.git')
repo = mock.Mock(full_fs_path=repo_dir)
impl = GM.git_repo.GitImplementation(repo)
- self.assertEqual(impl.get_branches(), [
+ self.assertEqual(impl.branches, [
Object(name='master', object_id='1e146e67985dcd71c74de79613719bef7bddca4a'),
Object(name='zz', object_id='5c47243c8e424136fd5cdd18cd94d34c66d1955c')
])
- def test_get_tags(self):
+ def test_tags(self):
repo_dir = pkg_resources.resource_filename(
'forgegit', 'tests/data/testgit.git')
repo = mock.Mock(full_fs_path=repo_dir)
impl = GM.git_repo.GitImplementation(repo)
- self.assertEqual(impl.get_tags(), [
+ self.assertEqual(impl.tags, [
Object(name='foo', object_id='1e146e67985dcd71c74de79613719bef7bddca4a'),
])
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index f017f0b..23c1887 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -98,8 +98,7 @@ class Repository(M.Repository):
def latest(self, branch=None):
if self._impl is None: return None
- if not self.heads: return None
- return self._impl.commit(self.heads[0].object_id)
+ return self._impl.commit('HEAD')
def tarball_filename(self, revision, path=None):
fn = super(Repository, self).tarball_filename(revision, path)
@@ -299,42 +298,27 @@ class SVNImplementation(M.RepositoryImplementation):
c.app.config.options['checkout_url'] = ""
self._setup_special_files(source_url)
- def refresh_heads(self):
- info = self._svn.info2(
- self._url,
- revision=pysvn.Revision(pysvn.opt_revision_kind.head),
- recurse=False)[0][1]
- oid = self._oid(info.rev.number)
- self._repo.heads = [ Object(name=None, object_id=oid) ]
- # Branches and tags aren't really supported in subversion
- self._repo.branches = []
- self._repo.repo_tags = []
- session(self._repo).flush(self._repo)
-
def commit(self, rev):
if rev in ('HEAD', None):
- if not self._repo.heads: return None
- oid = self._repo.heads[0].object_id
+ oid = self._oid(self.head)
elif isinstance(rev, int) or rev.isdigit():
oid = self._oid(rev)
else:
oid = rev
result = M.repo.Commit.query.get(_id=oid)
- if result is None: return None
- result.set_context(self._repo)
+ if result:
+ result.set_context(self._repo)
return result
def all_commit_ids(self):
"""Return a list of commit ids, starting with the head (most recent
commit) and ending with the root (first commit).
"""
- if not self._repo.heads:
- return []
- head_revno = self._revno(self._repo.heads[0].object_id)
+ head_revno = self.head
return map(self._oid, range(head_revno, 0, -1))
def new_commits(self, all_commits=False):
- head_revno = self._revno(self._repo.heads[0].object_id)
+ head_revno = self.head
oids = [ self._oid(revno) for revno in range(1, head_revno+1) ]
if all_commits:
return oids
@@ -689,19 +673,32 @@ class SVNImplementation(M.RepositoryImplementation):
os.remove(tmpfilename)
def is_empty(self):
+ return self.head == 0
+
+ def symbolics_for_commit(self, commit):
+ return [], []
+
+ @LazyProperty
+ def head(self):
try:
- return self._svn.revpropget('revision', url=self._url)[0].number == 0
+ return int(self._svn.revpropget('revision', url=self._url)[0].number)
except pysvn.ClientError as e:
if str(e).startswith("Unable to connect") or \
str(e).startswith("Unable to open"):
- return True
+ return 0
else:
raise
- def get_branches(self):
+ @LazyProperty
+ def heads(self):
+ return [Object(name=None, object_id=self._oid(self.head))]
+
+ @LazyProperty
+ def branches(self):
return []
- def get_tags(self):
+ @LazyProperty
+ def tags(self):
return []
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 01ca3df..2c840b8 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -65,8 +65,7 @@ class TestNewRepo(unittest.TestCase):
tool = 'svn',
status = 'creating')
self.repo.refresh()
- self.rev = M.repo.Commit.query.get(_id=self.repo.heads[0]['object_id'])
- self.rev.repo = self.repo
+ self.rev = self.repo.commit('HEAD')
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
@@ -723,10 +722,7 @@ class TestRepo(_TestWithRepo):
name=committer_name,
email=committer_email),
_id=oid)).m.insert()
- def set_heads():
- self.repo.heads = [ ming.base.Object(name='head', object_id='foo0', count=100) ]
self.repo._impl.refresh_commit_info = refresh_commit_info
- self.repo._impl.refresh_heads = mock.Mock(side_effect=set_heads)
_id = lambda oid: getattr(oid, '_id', str(oid))
self.repo.shorthand_for_commit = lambda oid: '[' + _id(oid) + ']'
self.repo.url_for_commit = lambda oid: 'ci/' + _id(oid) + '/'
@@ -747,9 +743,6 @@ class TestRepo(_TestWithRepo):
self.repo.count_revisions=mock.Mock(return_value=100)
self.repo._impl.commit = mock.Mock(return_value=ci)
self.repo._impl.new_commits = mock.Mock(return_value=['foo%d' % i for i in range(100) ])
- def set_heads():
- self.repo.heads = [ ming.base.Object(name='head', object_id='foo0', count=100) ]
- self.repo._impl.refresh_heads = mock.Mock(side_effect=set_heads)
# make unreadable by *anonymous, so additional notification logic executes
self.repo.acl = []
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeUserStats/forgeuserstats/tests/test_model.py
----------------------------------------------------------------------
diff --git a/ForgeUserStats/forgeuserstats/tests/test_model.py b/ForgeUserStats/forgeuserstats/tests/test_model.py
index cc67e27..a6526e1 100644
--- a/ForgeUserStats/forgeuserstats/tests/test_model.py
+++ b/ForgeUserStats/forgeuserstats/tests/test_model.py
@@ -337,8 +337,7 @@ class TestUserStats(unittest.TestCase):
c.app.repo.name = 'testgit.git'
repo = c.app.repo
repo.refresh()
- commit = M.repo.Commit.query.get(_id=repo.heads[0]['object_id'])
- commit.repo = repo
+ commit = repo.commit()
init_commits = self.user.stats.getCommits()
assert init_commits['number'] == 4
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0028dd43/ForgeUserStats/forgeuserstats/tests/test_stats.py
----------------------------------------------------------------------
diff --git a/ForgeUserStats/forgeuserstats/tests/test_stats.py b/ForgeUserStats/forgeuserstats/tests/test_stats.py
index 90a467e..d13096f 100644
--- a/ForgeUserStats/forgeuserstats/tests/test_stats.py
+++ b/ForgeUserStats/forgeuserstats/tests/test_stats.py
@@ -192,8 +192,7 @@ class TestGitCommit(TestController, unittest.TestCase):
c.app.repo.name = 'testgit.git'
self.repo = c.app.repo
self.repo.refresh()
- self.rev = M.repo.Commit.query.get(_id=self.repo.heads[0]['object_id'])
- self.rev.repo = self.repo
+ self.rev = self.repo.commit()
@td.with_user_project('test-admin')
def test_commit(self):
[13/38] git commit: [#6235] ticket:366 Fix tarball url calculation
for dirs with spaces
Posted by jo...@apache.org.
[#6235] ticket:366 Fix tarball url calculation for dirs with spaces
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/30ff42e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/30ff42e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/30ff42e7
Branch: refs/heads/cj/6218
Commit: 30ff42e72b7a6bfa6d1aa331ae1833c3c62a4a24
Parents: 85fbe7d
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 29 07:12:50 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/30ff42e7/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index a8f8c68..e4832aa 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -522,7 +522,7 @@ class TreeBrowser(BaseController, DispatchIndex):
cutout = len('tree' + self._path)
if request.path.endswith('/') and not self._path.endswith('/'):
cutout += 1
- tarball_url = '%starball' % request.path[:-cutout]
+ tarball_url = quote('%starball' % unquote(request.path)[:-cutout])
return dict(
repo=c.app.repo,
commit=self._commit,