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/04/03 19:26:30 UTC
[01/46] git commit: [#5951] Fixed javascript error when adding
milestones on field management page
Updated Branches:
refs/heads/cj/5879 99130f0cd -> 5eb6d368d (forced update)
[#5951] Fixed javascript error when adding milestones on field management page
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/ac4d60c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ac4d60c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ac4d60c3
Branch: refs/heads/cj/5879
Commit: ac4d60c3cd4d7b9bbb648a742d87f8f8b20c6764
Parents: 6f44f8a
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Mar 27 17:24:16 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 28 19:45:45 2013 +0000
----------------------------------------------------------------------
.../resources/js/sortable_repeated_field.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ac4d60c3/Allura/allura/lib/widgets/resources/js/sortable_repeated_field.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/sortable_repeated_field.js b/Allura/allura/lib/widgets/resources/js/sortable_repeated_field.js
index 251274c..7b46bef 100644
--- a/Allura/allura/lib/widgets/resources/js/sortable_repeated_field.js
+++ b/Allura/allura/lib/widgets/resources/js/sortable_repeated_field.js
@@ -79,7 +79,7 @@
.removeClass(self.opts.stub_cls)
.addClass(self.opts.field_cls)
.show()
- .find(':input[name^='+tpl_name+']').each(function() {
+ .find(':input[name^="'+tpl_name+'"]').each(function() {
var $this = $(this);
var name = $this.attr('name');
if(name){
@@ -120,7 +120,7 @@
var prefix = self.fld_name() + '-';
var regex = new RegExp(prefix + /\d+/.source)
self.data.$flist.children().each(function(index) {
- $(this).find(':input[name^='+prefix+']').each(function() {
+ $(this).find(':input[name^="'+prefix+'"]').each(function() {
var $this=$(this);
var name=$this.attr('name');
var newname = name.replace(regex, prefix + index);
[03/46] git commit: [#5951] Fixed AttributeError when _milestone
field not of type milestone,
and made behavior of all milestone-type field consistent
Posted by jo...@apache.org.
[#5951] Fixed AttributeError when _milestone field not of type milestone, and made behavior of all milestone-type field consistent
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/5acf2ebe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5acf2ebe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5acf2ebe
Branch: refs/heads/cj/5879
Commit: 5acf2ebefaee838aadd465d7c76ddbeb3cb72b4a
Parents: ac4d60c
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Mar 27 18:41:35 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 28 19:45:46 2013 +0000
----------------------------------------------------------------------
.../forgetracker/templates/tracker/ticket.html | 2 +
ForgeTracker/forgetracker/widgets/ticket_form.py | 18 ++++++++------
2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5acf2ebe/ForgeTracker/forgetracker/templates/tracker/ticket.html
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/templates/tracker/ticket.html b/ForgeTracker/forgetracker/templates/tracker/ticket.html
index 1d229fe..333b371 100644
--- a/ForgeTracker/forgetracker/templates/tracker/ticket.html
+++ b/ForgeTracker/forgetracker/templates/tracker/ticket.html
@@ -88,6 +88,8 @@
{% else %}
nobody
{% endif %}
+ {% elif field.type == 'milestone' %}
+ <a href="{{c.app.url}}{{field.name[1:]}}/{{ticket.custom_fields[field.name]}}">{{ticket.custom_fields[field.name]}}</a>
{% else %}
{{ticket.custom_fields[field.name]}}
{% endif %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5acf2ebe/ForgeTracker/forgetracker/widgets/ticket_form.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/ticket_form.py b/ForgeTracker/forgetracker/widgets/ticket_form.py
index 465dce5..aaba037 100644
--- a/ForgeTracker/forgetracker/widgets/ticket_form.py
+++ b/ForgeTracker/forgetracker/widgets/ticket_form.py
@@ -37,13 +37,7 @@ class GenericTicketForm(ew.SimpleForm):
def display_field_by_name(self, idx, ignore_errors=False):
field = self.fields[idx]
ctx = self.context_for(field)
- if idx == '_milestone':
- milestone_value = ctx.value
- for milestone in reversed(field.options): # reverse so del hits the correct indexes
- if milestone.complete and (milestone.py_value != milestone_value):
- del field.options[field.options.index(milestone)]
- ctx = self.context_for(field)
- elif idx == 'assigned_to':
+ if idx == 'assigned_to':
self._add_current_value_to_user_field(field, ctx.get('value'))
elif idx == 'custom_fields':
for cf in c.app.globals.custom_fields:
@@ -154,7 +148,7 @@ class TicketCustomField(object):
py_value=m.name,
complete=bool(m.complete)))
- ssf = ew.SingleSelectField(
+ ssf = MilestoneField(
label=field.label, name=str(field.name),
options=options)
return ssf
@@ -183,3 +177,11 @@ class TicketCustomField(object):
def make(cls, field):
factory = cls.SELECTOR.get(field.get('type'), cls._default)
return factory(field)
+
+class MilestoneField(ew.SingleSelectField):
+ def display(self, *args, **kwargs):
+ milestone_value = kwargs['value']
+ for milestone in reversed(self.options): # reverse so del hits the correct indexes
+ if milestone.complete and (milestone.py_value != milestone_value):
+ del self.options[self.options.index(milestone)]
+ return super(MilestoneField, self).display(*args, **kwargs)
[42/46] git commit: [#4329] Denote whether refresh is for a new
clone/fork
Posted by jo...@apache.org.
[#4329] Denote whether refresh is for a new clone/fork
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/1d70c920
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1d70c920
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1d70c920
Branch: refs/heads/cj/5879
Commit: 1d70c9200541727aadb32c16bc0955f36d30c286
Parents: c06eeda
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Tue Apr 2 15:34:08 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 16:24:06 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo_refresh.py | 4 ++--
Allura/allura/model/repository.py | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1d70c920/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index d42def3..f15ec81 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -23,7 +23,7 @@ log = logging.getLogger(__name__)
QSIZE=100
-def refresh_repo(repo, all_commits=False, notify=True):
+def refresh_repo(repo, all_commits=False, notify=True, new_clone=False):
all_commit_ids = commit_ids = list(repo.all_commit_ids())
if not commit_ids:
# the repo is empty, no need to continue
@@ -113,7 +113,7 @@ def refresh_repo(repo, all_commits=False, notify=True):
log.info('Refresh complete for %s', repo.full_fs_path)
- g.post_event('repo_refreshed', len(commit_ids), all_commits)
+ g.post_event('repo_refreshed', len(commit_ids), all_commits, new_clone)
# Send notifications
if notify:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1d70c920/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 6ca3a31..9019375 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -314,7 +314,7 @@ class Repository(Artifact, ActivityObject):
self._impl.clone_from(source)
log.info('... %r cloned', self)
g.post_event('repo_cloned', source_url, source_path)
- self.refresh(notify=False)
+ self.refresh(notify=False, new_clone=True)
def log(self, branch='master', offset=0, limit=10):
return list(self._log(branch, offset, limit))
@@ -483,7 +483,7 @@ class Repository(Artifact, ActivityObject):
def unknown_commit_ids(self):
return unknown_commit_ids_repo(self.all_commit_ids())
- def refresh(self, all_commits=False, notify=True):
+ def refresh(self, all_commits=False, notify=True, new_clone=False):
'''Find any new commits in the repository and update'''
try:
log.info('... %r analyzing', self)
@@ -491,7 +491,7 @@ class Repository(Artifact, ActivityObject):
session(self).flush(self)
self._impl.refresh_heads()
if asbool(tg.config.get('scm.new_refresh')):
- refresh_repo(self, all_commits, notify)
+ 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:
[06/46] git commit: Check if the document to import has trackers or
is just a list of tickets
Posted by jo...@apache.org.
Check if the document to import has trackers or is just a list of
tickets
When exporting with trac_export.py the tickets are the top level list of
objects in the JSON dump.
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5a3ff203
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5a3ff203
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5a3ff203
Branch: refs/heads/cj/5879
Commit: 5a3ff203beeab56516d812886a74a3a8a61893d4
Parents: 5c07930
Author: Jon Schewe <jp...@mtu.net>
Authored: Tue Mar 26 18:30:15 2013 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Mar 28 20:42:12 2013 +0000
----------------------------------------------------------------------
scripts/allura_import.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5a3ff203/scripts/allura_import.py
----------------------------------------------------------------------
diff --git a/scripts/allura_import.py b/scripts/allura_import.py
index 1dd151c..e6982b2 100644
--- a/scripts/allura_import.py
+++ b/scripts/allura_import.py
@@ -66,8 +66,13 @@ def import_tracker(cli, project, tool, import_options, options, doc_txt, validat
existing_map[t['ticket_num']] = t['summary']
doc = json.loads(doc_txt)
- tickets_in = doc['trackers']['default']['artifacts']
- doc['trackers']['default']['artifacts'] = []
+
+ if 'trackers' in doc and 'default' in doc['trackers'] and 'artifacts' in doc['trackers']['default']:
+ tickets_in = doc['trackers']['default']['artifacts']
+ doc['trackers']['default']['artifacts'] = []
+ else:
+ tickets_in = doc
+
if options.verbose:
print "Processing %d tickets" % len(tickets_in)
[16/46] git commit: [#5963] New version of ForgeHg with code snapshot
changes
Posted by jo...@apache.org.
[#5963] New version of ForgeHg with code snapshot changes
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/39079c52
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/39079c52
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/39079c52
Branch: refs/heads/cj/5879
Commit: 39079c52c9adf53468ee67d517d6b45f1e657e25
Parents: 07861f4
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Mon Apr 1 14:28:55 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Mon Apr 1 14:28:55 2013 +0000
----------------------------------------------------------------------
requirements-sf.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/39079c52/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 893708d..7b66bc3 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.4
+ForgeHg==0.1.5
ForgePastebin==0.2.6
mechanize==0.2.4
MySQL-python==1.2.3c1
[14/46] git commit: [#5963] Minor fixups to code-snapshots
Posted by jo...@apache.org.
[#5963] Minor fixups to code-snapshots
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/07861f4a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/07861f4a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/07861f4a
Branch: refs/heads/cj/5879
Commit: 07861f4a485fa8c4fd199e8932f25defc7bb218e
Parents: 5105ac3
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Fri Mar 29 15:15:42 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Fri Mar 29 18:18:41 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 6 ++--
ForgeGit/forgegit/model/git_repo.py | 10 +++++--
ForgeGit/forgegit/tests/model/test_repository.py | 2 +-
ForgeSVN/forgesvn/model/svn.py | 22 ++++++++++-------
4 files changed, 24 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/07861f4a/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index aed4363..6ca3a31 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -240,8 +240,8 @@ class Repository(Artifact, ActivityObject):
self.name)
def tarball_filename(self, revision):
- shortname = c.app.repo.project.shortname.replace('/', '-')
- mount_point = c.app.repo.app.config.options.mount_point
+ shortname = c.project.shortname.replace('/', '-')
+ mount_point = c.app.config.options.mount_point
filename = '%s-%s-%s' % (shortname, mount_point, revision)
return filename
@@ -262,7 +262,7 @@ class Repository(Artifact, ActivityObject):
if os.path.isfile(filename):
return 'ready'
- elif os.path.isfile(tmpfilename) or os.path.isdir(pathname):
+ elif os.path.isfile(tmpfilename):
return 'busy'
def __repr__(self): # pragma no cover
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/07861f4a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 27fc8e4..d7c9d49 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -329,9 +329,13 @@ class GitImplementation(M.RepositoryImplementation):
archive_name = self._repo.tarball_filename(commit)
filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tar.gz'))
tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
- with gzip.open(tmpfilename, 'w') as fp:
- self._git.archive(fp, format='tar', treeish=commit, prefix=archive_name + '/')
- os.rename(tmpfilename, filename)
+ try:
+ with gzip.open(tmpfilename, 'w') as fp:
+ self._git.archive(fp, format='tar', treeish=commit, prefix=archive_name + '/')
+ os.rename(tmpfilename, filename)
+ finally:
+ if os.path.exists(tmpfilename):
+ os.remove(tmpfilename)
class _OpenedGitBlob(object):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/07861f4a/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 59416c8..fbcfaa0 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -277,7 +277,7 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
os.remove("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tmp")
assert_equal(self.repo.get_tarball_status('HEAD'), None)
os.makedirs("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD")
- assert_equal(self.repo.get_tarball_status('HEAD'), 'busy')
+ assert_equal(self.repo.get_tarball_status('HEAD'), None)
class TestGitCommit(unittest.TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/07861f4a/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 902c829..171c709 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -614,18 +614,22 @@ class SVNImplementation(M.RepositoryImplementation):
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
path = os.path.join(self._repo.tarball_path, commit)
- if os.path.exists(path):
- rmtree(path)
- self._svn.export(self._url,
- path,
- revision=pysvn.Revision(pysvn.opt_revision_kind.number, commit))
archive_name = self._repo.tarball_filename(commit)
filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tar.gz'))
tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
- with tarfile.open(tmpfilename, "w:gz") as tar:
- tar.add(path, arcname=archive_name)
- rmtree(path)
- os.rename(tmpfilename, filename)
+ if os.path.exists(path):
+ rmtree(path)
+ try:
+ self._svn.export(self._url,
+ path,
+ revision=pysvn.Revision(pysvn.opt_revision_kind.number, commit))
+ with tarfile.open(tmpfilename, "w:gz") as tar:
+ tar.add(path, arcname=archive_name)
+ os.rename(tmpfilename, filename)
+ finally:
+ rmtree(path)
+ if os.path.exists(tmpfilename):
+ os.remove(tmpfilename)
Mapper.compile_all()
[04/46] git commit: [#5932] Fixed Invalid field error for removed
_milestone_counts fields
Posted by jo...@apache.org.
[#5932] Fixed Invalid field error for removed _milestone_counts fields
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/cbbd95ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cbbd95ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cbbd95ee
Branch: refs/heads/cj/5879
Commit: cbbd95eea81483cfd72a36072a56d38ea5f3b280
Parents: b5bc185
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Mar 27 20:11:49 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 28 20:06:33 2013 +0000
----------------------------------------------------------------------
ForgeTracker/forgetracker/model/ticket.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cbbd95ee/ForgeTracker/forgetracker/model/ticket.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/model/ticket.py b/ForgeTracker/forgetracker/model/ticket.py
index 1abeaac..686fd7d 100644
--- a/ForgeTracker/forgetracker/model/ticket.py
+++ b/ForgeTracker/forgetracker/model/ticket.py
@@ -53,6 +53,8 @@ class Globals(MappedClass):
_bin_counts_data = FieldProperty([dict(summary=str, hits=int)])
_bin_counts_expire = FieldProperty(datetime)
_bin_counts_invalidated = FieldProperty(datetime)
+ _milestone_counts = FieldProperty(schema.Deprecated) #[dict(name=str,hits=int,closed=int)])
+ _milestone_counts_expire = FieldProperty(schema.Deprecated) #datetime)
show_in_search = FieldProperty({str: bool}, if_missing={'ticket_num': True,
'summary': True,
'_milestone': True,
[38/46] git commit: Don't run tests twice on 42cc buildbot
Posted by jo...@apache.org.
Don't run tests twice on 42cc buildbot
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c0f67e31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c0f67e31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c0f67e31
Branch: refs/heads/cj/5879
Commit: c0f67e3184b1a1d299b794e2bdecd2a2aa9a26e5
Parents: e9ad55a
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Apr 3 12:55:43 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 14:49:42 2013 +0000
----------------------------------------------------------------------
Makefile | 8 ++++++++
Makefile.def.buildbot | 9 +--------
2 files changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0f67e31/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index dfe1ea4..12c9048 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,14 @@ PID_PATH?=.
# Targets
test:
+ifdef BB
+# running on buildbot (Makefile.def.buildbot sets BB to 1)
+# rebuild apps
+ ./rebuild-all.bash
+# setup pysvn
+ -[ ! -f $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn ] && ln -s /usr/lib64/python2.7/site-packages/pysvn $(VIRTUAL_ENV)/lib/python2.7/site-packages/
+ -[ ! -d $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info ] && mkdir $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info
+endif
ALLURA_VALIDATION=none ./run_tests
./run_clonedigger
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0f67e31/Makefile.def.buildbot
----------------------------------------------------------------------
diff --git a/Makefile.def.buildbot b/Makefile.def.buildbot
index f88ae0e..82179d7 100644
--- a/Makefile.def.buildbot
+++ b/Makefile.def.buildbot
@@ -1,8 +1 @@
-test: buildbot_test
-
-buildbot_test:
- ./rebuild-all.bash
- -[ ! -f $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn ] && ln -s /usr/lib64/python2.7/site-packages/pysvn $(VIRTUAL_ENV)/lib/python2.7/site-packages/
- -[ ! -d $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info ] && mkdir $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info
- ALLURA_VALIDATION=none ./run_tests
- ./run_clonedigger
+BB=1
[23/46] git commit: [#5973] rename rebuild.bash to rebuild-all.bash
with more helpfulness
Posted by jo...@apache.org.
[#5973] rename rebuild.bash to rebuild-all.bash with more helpfulness
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d4a0cfdc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d4a0cfdc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d4a0cfdc
Branch: refs/heads/cj/5879
Commit: d4a0cfdc00f31c4a682a423d58043d42ff1c1696
Parents: a86b081
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 10:39:02 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
Makefile.def.buildbot | 4 ++--
rebuild-all.bash | 9 +++++++++
rebuild.bash | 8 --------
update.sh | 4 ++--
vagrant/allura_setup.sh | 2 +-
5 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d4a0cfdc/Makefile.def.buildbot
----------------------------------------------------------------------
diff --git a/Makefile.def.buildbot b/Makefile.def.buildbot
index 838af38..93aff55 100644
--- a/Makefile.def.buildbot
+++ b/Makefile.def.buildbot
@@ -1,7 +1,7 @@
test: buildbot_test
buildbot_test:
- ./rebuild.bash
+ ./rebuild-all.bash
-[ ! -f $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn ] && ln -s /usr/lib64/python2.7/site-packages/pysvn $(VIRTUAL_ENV)/lib/python2.7/site-packages/
ALLURA_VALIDATION=none ./run_tests
- ./run_clonedigger
\ No newline at end of file
+ ./run_clonedigger
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d4a0cfdc/rebuild-all.bash
----------------------------------------------------------------------
diff --git a/rebuild-all.bash b/rebuild-all.bash
new file mode 100755
index 0000000..61b02c6
--- /dev/null
+++ b/rebuild-all.bash
@@ -0,0 +1,9 @@
+#!/bin/bash
+for APP in Allura* *Forge* NoWarnings
+do
+ echo "# setting up $APP dependencies"
+ pushd $APP > /dev/null
+ python setup.py -q develop || echo " # Error setting up $APP
+ # You may want to run 'pip uninstall $APP' to un-register it so you don't get further errors."
+ popd > /dev/null
+done
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d4a0cfdc/rebuild.bash
----------------------------------------------------------------------
diff --git a/rebuild.bash b/rebuild.bash
deleted file mode 100755
index f1d80a1..0000000
--- a/rebuild.bash
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-for APP in Allura* *Forge* NoWarnings
-do
- echo "# setting up $APP dependencies"
- pushd $APP > /dev/null
- python setup.py -q develop || exit
- popd > /dev/null
-done
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d4a0cfdc/update.sh
----------------------------------------------------------------------
diff --git a/update.sh b/update.sh
index 0aa3016..ca5efab 100755
--- a/update.sh
+++ b/update.sh
@@ -17,6 +17,6 @@ if [ "$?" -gt 0 ]; then
exit;
fi
-./rebuild.bash
+./rebuild-all.bash
-echo 'If you have taskd or the web server running, you should restart them now.'
\ No newline at end of file
+echo 'If you have taskd or the web server running, you should restart them now.'
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d4a0cfdc/vagrant/allura_setup.sh
----------------------------------------------------------------------
diff --git a/vagrant/allura_setup.sh b/vagrant/allura_setup.sh
index cf93e5d..16d77ce 100755
--- a/vagrant/allura_setup.sh
+++ b/vagrant/allura_setup.sh
@@ -39,7 +39,7 @@ fi
# Setup Allura python packages
cd /home/vagrant/src/forge
-sudo -u vagrant bash -c '. /home/vagrant/anvil/bin/activate; ./rebuild.bash'
+sudo -u vagrant bash -c '. /home/vagrant/anvil/bin/activate; ./rebuild-all.bash'
echo "Purging unneeded packages..."
aptitude clean
[35/46] git commit: [#5973] simple pysvn import check
Posted by jo...@apache.org.
[#5973] simple pysvn import 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/3a3e769b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3a3e769b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3a3e769b
Branch: refs/heads/cj/5879
Commit: 3a3e769b2fc82ac9950ac8cced1239b976d6a4d5
Parents: 2400a31
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Apr 3 09:55:33 2013 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 09:55:33 2013 -0400
----------------------------------------------------------------------
ForgeSVN/setup.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3a3e769b/ForgeSVN/setup.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/setup.py b/ForgeSVN/setup.py
index fba4631..cb36ced 100644
--- a/ForgeSVN/setup.py
+++ b/ForgeSVN/setup.py
@@ -3,6 +3,15 @@ import sys, os
from forgesvn.version import __version__
+# "install_requires" can't be safely used with pysvn since pysvn is packaged
+# strangely and is not always known to packaging tools (setup.py, pip) even
+# when it is installed and can be imported and used
+try:
+ import pysvn
+except ImportError:
+ print '\npysvn must be installed for ForgeSVN to work\n'
+ raise
+
setup(name='ForgeSVN',
version=__version__,
description="",
[30/46] git commit: [#5973] mention port forwarding
Posted by jo...@apache.org.
[#5973] mention port forwarding
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/65932e37
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/65932e37
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/65932e37
Branch: refs/heads/cj/5879
Commit: 65932e37d4787e030a916819675a6953f223ad1c
Parents: 1baf650
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Mar 19 11:31:55 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
README.markdown | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/65932e37/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 248b8a7..bbd03cb 100644
--- a/README.markdown
+++ b/README.markdown
@@ -112,7 +112,9 @@ This shouldn't take too long, but it will start the taskd server doing tons of s
## Next Steps
-Go to the server running on your [local machine](http://localhost:8080/) port 8080.
+Go to the Allura webapp running on your [local machine](http://localhost:8080/) port 8080.
+(If you're running this inside a VM, you'll probably have to configure the port forwarding settings)
+
You can log in with username admin1, test-user or root. They all have password "foo". (For more details
on the default data, see bootstrap.py)
[09/46] git commit: [#5978] Fixed guess_repo being called for
rendering SCM trees
Posted by jo...@apache.org.
[#5978] Fixed guess_repo being called for rendering SCM trees
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/789d7b84
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/789d7b84
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/789d7b84
Branch: refs/heads/cj/5879
Commit: 789d7b84c8ab02cc8616141d3fb2cc0e35520907
Parents: 699e9b8
Author: Cory Johns <jo...@geek.net>
Authored: Tue Mar 26 22:38:56 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Mar 29 14:30:14 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/789d7b84/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 3df5f59..40f4567 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -532,6 +532,8 @@ class Tree(RepoObject):
return []
commit_ids = [e.commit_id for e in lcd.entries]
commits = Commit.query.find(dict(_id={'$in': commit_ids}))
+ for commit in commits:
+ commit.set_context(self.repo)
commit_infos = {c._id: c.info for c in commits}
by_name = lambda n: n.name
tree_names = sorted([n.name for n in self.tree_ids])
[05/46] git commit: Create a new JSON object for the ticket to import
Posted by jo...@apache.org.
Create a new JSON object for the ticket to import
If the imported JSON object doesn't have the correct structure we need
to create it.
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e8161e69
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e8161e69
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e8161e69
Branch: refs/heads/cj/5879
Commit: e8161e69c103daed29313d626cb358c3423e46ed
Parents: 5a3ff20
Author: Jon Schewe <jp...@mtu.net>
Authored: Tue Mar 26 18:32:18 2013 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Mar 28 20:42:12 2013 +0000
----------------------------------------------------------------------
scripts/allura_import.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e8161e69/scripts/allura_import.py
----------------------------------------------------------------------
diff --git a/scripts/allura_import.py b/scripts/allura_import.py
index e6982b2..60858ea 100644
--- a/scripts/allura_import.py
+++ b/scripts/allura_import.py
@@ -81,8 +81,11 @@ def import_tracker(cli, project, tool, import_options, options, doc_txt, validat
if options.verbose:
print 'Ticket id %d already exists, skipping' % ticket_in['id']
continue
- doc['trackers']['default']['artifacts'] = [ticket_in]
- res = cli.call(url, doc=json.dumps(doc), options=json.dumps(import_options))
+ doc_import={}
+ doc_import['trackers'] = {}
+ doc_import['trackers']['default'] = {}
+ doc_import['trackers']['default']['artifacts'] = [ticket_in]
+ res = cli.call(url, doc=json.dumps(doc_import), options=json.dumps(import_options))
assert res['status'] and not res['errors']
if options.validate:
if res['warnings']:
[15/46] git commit: [#5963] ticket:305 Code snapshot status check
changes
Posted by jo...@apache.org.
[#5963] ticket:305 Code snapshot status check changes
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5105ac33
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5105ac33
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5105ac33
Branch: refs/heads/cj/5879
Commit: 5105ac3318739d1f3b5664204918aa6ba94013ea
Parents: 9110fed
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Fri Mar 22 13:49:08 2013 +0400
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Fri Mar 29 18:18:41 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 28 +++++++-------
Allura/allura/tasks/repo_tasks.py | 3 --
Allura/allura/templates/repo/tarball.html | 9 ++++-
Allura/allura/tests/test_tasks.py | 6 ---
ForgeGit/forgegit/model/git_repo.py | 13 ++++---
.../forgegit/tests/functional/test_controllers.py | 7 ----
ForgeGit/forgegit/tests/model/test_repository.py | 19 ++++++++++
ForgeSVN/forgesvn/model/svn.py | 10 +++---
8 files changed, 52 insertions(+), 43 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index d6f843d..aed4363 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -208,7 +208,6 @@ class Repository(Artifact, ActivityObject):
branches = FieldProperty([dict(name=str,object_id=str, count=int)])
repo_tags = FieldProperty([dict(name=str,object_id=str, count=int)])
upstream_repo = FieldProperty(dict(name=str,url=str))
- tarball_status = FieldProperty([dict(revision=str, status=str)])
def __init__(self, **kw):
if 'name' in kw and 'tool' in kw:
@@ -240,10 +239,14 @@ class Repository(Artifact, ActivityObject):
self.project.shortname,
self.name)
- def tarball_url(self, revision):
+ def tarball_filename(self, revision):
shortname = c.app.repo.project.shortname.replace('/', '-')
mount_point = c.app.repo.app.config.options.mount_point
- filename = '%s-%s-%s.tar.gz' % (shortname, mount_point, revision)
+ filename = '%s-%s-%s' % (shortname, mount_point, revision)
+ return filename
+
+ def tarball_url(self, revision):
+ filename = '%s%s' % (self.tarball_filename(revision), '.tar.gz')
r = os.path.join(self.tool,
self.project.shortname[:1],
self.project.shortname[:2],
@@ -253,17 +256,14 @@ class Repository(Artifact, ActivityObject):
return urljoin(tg.config.get('scm.repos.tarball.url_prefix', '/'), r)
def get_tarball_status(self, revision):
- tarballs = dict((t.revision, t.status) for t in self.tarball_status)
- return tarballs.get(revision)
-
- def set_tarball_status(self, revision, status):
- for tarball in self.tarball_status:
- if tarball['revision'] == revision:
- tarball['status'] = status
- session(self).flush(self)
- return
- self.tarball_status.append(dict(revision=revision, status=status))
- session(self).flush(self)
+ pathname = os.path.join(self.tarball_path, self.tarball_filename(revision))
+ filename = '%s%s' % (pathname, '.tar.gz')
+ tmpfilename = '%s%s' % (pathname, '.tmp')
+
+ if os.path.isfile(filename):
+ return 'ready'
+ elif os.path.isfile(tmpfilename) or os.path.isdir(pathname):
+ return 'busy'
def __repr__(self): # pragma no cover
return '<%s %s>' % (
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 4eff18d..03ce1f2 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -108,12 +108,9 @@ def tarball(revision=None):
log = logging.getLogger(__name__)
if revision:
repo = c.app.repo
- repo.set_tarball_status(revision, 'busy')
try:
repo.tarball(revision)
- repo.set_tarball_status(revision, 'ready')
except:
- repo.set_tarball_status(revision, None)
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:
log.warn('Creation of tarball for %s:%s skipped because revision is not specified' % (c.project.shortname, c.app.config.options.mount_point))
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index c312d8b..c5e071d 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -34,20 +34,25 @@ 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
// Check tarball status every 5 seconds
function check_status() {
$.get('{{commit.url()}}tarball_status', function(data) {
if (data.status === 'ready') {
- window.clearInterval(status_checker);
spinner.stop();
$('#snapshot_status h2').toggle();
{% if 'no-redirect' not in request.params %}
window.location.href = '{{c.app.repo.tarball_url(revision)}}';
{% endif %}
+ } else {
+ if (delay < 600000){
+ delay = delay * 2
+ }
+ window.setTimeout(check_status, delay);
}
});
}
- var status_checker = window.setInterval(check_status, 5000);
+ window.setTimeout(check_status, delay);
{% endif %}
});
</script>
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/Allura/allura/tests/test_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_tasks.py b/Allura/allura/tests/test_tasks.py
index 9e16bfb..74a09d0 100644
--- a/Allura/allura/tests/test_tasks.py
+++ b/Allura/allura/tests/test_tasks.py
@@ -38,12 +38,6 @@ class TestRepoTasks(unittest.TestCase):
assert_equal(post_event.call_args[0][2], None)
# ignore args[3] which is a traceback string
- @mock.patch('allura.tasks.repo_tasks.c.app.repo.set_tarball_status')
- def test_repo_tarball(self,st):
- repo_tasks.tarball('HEAD')
- calls = [mock.call('HEAD', 'busy'), mock.call('HEAD', 'ready')]
- st.assert_has_calls(calls, any_order=True)
-
class TestEventTasks(unittest.TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index c660d69..27fc8e4 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -324,14 +324,15 @@ class GitImplementation(M.RepositoryImplementation):
return tree._id
def tarball(self, commit):
- shortname = self._repo.project.shortname.replace('/', '-')
- mount_point = self._repo.app.config.options.mount_point
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
- archive_name = '%s-%s-%s' % (shortname, mount_point, commit)
- filename = os.path.join(self._repo.tarball_path, archive_name + '.tar.gz')
- with gzip.open(filename, 'w') as fp:
- self._git.archive(fp, format='tar', treeish=commit, prefix=archive_name+'/')
+ archive_name = self._repo.tarball_filename(commit)
+ filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tar.gz'))
+ tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
+ with gzip.open(tmpfilename, 'w') as fp:
+ self._git.archive(fp, format='tar', treeish=commit, prefix=archive_name + '/')
+ os.rename(tmpfilename, filename)
+
class _OpenedGitBlob(object):
CHUNK_SIZE=4096
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/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 84b0133..1c8e0df 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -290,13 +290,6 @@ class TestRootController(_TestCase):
r = self.app.get(ci + 'tarball_status')
assert '{"status": "ready"}' in r
- def test_tarball_status(self):
- assert_equal(c.app.repo.get_tarball_status('1e146e67985dcd71c74de79613719bef7bddca4a'), None)
- c.app.repo.set_tarball_status('1e146e67985dcd71c74de79613719bef7bddca4a', 'ready')
- c.app.repo.set_tarball_status('df30427c488aeab84b2352bdf88a3b19223f9d7a', 'busy')
- assert_equal(c.app.repo.get_tarball_status('1e146e67985dcd71c74de79613719bef7bddca4a'), 'ready')
- assert_equal(c.app.repo.get_tarball_status('df30427c488aeab84b2352bdf88a3b19223f9d7a'), 'busy')
-
class TestRestController(_TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/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 6258251..59416c8 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -240,6 +240,8 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
self.assertEqual(new_tree.other_ids, orig_tree.other_ids)
def test_tarball(self):
+ if os.path.isfile("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz"):
+ os.remove("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz")
assert_equal(self.repo.tarball_path, '/tmp/tarball/git/t/te/test/testgit.git')
assert_equal(self.repo.tarball_url('HEAD'), 'file:///git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz')
self.repo.tarball('HEAD')
@@ -260,6 +262,23 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
'summary': u'Change README'},
'name': u'README'}])
+ def test_tarball_status(self):
+ if os.path.isfile("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz"):
+ os.remove("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz")
+ if os.path.isfile("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tmp"):
+ os.remove("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tmp")
+ if os.path.isdir("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD/"):
+ os.removedirs("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD/")
+ self.repo.tarball('HEAD')
+ assert_equal(self.repo.get_tarball_status('HEAD'), 'ready')
+ os.rename("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz",
+ "/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tmp")
+ assert_equal(self.repo.get_tarball_status('HEAD'), 'busy')
+ os.remove("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tmp")
+ assert_equal(self.repo.get_tarball_status('HEAD'), None)
+ os.makedirs("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD")
+ assert_equal(self.repo.get_tarball_status('HEAD'), 'busy')
+
class TestGitCommit(unittest.TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5105ac33/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 7c7515a..902c829 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -611,8 +611,6 @@ class SVNImplementation(M.RepositoryImplementation):
return entries
def tarball(self, commit):
- shortname = self._repo.project.shortname.replace('/', '-')
- mount_point = self._repo.app.config.options.mount_point
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
path = os.path.join(self._repo.tarball_path, commit)
@@ -621,11 +619,13 @@ class SVNImplementation(M.RepositoryImplementation):
self._svn.export(self._url,
path,
revision=pysvn.Revision(pysvn.opt_revision_kind.number, commit))
- archive_name = '%s-%s-%s' % (shortname, mount_point, commit)
- filename = os.path.join(self._repo.tarball_path, archive_name + '.tar.gz')
- with tarfile.open(filename, "w:gz") as tar:
+ archive_name = self._repo.tarball_filename(commit)
+ filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tar.gz'))
+ tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
+ with tarfile.open(tmpfilename, "w:gz") as tar:
tar.add(path, arcname=archive_name)
rmtree(path)
+ os.rename(tmpfilename, filename)
Mapper.compile_all()
[26/46] git commit: [#5973] update repo location
Posted by jo...@apache.org.
[#5973] update repo location
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/556feffa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/556feffa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/556feffa
Branch: refs/heads/cj/5879
Commit: 556feffa63c2b60af9c0001a7f0cfcf2a7f2c40b
Parents: d94f287
Author: Dave Brondsema <db...@geek.net>
Authored: Mon Mar 18 13:26:31 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
CONTRIBUTING | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/556feffa/CONTRIBUTING
----------------------------------------------------------------------
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 3203c5d..5f00209 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -64,7 +64,7 @@ possible or applicable:
The code is self-hosted in a public git repository. Get it by cloning:
- git clone git://git.code.sf.net/p/allura/git.git allura
+ git clone https://git-wip-us.apache.org/repos/asf/incubator-allura.git allura
You can also 'fork' our repo at <https://sourceforge.net/p/allura/git/>.
[20/46] git commit: [#5973] preserve deterministic order in diff
lists, so tests always pass
Posted by jo...@apache.org.
[#5973] preserve deterministic order in diff lists, so tests always pass
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6127cf7a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6127cf7a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6127cf7a
Branch: refs/heads/cj/5879
Commit: 6127cf7ac716ade1c5f0aa6d5b78b49b4a04dc80
Parents: dcf934e
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Mar 19 18:08:16 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo_refresh.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6127cf7a/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 2e176af..ca0c43b 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -1,8 +1,7 @@
import logging
from itertools import chain
from cPickle import dumps
-import re
-import os
+from collections import OrderedDict
import bson
@@ -423,8 +422,8 @@ def _diff_trees(lhs, rhs, index, *path):
def _fq(name):
return '/'.join(reversed(
(name,) + path))
- # Diff the trees
- rhs_tree_ids = dict(
+ # Diff the trees (and keep deterministic order)
+ rhs_tree_ids = OrderedDict(
(o.name, o.id)
for o in rhs.tree_ids)
for o in lhs.tree_ids:
@@ -443,8 +442,8 @@ def _diff_trees(lhs, rhs, index, *path):
lhs_tree = Object(_id=None, tree_ids=[], blob_ids=[], other_ids=[])
for difference in _diff_trees(lhs_tree, index[id], index, name, *path):
yield difference
- # DIff the blobs
- rhs_blob_ids = dict(
+ # Diff the blobs (and keep deterministic order)
+ rhs_blob_ids = OrderedDict(
(o.name, o.id)
for o in rhs.blob_ids)
for o in lhs.blob_ids:
[13/46] git commit: [#5978] Fixed empty LCD info from double
iteration of result set
Posted by jo...@apache.org.
[#5978] Fixed empty LCD info from double iteration of result set
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/9110fed6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9110fed6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9110fed6
Branch: refs/heads/cj/5879
Commit: 9110fed627d5f6fdc7ccebbcea60ec848a43eb0f
Parents: 53635e7
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Fri Mar 29 16:54:53 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Fri Mar 29 17:14:55 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo.py | 2 +-
ForgeGit/forgegit/tests/model/test_repository.py | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9110fed6/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 85fa875..4d396b8 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -533,7 +533,7 @@ class Tree(RepoObject):
if lcd is None:
return []
commit_ids = [e.commit_id for e in lcd.entries]
- commits = Commit.query.find(dict(_id={'$in': commit_ids}))
+ commits = list(Commit.query.find(dict(_id={'$in': commit_ids})))
for commit in commits:
commit.set_context(self.repo)
commit_infos = {c._id: c.info for c in commits}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9110fed6/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 4e1d417..6258251 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -2,6 +2,7 @@ import os
import shutil
import unittest
import pkg_resources
+import datetime
import mock
from pylons import tmpl_context as c, app_globals as g
@@ -244,6 +245,21 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
self.repo.tarball('HEAD')
assert os.path.isfile("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz")
+ def test_ls(self):
+ lcd_map = self.repo.commit('HEAD').tree.ls()
+ self.assertEqual(lcd_map, [{
+ 'href': u'README',
+ 'kind': 'BLOB',
+ 'last_commit': {
+ 'author': u'Rick Copeland',
+ 'author_email': u'rcopeland@geek.net',
+ 'author_url': None,
+ 'date': datetime.datetime(2010, 10, 7, 18, 44, 11),
+ 'href': u'/p/test/src-git/ci/1e146e67985dcd71c74de79613719bef7bddca4a/',
+ 'shortlink': u'[1e146e]',
+ 'summary': u'Change README'},
+ 'name': u'README'}])
+
class TestGitCommit(unittest.TestCase):
[44/46] git commit: [#5879] Fixed ordering of all_commit_ids for
ForgeGit to ensure repo root always comes last
Posted by jo...@apache.org.
[#5879] Fixed ordering of all_commit_ids for ForgeGit to ensure repo root always comes last
The performance of refresh_last_commits depends on the repo root being
processed first and the commits following in roughly story (a.k.a.
topological) order. If the commits are processed out of order, it has
to walk back up the tree a *lot* more to reconstruct last-commit data
that it otherwise gets for "free" (having already computed it).
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/db0d23fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/db0d23fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/db0d23fc
Branch: refs/heads/cj/5879
Commit: db0d23fc0662641ab63147cf9e40619a74894410
Parents: c736689
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Mar 28 19:09:46 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Apr 3 17:26:02 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 9 ++++-----
.../5c/47243c8e424136fd5cdd18cd94d34c66d1955c | 3 +++
.../5c/891311e2b402f3f86eabf1688b5496183d9f94 | Bin 0 -> 24 bytes
.../b1/42cbffd81acd7c57b47bf64fbb9e0920d82c55 | Bin 0 -> 78 bytes
.../forgegit/tests/data/testgit.git/refs/heads/zz | 1 +
ForgeGit/forgegit/tests/model/test_repository.py | 11 +++++++++++
6 files changed, 19 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db0d23fc/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index d7c9d49..299ddb2 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -162,11 +162,10 @@ class GitImplementation(M.RepositoryImplementation):
ending with the root (first commit).
"""
seen = set()
- for head in self._git.heads:
- for ci in self._git.iter_commits(head, topo_order=True):
- if ci.binsha in seen: continue
- seen.add(ci.binsha)
- yield ci.hexsha
+ for ci in self._git.iter_commits(all=True, topo_order=True):
+ if ci.binsha in seen: continue
+ seen.add(ci.binsha)
+ yield ci.hexsha
def new_commits(self, all_commits=False):
graph = {}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db0d23fc/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/47243c8e424136fd5cdd18cd94d34c66d1955c
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/47243c8e424136fd5cdd18cd94d34c66d1955c b/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/47243c8e424136fd5cdd18cd94d34c66d1955c
new file mode 100644
index 0000000..18fe11f
--- /dev/null
+++ b/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/47243c8e424136fd5cdd18cd94d34c66d1955c
@@ -0,0 +1,3 @@
+x��M
+�0�]���i�Ӏ��΅wHf&�b:%�oo��o�����PJ��;��I�S�4����d|���w��h��Z���K��8v>����Fo�}pz�:$�>a4Q�w���M��2-��������D�
+�O(�zp�7Z�n���~������W�*��"�L�
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db0d23fc/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/891311e2b402f3f86eabf1688b5496183d9f94
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/891311e2b402f3f86eabf1688b5496183d9f94 b/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/891311e2b402f3f86eabf1688b5496183d9f94
new file mode 100644
index 0000000..5337266
Binary files /dev/null and b/ForgeGit/forgegit/tests/data/testgit.git/objects/5c/891311e2b402f3f86eabf1688b5496183d9f94 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db0d23fc/ForgeGit/forgegit/tests/data/testgit.git/objects/b1/42cbffd81acd7c57b47bf64fbb9e0920d82c55
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testgit.git/objects/b1/42cbffd81acd7c57b47bf64fbb9e0920d82c55 b/ForgeGit/forgegit/tests/data/testgit.git/objects/b1/42cbffd81acd7c57b47bf64fbb9e0920d82c55
new file mode 100644
index 0000000..0e707ac
Binary files /dev/null and b/ForgeGit/forgegit/tests/data/testgit.git/objects/b1/42cbffd81acd7c57b47bf64fbb9e0920d82c55 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db0d23fc/ForgeGit/forgegit/tests/data/testgit.git/refs/heads/zz
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testgit.git/refs/heads/zz b/ForgeGit/forgegit/tests/data/testgit.git/refs/heads/zz
new file mode 100644
index 0000000..68c205a
--- /dev/null
+++ b/ForgeGit/forgegit/tests/data/testgit.git/refs/heads/zz
@@ -0,0 +1 @@
+5c47243c8e424136fd5cdd18cd94d34c66d1955c
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/db0d23fc/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 fbcfaa0..1102ee8 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -247,6 +247,17 @@ class TestGitRepo(unittest.TestCase, RepoImplTestBase):
self.repo.tarball('HEAD')
assert os.path.isfile("/tmp/tarball/git/t/te/test/testgit.git/test-src-git-HEAD.tar.gz")
+ def test_all_commit_ids(self):
+ cids = list(self.repo.all_commit_ids())
+ heads = [
+ '1e146e67985dcd71c74de79613719bef7bddca4a', # master
+ '5c47243c8e424136fd5cdd18cd94d34c66d1955c', # zz
+ ]
+ self.assertIn(cids[0], heads) # repo head comes first
+ for head in heads:
+ self.assertIn(head, cids) # all branches included
+ self.assertEqual(cids[-1], '9a7df788cf800241e3bb5a849c8870f2f8259d98') # repo root comes last
+
def test_ls(self):
lcd_map = self.repo.commit('HEAD').tree.ls()
self.assertEqual(lcd_map, [{
[43/46] git commit: [#5961] Added "skipped" state for tasks
Posted by jo...@apache.org.
[#5961] Added "skipped" state for tasks
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/c7366893
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c7366893
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c7366893
Branch: refs/heads/cj/5879
Commit: c736689303917fd5d334df4e5bbef530cf723983
Parents: 1d70c92
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Apr 3 15:04:33 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Wed Apr 3 16:39:10 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/monq_model.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c7366893/Allura/allura/model/monq_model.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/monq_model.py b/Allura/allura/model/monq_model.py
index bdb1d90..a97f16f 100644
--- a/Allura/allura/model/monq_model.py
+++ b/Allura/allura/model/monq_model.py
@@ -24,7 +24,7 @@ class MonQTask(MappedClass):
Properties
- _id - bson.ObjectId() for this task
- - state - 'ready', 'busy', 'error', or 'complete' task status
+ - state - 'ready', 'busy', 'error', 'complete', or 'skipped' task status
- priority - integer priority, higher is more priority
- result_type - either 'keep' or 'forget', what to do with the task when
it's done
@@ -38,7 +38,7 @@ class MonQTask(MappedClass):
- kwargs - **kwargs to be sent to the task function
- result - if the task is complete, the return value. If in error, the traceback.
'''
- states = ('ready', 'busy', 'error', 'complete')
+ states = ('ready', 'busy', 'error', 'complete', 'skipped')
result_types = ('keep', 'forget')
class __mongometa__:
session = task_orm_session
[02/46] git commit: [#5951] Display closed milestones in an optgroup
Posted by jo...@apache.org.
[#5951] Display closed milestones in an optgroup
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/b5bc1858
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b5bc1858
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b5bc1858
Branch: refs/heads/cj/5879
Commit: b5bc1858daa093d1ce7b2b6c6026039af6fdcf09
Parents: 5acf2eb
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Mar 27 19:56:22 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 28 19:45:46 2013 +0000
----------------------------------------------------------------------
.../forgetracker/tests/functional/test_root.py | 19 ++++++--
ForgeTracker/forgetracker/widgets/ticket_form.py | 36 ++++++++++++---
2 files changed, 44 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b5bc1858/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 b7f4ae2..d638cf8 100644
--- a/ForgeTracker/forgetracker/tests/functional/test_root.py
+++ b/ForgeTracker/forgetracker/tests/functional/test_root.py
@@ -116,16 +116,25 @@ class TestMilestones(TrackerTestController):
}
self.app.post('/bugs/update_milestones', d)
r = self.app.get('/bugs/1/')
+ closed = r.html.find('optgroup', label='Closed')
+ assert closed
+ closed = str(closed)
assert '<option selected value="1.0">1.0</option>' in r
+ assert '<option selected value="1.0">1.0</option>' not in closed
assert '<option value="2.0">2.0</option>' in r
- assert '<option value="3.0">3.0</option>' not in r
- assert '<option value="4.0">4.0</option>' not in r
+ assert '<option value="2.0">2.0</option>' not in closed
+ assert '<option value="3.0">3.0</option>' in closed
+ assert '<option value="4.0">4.0</option>' in closed
r = self.app.get('/bugs/new/')
+ closed = r.html.find('optgroup', label='Closed')
+ assert closed
+ closed = str(closed)
assert '<option selected value="1.0">1.0</option>' not in r
- assert '<option value="1.0">1.0</option>' not in r
+ assert '<option value="1.0">1.0</option>' in closed
assert '<option value="2.0">2.0</option>' in r
- assert '<option value="3.0">3.0</option>' not in r
- assert '<option value="4.0">4.0</option>' not in r
+ assert '<option value="2.0">2.0</option>' not in closed
+ assert '<option value="3.0">3.0</option>' in closed
+ assert '<option value="4.0">4.0</option>' in closed
def post_install_create_ticket_permission(app):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b5bc1858/ForgeTracker/forgetracker/widgets/ticket_form.py
----------------------------------------------------------------------
diff --git a/ForgeTracker/forgetracker/widgets/ticket_form.py b/ForgeTracker/forgetracker/widgets/ticket_form.py
index aaba037..4394fbb 100644
--- a/ForgeTracker/forgetracker/widgets/ticket_form.py
+++ b/ForgeTracker/forgetracker/widgets/ticket_form.py
@@ -179,9 +179,33 @@ class TicketCustomField(object):
return factory(field)
class MilestoneField(ew.SingleSelectField):
- def display(self, *args, **kwargs):
- milestone_value = kwargs['value']
- for milestone in reversed(self.options): # reverse so del hits the correct indexes
- if milestone.complete and (milestone.py_value != milestone_value):
- del self.options[self.options.index(milestone)]
- return super(MilestoneField, self).display(*args, **kwargs)
+ template=ew.Snippet('''<select {{widget.j2_attrs({
+ 'id':id,
+ 'name':rendered_name,
+ 'multiple':multiple,
+ 'class':css_class},
+ attrs)}}>
+ {% for o in open_milestones %}
+ <option{% if o.selected%} selected{% endif %} value="{{o.html_value}}">{{o.label|e}}</option>
+ {% endfor %}
+ {% if closed_milestones %}
+ <optgroup label="Closed">
+ {% for o in closed_milestones %}
+ <option{% if o.selected%} selected{% endif %} value="{{o.html_value}}">{{o.label|e}}</option>
+ {% endfor %}
+ </optgroup>
+ {% endif %}
+ </select>''', 'jinja2')
+
+ def prepare_context(self, context):
+ context = super(MilestoneField, self).prepare_context(context)
+
+ # group open / closed milestones
+ context['open_milestones'] = [opt for opt in self.options if not opt.complete]
+ context['closed_milestones'] = [opt for opt in self.options if opt.complete]
+
+ # filter closed milestones entirely
+ #value = context['value']
+ #context['options'] = [opt for opt in self.options if not opt.complete or value == opt.py_value]
+
+ return context
[24/46] git commit: [#5973] don't install ForgeActivity app if it's
not enabled
Posted by jo...@apache.org.
[#5973] don't install ForgeActivity app if it's not enabled
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/a86b081d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/a86b081d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/a86b081d
Branch: refs/heads/cj/5879
Commit: a86b081d5bdf4a32a5fe0d93bd1aa2ffc8927ba4
Parents: 3004b5f
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 13:20:20 2013 -0400
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/project.py | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/a86b081d/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index 9f07f67..39509ff 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -5,6 +5,7 @@ from datetime import datetime
from tg import config
from pylons import tmpl_context as c, app_globals as g
from pylons import request
+from paste.deploy.converters import asbool
from ming import schema as S
from ming.utils import LazyProperty
@@ -709,16 +710,17 @@ class Project(MappedClass, ActivityNode, ActivityObject):
self.notifications_disabled = True
if users is None: users = [ c.user ]
if apps is None:
+ apps = []
if is_user_project:
- apps = [('Wiki', 'wiki', 'Wiki'),
+ apps += [('Wiki', 'wiki', 'Wiki'),
('profile', 'profile', 'Profile'),
- ('admin', 'admin', 'Admin'),
- ('search', 'search', 'Search'),
- ('activity', 'activity', 'Activity')]
- else:
- apps = [('admin', 'admin', 'Admin'),
- ('search', 'search', 'Search'),
- ('activity', 'activity', 'Activity')]
+ ]
+ apps += [
+ ('admin', 'admin', 'Admin'),
+ ('search', 'search', 'Search'),
+ ]
+ if asbool(config.get('activitystream.enabled', False)):
+ apps.append(('activity', 'activity', 'Activity'))
with h.push_config(c, project=self, user=users[0]):
# Install default named roles (#78)
root_project_id=self.root_project._id
[12/46] git commit: [#5971] don't show or create user-projects for
disabled users
Posted by jo...@apache.org.
[#5971] don't show or create user-projects for disabled users
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d7846b25
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d7846b25
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d7846b25
Branch: refs/heads/cj/5879
Commit: d7846b25df18c085792f64a42fbfb7ffab7366a5
Parents: 34729f5
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Mar 28 19:08:45 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Mar 29 15:23:59 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/project.py | 7 ++++++-
Allura/allura/model/auth.py | 3 +++
.../allura/tests/functional/test_neighborhood.py | 7 +++++++
Allura/allura/tests/model/test_auth.py | 7 +++++++
4 files changed, 23 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d7846b25/Allura/allura/controllers/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/project.py b/Allura/allura/controllers/project.py
index ebeba77..7a1551f 100644
--- a/Allura/allura/controllers/project.py
+++ b/Allura/allura/controllers/project.py
@@ -67,7 +67,7 @@ class NeighborhoodController(object):
project = M.Project.query.get(shortname=self.prefix + pname, neighborhood_id=self.neighborhood._id)
if project is None and self.prefix == 'u/':
# create user-project if it is missing
- user = M.User.query.get(username=pname)
+ user = M.User.query.get(username=pname, disabled=False)
if user:
project = self.neighborhood.register_project(
plugin.AuthenticationProvider.get(request).user_project_shortname(user),
@@ -77,6 +77,11 @@ class NeighborhoodController(object):
project = self.neighborhood.neighborhood_project
c.project = project
return ProjectController()._lookup(pname, *remainder)
+ if project and self.prefix == 'u/':
+ # make sure user-projects are associated with an enabled user
+ user = project.user_project_of
+ if not user or user.disabled:
+ raise exc.HTTPNotFound
if project.database_configured == False:
if remainder == ('user_icon',):
redirect(g.forge_static('images/user.png'))
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d7846b25/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 8df4a58..ee9abec 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -587,6 +587,9 @@ class User(MappedClass, ActivityNode, ActivityObject):
'''
Returns the personal user-project for the user
'''
+ if self.disabled:
+ return None
+
from allura import model as M
n = M.Neighborhood.query.get(name='Users')
auth_provider = plugin.AuthenticationProvider.get(request)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d7846b25/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 9c86a67..815f557 100644
--- a/Allura/allura/tests/functional/test_neighborhood.py
+++ b/Allura/allura/tests/functional/test_neighborhood.py
@@ -813,6 +813,13 @@ class TestNeighborhood(TestController):
ThreadLocalORMSession.flush_all()
self.app.get('/u/donald-duck/')
+ def test_disabled_user_has_no_user_project(self):
+ user = M.User.register(dict(username='donald-duck'))
+ self.app.get('/u/donald-duck/') # assert it's there
+ M.User.query.update(dict(username='donald-duck'), {'$set': {'disabled': True}})
+ self.app.get('/u/donald-duck/', status=404)
+
+
def test_more_projects_link(self):
r = self.app.get('/adobe/adobe-1/admin/')
link = r.html.find('div', {'class':'neighborhood_title_link'}).find('a')
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d7846b25/Allura/allura/tests/model/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/model/test_auth.py b/Allura/allura/tests/model/test_auth.py
index 8fd0b65..9e0ff48 100644
--- a/Allura/allura/tests/model/test_auth.py
+++ b/Allura/allura/tests/model/test_auth.py
@@ -104,6 +104,13 @@ def test_user_project_already_deleted_creates_on_demand():
assert M.Project.query.get(shortname='u/foobar123', deleted=False)
@with_setup(setUp)
+def test_user_project_does_not_create_on_demand_for_disabled_user():
+ u = M.User.register(dict(username='foobar123', disabled=True), make_project=False)
+ ThreadLocalORMSession.flush_all()
+ assert not u.private_project()
+ assert not M.Project.query.get(shortname='u/foobar123')
+
+@with_setup(setUp)
def test_project_role():
role = M.ProjectRole(project_id=c.project._id, name='test_role')
c.user.project_role().roles.append(role._id)
[45/46] git commit: [#5879] Fixed error from all_commit_ids on empty
git repo
Posted by jo...@apache.org.
[#5879] Fixed error from all_commit_ids on empty git repo
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/0531982a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/0531982a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/0531982a
Branch: refs/heads/cj/5879
Commit: 0531982a667b46d561f478e6f7685999f96aa5ab
Parents: db0d23f
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Mar 28 21:35:36 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Apr 3 17:26:03 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0531982a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index 299ddb2..e7d529f 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -161,6 +161,8 @@ class GitImplementation(M.RepositoryImplementation):
"""Yield commit ids, starting with the head(s) of the commit tree and
ending with the root (first commit).
"""
+ if not self._git.head.is_valid():
+ return # empty repo
seen = set()
for ci in self._git.iter_commits(all=True, topo_order=True):
if ci.binsha in seen: continue
[29/46] git commit: [#5973] update vagrant scripts
Posted by jo...@apache.org.
[#5973] update vagrant scripts
* update instructions
* update ubuntu base
* various other fixes & improvements
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1baf650e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1baf650e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1baf650e
Branch: refs/heads/cj/5879
Commit: 1baf650e208ce4a017e1d62d21a486e131b59d8b
Parents: 2d9c33d
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Mar 19 11:19:36 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
vagrant/README | 14 ++-
vagrant/Vagrantfile | 6 +-
vagrant/allura_setup.sh | 16 ++--
vagrant/manifests/ubuntu-1204-server-amd64.pp | 134 ++++++++++++++++++++
vagrant/start_allura | 6 +-
5 files changed, 156 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1baf650e/vagrant/README
----------------------------------------------------------------------
diff --git a/vagrant/README b/vagrant/README
index f5b4552..69f3bbc 100644
--- a/vagrant/README
+++ b/vagrant/README
@@ -2,20 +2,22 @@ To build an Allura vagrant box:
$ mkdir ~/vagrant_allura && cd ~/vagrant_allura
-# Get the base box
-$ vagrant box add ubuntu-1110-server-amd64 http://timhuegdon.com/vagrant-boxes/ubuntu-11.10.box
-$ vagrant init ubuntu-1110-server-amd64
+# Get the base box, see http://www.vagrantbox.es/
+# 12.04 is LTS, so will be good to stick with for some time
+$ vagrant box add ubuntu-1204-server-amd64 http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-vagrant-amd64-disk1.box
+$ vagrant init ubuntu-1204-server-amd64
-# Get a copy of the provisioning scripts
+# Get a copy of the provisioning scripts (note, Vagrantfile may change from release to release and may need manual updating)
$ cp -R /var/local/allura/vagrant/* .
# At this point you can make whatever changes you want to the provisioning
-# scripts
+# scripts. Currently, the .pp puppet file runs first and sets some stuff up
+# and then allura_setup.sh runs and does more.
# Provision the box (this will take a while)
$ vagrant up
-# If you get an error, you can run `vagrant destroy` to start over
+# If you get an error, you can run `vagrant ssh` to get in and debug, and then `vagrant destroy` to start over
# Package the Allura box
$ vagrant package --vagrantfile Vagrantfile.pkg
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1baf650e/vagrant/Vagrantfile
----------------------------------------------------------------------
diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile
index 9de2455..4852673 100644
--- a/vagrant/Vagrantfile
+++ b/vagrant/Vagrantfile
@@ -7,7 +7,7 @@ Vagrant::Config.run do |config|
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
- config.vm.box = "ubuntu-1110-server-amd64"
+ config.vm.box = "ubuntu-1204-server-amd64"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
@@ -40,7 +40,7 @@ Vagrant::Config.run do |config|
# Enable provisioning with Puppet stand alone. Puppet manifests
# are contained in a directory path relative to this Vagrantfile.
# You will need to create the manifests directory and a manifest in
- # the file ubuntu-1110-server-amd64.pp in the manifests_path directory.
+ # the file ubuntu-1204-server-amd64.pp in the manifests_path directory.
#
# An example Puppet manifest to provision the message of the day:
#
@@ -57,7 +57,7 @@ Vagrant::Config.run do |config|
#
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
- puppet.manifest_file = "ubuntu-1110-server-amd64.pp"
+ puppet.manifest_file = "ubuntu-1204-server-amd64.pp"
end
config.vm.provision :shell, :path => "allura_setup.sh"
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1baf650e/vagrant/allura_setup.sh
----------------------------------------------------------------------
diff --git a/vagrant/allura_setup.sh b/vagrant/allura_setup.sh
index 16d77ce..602d247 100755
--- a/vagrant/allura_setup.sh
+++ b/vagrant/allura_setup.sh
@@ -5,12 +5,12 @@ cd /home/vagrant/src
if [ ! -d apache-solr-1.4.1 ]
then
echo "Installing Solr..."
- wget -q http://apache.mirrors.tds.net/lucene/solr/1.4.1/apache-solr-1.4.1.tgz
+ wget -nv http://archive.apache.org/dist/lucene/solr/1.4.1/apache-solr-1.4.1.tgz
tar xf apache-solr-1.4.1.tgz && rm -f apache-solr-1.4.1.tgz
cd apache-solr-1.4.1/example/
- mkdir -p /home/vagrant/src/forge/solr_config/conf
- cp solr/conf/solrconfig.xml /home/vagrant/src/forge/solr_config/conf/
- chown -R vagrant:vagrant /home/vagrant/src/apache-solr* /home/vagrant/src/forge/solr_config/conf/
+ mkdir -p /home/vagrant/src/allura/solr_config/conf
+ cp solr/conf/solrconfig.xml /home/vagrant/src/allura/solr_config/conf/
+ chown -R vagrant:vagrant /home/vagrant/src/apache-solr* /home/vagrant/src/allura/solr_config/conf/
fi
# Create log dir
@@ -33,20 +33,20 @@ if [ ! -f /home/vagrant/.bash_profile ]
then
echo "Creating ~/.bash_profile ..."
cp /home/vagrant/.profile /home/vagrant/.bash_profile
- echo -e "\n# Activate Allura virtualenv\n. /home/vagrant/anvil/bin/activate && cd /home/vagrant/src/forge" >> /home/vagrant/.bash_profile
+ echo -e "\n# Activate Allura virtualenv\n. /home/vagrant/anvil/bin/activate && cd /home/vagrant/src/allura" >> /home/vagrant/.bash_profile
chown vagrant:vagrant /home/vagrant/.bash_profile
fi
# Setup Allura python packages
-cd /home/vagrant/src/forge
+cd /home/vagrant/src/allura
sudo -u vagrant bash -c '. /home/vagrant/anvil/bin/activate; ./rebuild-all.bash'
echo "Purging unneeded packages..."
aptitude clean
aptitude -y -q purge ri
-aptitude -y -q purge installation-report landscape-common wireless-tools wpasupplicant
+aptitude -y -q purge installation-report landscape-client landscape-common wireless-tools wpasupplicant
aptitude -y -q purge python-dbus libnl1 python-smartpm linux-headers-server python-twisted-core libiw30 language-selector-common
-aptitude -y -q purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam accountsservice libaccountsservice0
+aptitude -y -q purge cloud-init juju python-twisted python-twisted-bin libdbus-glib-1-2 python-pexpect python-serial python-gobject python-pam accountsservice libaccountsservice0
echo "Zeroing free space to aid VM compression..."
cat /dev/zero > zero.fill;
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1baf650e/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
new file mode 100644
index 0000000..d80e22a
--- /dev/null
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -0,0 +1,134 @@
+# create puppet group
+group { "puppet":
+ ensure => "present",
+}
+
+exec { "package index update":
+ command => "/usr/bin/apt-get update",
+}
+
+# install required system packages
+Package { ensure => "installed" }
+
+$packages = [
+ "git-core",
+ "subversion",
+ "python-svn",
+ "default-jre-headless",
+ "python-dev",
+ "libssl-dev",
+ "libldap2-dev",
+ "libsasl2-dev",
+ "libjpeg8-dev",
+ "zlib1g-dev",
+ "mongodb-server",
+ "python-pip"
+]
+
+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",
+ creates => "/usr/local/bin/virtualenv",
+ require => Package[ "python-pip" ],
+}
+
+# create Allura virtualenv
+exec { "create allura venv":
+ command => "/usr/local/bin/virtualenv anvil",
+ cwd => "/home/vagrant",
+ creates => "/home/vagrant/anvil",
+ user => "vagrant",
+ group => "vagrant",
+ require => Exec[ "install venv" ],
+}
+
+# create dir for Allura source
+file { "/home/vagrant/src":
+ ensure => "directory",
+ owner => "vagrant",
+ group => "vagrant",
+}
+
+# create dir for Allura logs
+file { "/var/log/allura":
+ ensure => "directory",
+ owner => "vagrant",
+ group => "vagrant",
+}
+
+# clone Allura source from git
+exec { "clone repo":
+ command => "/usr/bin/git clone https://git-wip-us.apache.org/repos/asf/incubator-allura.git allura",
+ cwd => "/home/vagrant/src",
+ creates => "/home/vagrant/src/allura",
+ user => "vagrant",
+ group => "vagrant",
+ require => [ File[ "/home/vagrant/src" ], Package[ "git-core" ] ],
+}
+
+# install Allura dependencies
+exec { "pip install":
+ command => "/home/vagrant/anvil/bin/pip install -r requirements.txt",
+ cwd => "/home/vagrant/src/allura",
+ user => "vagrant",
+ group => "vagrant",
+ timeout => 0,
+ logoutput => true,
+ returns => 0,
+ tries => 3,
+ require => [ Exec[ "clone repo"], Exec[ "create allura venv" ],
+ File["/usr/lib/libjpeg.so"], File["/usr/lib/libz.so"],
+ ],
+}
+
+# symlink pysvn in from the system installation
+file { '/home/vagrant/anvil/lib/python2.7/site-packages/pysvn':
+ ensure => 'link',
+ target => '/usr/lib/python2.7/dist-packages/pysvn',
+ require => [ Package[ "python-svn" ], Exec[ "pip install" ]],
+}
+
+# create SCM repo dirs
+file { [ "/home/vagrant/scm", "/home/vagrant/scm/git", "/home/vagrant/scm/hg", "/home/vagrant/scm/svn" ]:
+ ensure => "directory",
+ owner => "vagrant",
+ group => "vagrant",
+ mode => 777,
+}
+
+# create symlinks to repo dirs
+file { '/git':
+ ensure => "link",
+ target => "/home/vagrant/scm/git",
+ owner => "vagrant",
+ group => "vagrant",
+}
+
+file { '/hg':
+ ensure => "link",
+ target => "/home/vagrant/scm/hg",
+ owner => "vagrant",
+ group => "vagrant",
+}
+
+file { '/svn':
+ ensure => "link",
+ target => "/home/vagrant/scm/svn",
+ owner => "vagrant",
+ group => "vagrant",
+}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1baf650e/vagrant/start_allura
----------------------------------------------------------------------
diff --git a/vagrant/start_allura b/vagrant/start_allura
index d9f228f..8c66187 100755
--- a/vagrant/start_allura
+++ b/vagrant/start_allura
@@ -19,10 +19,10 @@ then
else
echo "Starting Solr..."
cd /home/vagrant/src/apache-solr-1.4.1/example
- nohup java -Dsolr.solr.home=/home/vagrant/src/forge/solr_config -jar start.jar >/var/log/allura/solr.log 2>&1 &
+ nohup java -Dsolr.solr.home=/home/vagrant/src/allura/solr_config -jar start.jar >/var/log/allura/solr.log 2>&1 &
fi
-cd /home/vagrant/src/forge/Allura
+cd /home/vagrant/src/allura/Allura
# Start taskd
if pgrep -f "paster taskd" >/dev/null
@@ -37,7 +37,7 @@ fi
if [ ! -f /var/lib/mongodb/allura.0 ]
then
echo "Initializing database..."
- paster setup-app development.ini >/var/log/allura/setup-app.log 2>&1
+ paster setup-app development.ini >/var/log/allura/setup-app.log 2>&1 || echo "Error, see /var/log/allura/setup-app.log"
fi
# Start the web server
[18/46] git commit: [#5973] Contextual reminder if setup-app was not
run
Posted by jo...@apache.org.
[#5973] Contextual reminder if setup-app was not run
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3004b5f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3004b5f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3004b5f5
Branch: refs/heads/cj/5879
Commit: 3004b5f55a7c03df9d8a261d011ddc515b7551ea
Parents: 6db2bc2
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 13:19:43 2013 -0400
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:20 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/root.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3004b5f5/Allura/allura/controllers/root.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/root.py b/Allura/allura/controllers/root.py
index 69c80ec..5ac4767 100644
--- a/Allura/allura/controllers/root.py
+++ b/Allura/allura/controllers/root.py
@@ -75,7 +75,8 @@ class RootController(WsgiDispatchController):
c.project = c.app = None
c.memoize_cache = {}
c.user = plugin.AuthenticationProvider.get(request).authenticate_request()
- assert c.user is not None, 'c.user should always be at least User.anonymous()'
+ assert c.user is not None, ('c.user should always be at least User.anonymous(). '
+ 'Did you run `paster setup-app` to create the database?')
def _cleanup_request(self):
pass
@@ -90,4 +91,3 @@ class RootController(WsgiDispatchController):
SitemapEntry(cat.label, '/browse/'+cat.name) for cat in categories
]
return dict(neighborhoods=neighborhoods,title="All Neighborhoods")
-
[33/46] git commit: Revert "[#5973] crazy pysvn hacking so that
packaging tools know it is in the venv"
Posted by jo...@apache.org.
Revert "[#5973] crazy pysvn hacking so that packaging tools know it is in the venv"
This reverts commit dcf934e01089bc71a81939009abeb6145373e675.
Let's handle pysvn simply instead of being tricky.
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/eeb743b9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/eeb743b9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/eeb743b9
Branch: refs/heads/cj/5879
Commit: eeb743b98d1dc213749517905faa5e0bd1d8f731
Parents: 6127cf7
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Apr 3 09:49:02 2013 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 09:49:02 2013 -0400
----------------------------------------------------------------------
README.markdown | 3 +--
vagrant/manifests/ubuntu-1204-server-amd64.pp | 5 -----
2 files changed, 1 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/eeb743b9/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 198a0f0..bbd03cb 100644
--- a/README.markdown
+++ b/README.markdown
@@ -62,10 +62,9 @@ Although the application setup.py files define a number of dependencies, the `re
This will take a while. If you get an error from pip, it is typically a temporary download error. Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
-Optional, for SVN support: symlink the system pysvn package into our virtual environment and make packaging utilities know its there.
+Optional, for SVN support: symlink the system pysvn package into our virtual environment
(anvil)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/anvil/lib/python2.7/site-packages/
- (anvil)~/src/allura$ mkdir ~/anvil/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info
And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
If you only want to use a few tools, run:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/eeb743b9/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 6206350..d80e22a 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -102,11 +102,6 @@ file { '/home/vagrant/anvil/lib/python2.7/site-packages/pysvn':
target => '/usr/lib/python2.7/dist-packages/pysvn',
require => [ Package[ "python-svn" ], Exec[ "pip install" ]],
}
-# and trick pip/setuptools etc to know its there
-file { '/home/vagrant/anvil/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info':
- ensure => 'directory',
- require => File['/home/vagrant/anvil/lib/python2.7/site-packages/pysvn'],
-}
# create SCM repo dirs
file { [ "/home/vagrant/scm", "/home/vagrant/scm/git", "/home/vagrant/scm/hg", "/home/vagrant/scm/svn" ]:
[36/46] git commit: [#5973] remove another reference to
system-site-packages
Posted by jo...@apache.org.
[#5973] remove another reference to system-site-packages
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3fec1d22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3fec1d22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3fec1d22
Branch: refs/heads/cj/5879
Commit: 3fec1d22d18081ab9a6ef62d5625e88ab825a1e1
Parents: 3a3e769
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Apr 3 10:00:30 2013 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 10:00:30 2013 -0400
----------------------------------------------------------------------
README.markdown | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3fec1d22/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index bbd03cb..2c42397 100644
--- a/README.markdown
+++ b/README.markdown
@@ -41,7 +41,7 @@ Once you have virtualenv installed, you need to create a virtual environment. W
~$ virtualenv anvil
This gives us a nice, clean environment into which we can install all the allura dependencies.
-(The --system-site-packages flag is to include the python-svn package). In order to use the virtual environment, you'll need to activate it:
+In order to use the virtual environment, you'll need to activate it:
~$ . anvil/bin/activate
[32/46] git commit: [#5973] remove sf.net-specific shorturl migration
Posted by jo...@apache.org.
[#5973] remove sf.net-specific shorturl migration
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/1f9e46b3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/1f9e46b3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/1f9e46b3
Branch: refs/heads/cj/5879
Commit: 1f9e46b3063e07689f940b13af2960be0233002f
Parents: 65932e3
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Mar 19 19:10:42 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
ForgeShortUrl/forgeshorturl/command/base.py | 5 -
.../forgeshorturl/command/migrate_urls.py | 106 ---------------
ForgeShortUrl/forgeshorturl/tests/test_commands.py | 71 ----------
ForgeShortUrl/setup.py | 2 -
4 files changed, 0 insertions(+), 184 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f9e46b3/ForgeShortUrl/forgeshorturl/command/__init__.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/command/__init__.py b/ForgeShortUrl/forgeshorturl/command/__init__.py
deleted file mode 100644
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f9e46b3/ForgeShortUrl/forgeshorturl/command/base.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/command/base.py b/ForgeShortUrl/forgeshorturl/command/base.py
deleted file mode 100644
index 08ef1b2..0000000
--- a/ForgeShortUrl/forgeshorturl/command/base.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from allura.command.base import Command
-
-
-class ShortUrlCommand(Command):
- group_name = 'ForgeShortUrl'
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f9e46b3/ForgeShortUrl/forgeshorturl/command/migrate_urls.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/command/migrate_urls.py b/ForgeShortUrl/forgeshorturl/command/migrate_urls.py
deleted file mode 100644
index 5d339e5..0000000
--- a/ForgeShortUrl/forgeshorturl/command/migrate_urls.py
+++ /dev/null
@@ -1,106 +0,0 @@
-import tg
-import warnings
-from pylons import tmpl_context as c
-import bson
-from forgeshorturl.command.base import ShortUrlCommand
-from forgeshorturl.model import ShortUrl
-from allura.lib import exceptions
-from allura.lib import helpers as h
-from allura import model as M
-from ming.orm import session
-import sqlalchemy
-from datetime import datetime
-
-
-class MigrateUrls(ShortUrlCommand):
- """Usage example:
-
- paster migrate-urls ../Allura/development.ini sfurl allura.p
-
- The following settings are read from the INI file:
-
- sfx.hostedapps_db.hostname
- sfx.hostedapps_db.port
- sfx.hostedapps_db.username
- sfx.hostedapps_db.password
- """
- min_args = 3
- max_args = 3
- usage = '<ini file> <database name> <project name>'
- summary = 'Migrate short URLs from the SFX Hosted App to Allura'
- parser = ShortUrlCommand.standard_parser(verbose=True)
- parser.add_option('-m', dest='mount_point', type='string', default='url',
- help='mount point (default: url)')
- parser.add_option('-n', dest='nbhd', type='string', default='p',
- help='neighborhood shortname or _id (default: p)')
- parser.add_option('--clean', dest='clean', action='store_true', default=False,
- help='clean existing short URLs from Allura')
-
- def command(self):
- self._setup()
- self._load_objects()
-
- if self.options.clean:
- ShortUrl.query.remove({'app_config_id': c.app.config._id})
-
- for row in self.urls.select().execute():
- url = ShortUrl.upsert(h.really_unicode(row['short_id']))
- url.full_url = h.really_unicode(row['url'])
- url.description = h.really_unicode(row['description'])
- url.private = row['private'] == 'Y'
- url.created = datetime.utcfromtimestamp(row['create_time'])
- url.last_updated = datetime.utcfromtimestamp(row['edit_time'])
- user = M.User.query.find({'tool_data.sfx.userid': row['create_user']}).first()
- url.create_user = user._id if user else M.User.anonymous()._id
-
- session(ShortUrl).flush()
-
- def _setup(self):
- '''Perform basic setup, suppressing superfluous warnings.'''
- with warnings.catch_warnings():
- try:
- from sqlalchemy import exc
- except ImportError:
- pass
- else:
- warnings.simplefilter("ignore", category=exc.SAWarning)
- self.basic_setup()
-
- db = sqlalchemy.create_engine(self._connection_string())
- meta = sqlalchemy.MetaData()
- meta.bind = db
- self.urls = sqlalchemy.Table('sfurl', meta, autoload=True)
-
- def _connection_string(self):
- prefix = 'sfx.hostedapps_db.'
- params = {
- 'host': tg.config.get(prefix + 'hostname', 'localhost'),
- 'port': tg.config.get(prefix + 'port', 3306),
- 'user': tg.config.get(prefix + 'username', ''),
- 'pwd': tg.config.get(prefix + 'password', ''),
- 'db': self.args[1]
- }
- return 'mysql://%(user)s:%(pwd)s@%(host)s:%(port)s/%(db)s' % params
-
- def _load_objects(self):
- nbhd = None
- try:
- nbhd = M.Neighborhood.query.get(_id=bson.ObjectId(self.options.nbhd))
- except bson.errors.InvalidId:
- nbhd = M.Neighborhood.query.find({'$or': [
- {'url_prefix': '/%s/' % self.options.nbhd},
- {'name': self.options.nbhd},
- ]}).first()
- assert nbhd, 'Neighborhood %s not found' % self.options.nbhd
- try:
- c.project = M.Project.query.get(_id=bson.ObjectId(self.args[2]))
- except bson.errors.InvalidId:
- c.project = M.Project.query.find({'$or': [
- {'shortname': self.args[2]},
- {'name': self.args[2]},
- ]}).first()
- if not c.project:
- raise exceptions.NoSuchProjectError('The project %s '
- 'could not be found in the database' % self.args[2])
- c.app = c.project.app_instance(self.options.mount_point)
- assert c.app, 'Project does not have ShortURL app installed'
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f9e46b3/ForgeShortUrl/forgeshorturl/tests/test_commands.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/forgeshorturl/tests/test_commands.py b/ForgeShortUrl/forgeshorturl/tests/test_commands.py
deleted file mode 100644
index 4ccf60e..0000000
--- a/ForgeShortUrl/forgeshorturl/tests/test_commands.py
+++ /dev/null
@@ -1,71 +0,0 @@
-from nose.tools import assert_equal
-from alluratest.controller import setup_basic_test, setup_global_objects
-from forgeshorturl.command import migrate_urls
-from forgeshorturl.model import ShortUrl
-from allura import model as M
-from mock import patch, MagicMock, Mock
-
-test_config = 'test.ini#main'
-
-
-def setUp(self):
- """Method called by nose before running each test"""
- setup_basic_test()
- setup_global_objects()
-
-
-class TableMock(MagicMock):
-
- def select(self):
- m = Mock()
- m.execute = self.execute
- return m
-
- def execute(self):
- test_urls = [
- {
- 'short_id': 'g',
- 'url': 'http://google.com',
- 'description': 'Two\nlines',
- 'private': 'N',
- 'create_time': 1,
- 'edit_time': 2,
- 'create_user': 1
- },
- {
- 'short_id': 'y',
- 'url': 'http://yahoo.com',
- 'description': 'One line',
- 'private': 'Y',
- 'create_time': 3,
- 'edit_time': 4,
- 'create_user': 1
- }
- ]
- for url in test_urls:
- yield url
-
-
-@patch('sqlalchemy.Table', TableMock)
-def test_migrate_urls():
- p = M.Project.query.find().first()
- app = p.app_instance('url')
- if not app:
- app = p.install_app('ShortUrl')
- assert_equal(ShortUrl.query.find({'app_config_id': app.config._id}).count(), 0)
-
- cmd = migrate_urls.MigrateUrls('migrate-urls')
- cmd.run([test_config, 'db_name', str(p._id)])
- assert_equal(ShortUrl.query.find({'app_config_id': app.config._id}).count(), 2)
-
- u = ShortUrl.query.find(dict(app_config_id=app.config._id, short_name='g')).first()
- assert_equal(u.full_url, 'http://google.com')
- assert_equal(u.description, 'Two\nlines')
- assert not u.private
- assert_equal(u.create_user, M.User.anonymous()._id)
-
- u = ShortUrl.query.find(dict(app_config_id=app.config._id, short_name='y')).first()
- assert_equal(u.full_url, 'http://yahoo.com')
- assert_equal(u.description, 'One line')
- assert u.private
- assert_equal(u.create_user, M.User.anonymous()._id)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/1f9e46b3/ForgeShortUrl/setup.py
----------------------------------------------------------------------
diff --git a/ForgeShortUrl/setup.py b/ForgeShortUrl/setup.py
index 62fc1ce..4b3a2a2 100644
--- a/ForgeShortUrl/setup.py
+++ b/ForgeShortUrl/setup.py
@@ -19,6 +19,4 @@ setup(name='ForgeShortUrl',
[allura]
ShortURL=forgeshorturl.main:ForgeShortUrlApp
- [paste.paster_command]
- migrate-urls=forgeshorturl.command.migrate_urls:MigrateUrls
""",)
[28/46] git commit: [#5973] move ipython requirement since it is used
in tests
Posted by jo...@apache.org.
[#5973] move ipython requirement since it is used 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/8691037c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8691037c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8691037c
Branch: refs/heads/cj/5879
Commit: 8691037c0d9a1b144f7b9132c6cc1f4953578bbc
Parents: 556feff
Author: Dave Brondsema <db...@geek.net>
Authored: Mon Mar 18 13:30:13 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 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/8691037c/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 03d76f4..eded3e8 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -68,6 +68,7 @@ smmap==0.8.1
# testing & development
datadiff==1.1.5
+ipython==0.11
mock==0.8.0
nose==1.1.2
pyflakes==0.5.0
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8691037c/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 7b66bc3..f6dc6f4 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -29,7 +29,6 @@ mediawiki==0.0.1
# development
blessings==1.3
-ipython==0.11
nose-progressive==1.3
pyprof2calltree==1.1.0
repoze.profile==1.3
[27/46] git commit: [#5973] symlink pysvn instead of using
--system-site-packages
Posted by jo...@apache.org.
[#5973] symlink pysvn instead of using --system-site-packages
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2d9c33d7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2d9c33d7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2d9c33d7
Branch: refs/heads/cj/5879
Commit: 2d9c33d7ea5fa8fbeee1596da9fd315cdf7dc3ee
Parents: 8691037
Author: Dave Brondsema <db...@geek.net>
Authored: Mon Mar 18 13:37:40 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
README.markdown | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2d9c33d7/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index d380157..248b8a7 100644
--- a/README.markdown
+++ b/README.markdown
@@ -38,7 +38,7 @@ The first step to installing the Allura platform is installing a virtual environ
Once you have virtualenv installed, you need to create a virtual environment. We'll call our Allura environment 'anvil'.
- ~$ virtualenv --system-site-packages anvil
+ ~$ virtualenv anvil
This gives us a nice, clean environment into which we can install all the allura dependencies.
(The --system-site-packages flag is to include the python-svn package). In order to use the virtual environment, you'll need to activate it:
@@ -62,6 +62,10 @@ Although the application setup.py files define a number of dependencies, the `re
This will take a while. If you get an error from pip, it is typically a temporary download error. Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
+Optional, for SVN support: symlink the system pysvn package into our virtual environment
+
+ (anvil)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/anvil/lib/python2.7/site-packages/
+
And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
If you only want to use a few tools, run:
@@ -85,6 +89,7 @@ We have a custom config ready for use.
(anvil)~/src$ cd apache-solr-1.4.1/example/
(anvil)~/src/apache-solr-1.4.1/example/$ mkdir -p ~/src/allura/solr_config/conf
(anvil)~/src/apache-solr-1.4.1/example/$ cp solr/conf/solrconfig.xml ~/src/allura/solr_config/conf/
+ (anvil)~/src/apache-solr-1.4.1/example/$ mkdir ~/logs/
(anvil)~/src/apache-solr-1.4.1/example/$ nohup java -Dsolr.solr.home=$(cd;pwd)/src/allura/solr_config -jar start.jar > ~/logs/solr.log &
@@ -101,7 +106,7 @@ In order to initialize the Allura database, you'll need to run the following:
(anvil)~/src/allura/Allura$ paster setup-app development.ini
-This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background. It should complete in 5-6 minutes. Once this is done, you can start the application server:
+This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background. Once this is done, you can start the application server:
(anvil)~/src/allura/Allura$ nohup paster serve --reload development.ini > ~/logs/tg.log &
[08/46] git commit: [#6020] ok to have a print in import_api.py
Posted by jo...@apache.org.
[#6020] ok to have a print in import_api.py
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/699e9b88
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/699e9b88
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/699e9b88
Branch: refs/heads/cj/5879
Commit: 699e9b88093a24ea0d683c80a2a09f6bc2a8c329
Parents: e8161e6
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Mar 28 21:25:00 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 28 21:25:00 2013 +0000
----------------------------------------------------------------------
AlluraTesting/alluratest/test_syntax.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/699e9b88/AlluraTesting/alluratest/test_syntax.py
----------------------------------------------------------------------
diff --git a/AlluraTesting/alluratest/test_syntax.py b/AlluraTesting/alluratest/test_syntax.py
index a3f7a4a..902574d 100644
--- a/AlluraTesting/alluratest/test_syntax.py
+++ b/AlluraTesting/alluratest/test_syntax.py
@@ -65,10 +65,9 @@ def test_no_prints():
'Allura/ldap-setup.py',
'Allura/ldap-userconfig.py',
'Allura/ez_setup/',
- 'Allura/push_re.py',
'Allura/allura/lib/AsciiDammit.py',
'/scripts/',
- 'ForgeMail/forgemail/sstress.py',
+ 'Allura/allura/lib/import_api.py',
]
if run(find_py + " | grep -v '" + "' | grep -v '".join(skips) + "' | xargs grep -v '^ *#' | grep 'print ' | grep -E -v '(pprint|#pragma: ?printok)' ") != 1:
raise Exception("These should use logging instead of print")
[25/46] git commit: [#5973] Simplify the README
Posted by jo...@apache.org.
[#5973] Simplify the README
* explain SVN is optional (often tricky to install on some platforms)
* use rebuild-all.bash
* omit SCM symlinks since they don't add anything useful (/tmp works just fine for getting started)
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d94f287b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d94f287b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d94f287b
Branch: refs/heads/cj/5879
Commit: d94f287b72e7bbf4f3d47e730336e01b795b6c29
Parents: 92a7522
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 11:01:27 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
README.markdown | 47 ++++++++++++++++++-----------------------------
1 files changed, 18 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d94f287b/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index 4ef4221..d380157 100644
--- a/README.markdown
+++ b/README.markdown
@@ -17,19 +17,15 @@ We'll use [VirtualBox](http://www.virtualbox.org) and [Ubuntu 12.04](http://ubun
# Installation
-Before we begin, you'll need the following additional packages in order to work with the Allura source code.
+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)
- ~$ sudo aptitude install git-core subversion python-svn
-
-You'll also need additional development packages in order to compile some of the modules. [Use google for additional PIL/jpeg help.](http://www.google.com/search?q=ubuntu+pil+jpeg+virtualenv)
-
- ~$ sudo aptitude install default-jre-headless python-dev libssl-dev libldap2-dev libsasl2-dev libjpeg8-dev zlib1g-dev
+ ~$ sudo aptitude install mongodb-server 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
-And finally our document-oriented database, MongoDB
+Optional, for SVN support:
- ~$ sudo aptitude install mongodb-server
+ ~$ sudo aptitude install subversion python-svn
If you are using a different base system, make sure you have Mongo 1.8 or better. If you need to upgrade, you can download the latest from <http://www.mongodb.org/downloads>
@@ -44,10 +40,13 @@ Once you have virtualenv installed, you need to create a virtual environment. W
~$ virtualenv --system-site-packages anvil
-This gives us a nice, clean environment into which we can install all the allura dependencies. (The site-packages flag is to include the python-svn package). In order to use the virtual environment, you'll need to activate it. You'll need to do this whenever you're working on the Allura codebase so you may want to consider adding it to your `~/.bashrc` file.
+This gives us a nice, clean environment into which we can install all the allura dependencies.
+(The --system-site-packages flag is to include the python-svn package). In order to use the virtual environment, you'll need to activate it:
~$ . anvil/bin/activate
+You'll need to do this whenever you're working on the Allura codebase so you may want to consider adding it to your `~/.bashrc` file.
+
## Installing the Allura code and dependencies
Now we can get down to actually getting the Allura code and dependencies downloaded and ready to go.
@@ -63,24 +62,14 @@ Although the application setup.py files define a number of dependencies, the `re
This will take a while. If you get an error from pip, it is typically a temporary download error. Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
-And now to setup each of the Allura applications for development. Because there are quite a few (at last count 15), we'll use a simple shell loop to set them up.
-
- for APP in Allura* Forge* NoWarnings
- do
- pushd $APP
- python setup.py develop
- popd
- done
-
-Hopefully everything completed without errors. We'll also need to create a place for Allura to store any SCM repositories that a project might create.
-
- for SCM in git svn hg
- do
- mkdir -p ~/var/scm/$SCM
- chmod 777 ~/var/scm/$SCM
- sudo ln -s ~/var/scm/$SCM /tmp
- done
+And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
+If you only want to use a few tools, run:
+ cd Allura
+ python setup.py develop
+ cd ../ForgeWiki # required tool
+ python setup.py develop
+ # repeat for any other tools you want to use
## Initializing the environment
@@ -101,18 +90,18 @@ We have a custom config ready for use.
### Allura task processing
-Responds to asynchronous task requests.
+Allura uses a background task service called "taskd" to do async tasks like sending emails, and indexing data into solr, etc. Let's get it running
(anvil)~$ cd ~/src/allura/Allura
(anvil)~/src/allura/Allura$ nohup paster taskd development.ini > ~/logs/taskd.log &
-### TurboGears application server
+### The application server
In order to initialize the Allura database, you'll need to run the following:
(anvil)~/src/allura/Allura$ paster setup-app development.ini
-This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background. It should complete in 5-6 minutes. Once this is done, you can start the application server.
+This shouldn't take too long, but it will start the taskd server doing tons of stuff in the background. It should complete in 5-6 minutes. Once this is done, you can start the application server:
(anvil)~/src/allura/Allura$ nohup paster serve --reload development.ini > ~/logs/tg.log &
[22/46] git commit: [#5973] Make the pysvn dep explicit,
so we fail sooner (setup.py develop instead of runtime import)
Posted by jo...@apache.org.
[#5973] Make the pysvn dep explicit, so we fail sooner (setup.py develop instead of runtime import)
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/b0c97b95
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/b0c97b95
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/b0c97b95
Branch: refs/heads/cj/5879
Commit: b0c97b952b3671f0e45c7f030ba920bf280abffa
Parents: d4a0cfd
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 10:46:43 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
ForgeSVN/setup.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/b0c97b95/ForgeSVN/setup.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/setup.py b/ForgeSVN/setup.py
index fba4631..dbd6932 100644
--- a/ForgeSVN/setup.py
+++ b/ForgeSVN/setup.py
@@ -19,7 +19,8 @@ setup(name='ForgeSVN',
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
- 'Allura'
+ 'Allura',
+ 'pysvn',
],
entry_points="""
# -*- Entry points: -*-
[17/46] git commit: [#6030] Set context on commits during
compute_diffs to avoid calling guess_repo
Posted by jo...@apache.org.
[#6030] Set context on commits during compute_diffs to avoid calling guess_repo
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/92607ab4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/92607ab4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/92607ab4
Branch: refs/heads/cj/5879
Commit: 92607ab47540f1017f5b78cc1eba4796158170f2
Parents: 39079c5
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Apr 2 14:18:14 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Tue Apr 2 14:18:14 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo_refresh.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/92607ab4/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 539df2a..2e176af 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -94,7 +94,9 @@ def refresh_repo(repo, all_commits=False, notify=True):
# with caching.
if repo._refresh_precompute:
for i, oid in enumerate(commit_ids):
- ci = CommitDoc.m.find(dict(_id=oid), validate=False).next()
+ cid = CommitDoc.m.find(dict(_id=oid), validate=False).next()
+ ci = mapper(Commit).create(cid, dict(instrument=False))
+ ci.set_context(repo)
compute_diffs(repo._id, cache, ci)
if (i+1) % 100 == 0:
log.info('Compute diffs %d: %s', (i+1), ci._id)
[34/46] git commit: Revert "[#5973] Make the pysvn dep explicit,
so we fail sooner (setup.py develop instead of runtime import)"
Posted by jo...@apache.org.
Revert "[#5973] Make the pysvn dep explicit, so we fail sooner (setup.py develop instead of runtime import)"
This reverts commit b0c97b952b3671f0e45c7f030ba920bf280abffa.
Let's handle pysvn simply instead of being tricky.
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2400a31d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2400a31d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2400a31d
Branch: refs/heads/cj/5879
Commit: 2400a31d93c5cc93d6a817148dcff258b2799f21
Parents: eeb743b
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Apr 3 09:49:38 2013 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 09:49:38 2013 -0400
----------------------------------------------------------------------
ForgeSVN/setup.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2400a31d/ForgeSVN/setup.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/setup.py b/ForgeSVN/setup.py
index dbd6932..fba4631 100644
--- a/ForgeSVN/setup.py
+++ b/ForgeSVN/setup.py
@@ -19,8 +19,7 @@ setup(name='ForgeSVN',
zip_safe=False,
install_requires=[
# -*- Extra requirements: -*-
- 'Allura',
- 'pysvn',
+ 'Allura'
],
entry_points="""
# -*- Entry points: -*-
[19/46] git commit: [#5973] remove pysvn dependency from Allura
package
Posted by jo...@apache.org.
[#5973] remove pysvn dependency from Allura package
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6db2bc23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6db2bc23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6db2bc23
Branch: refs/heads/cj/5879
Commit: 6db2bc233a5aa4b33b0b4e131c2754b6df7903fe
Parents: 92607ab
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 13:04:42 2013 -0400
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:20 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/utils.py | 10 ----------
ForgeSVN/forgesvn/model/svn.py | 10 +++++++++-
ForgeSVN/forgesvn/svn_main.py | 2 +-
ForgeSVN/forgesvn/tests/model/test_repository.py | 2 +-
4 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6db2bc23/Allura/allura/lib/utils.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/utils.py b/Allura/allura/lib/utils.py
index fa63b38..6e2d3b8 100644
--- a/Allura/allura/lib/utils.py
+++ b/Allura/allura/lib/utils.py
@@ -27,7 +27,6 @@ from pygments.formatters import HtmlFormatter
from ew import jinja2_ew as ew
from ming.utils import LazyProperty
-import pysvn
def permanent_redirect(url):
try:
@@ -418,15 +417,6 @@ def generate_code_stats(blob):
return stats
-def svn_path_exists(path):
- svn = pysvn.Client()
- try:
- svn.info2(path)
- return True
- except pysvn.ClientError, e:
- return False
-
-
def is_text_file(file):
msg = magic.from_buffer(file[:1024])
if ("text" in msg) or ("empty" in msg):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6db2bc23/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 171c709..4d09534 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -26,7 +26,6 @@ from ming.utils import LazyProperty
from allura import model as M
from allura.lib import helpers as h
from allura.model.auth import User
-from allura.lib.utils import svn_path_exists
log = logging.getLogger(__name__)
@@ -98,6 +97,15 @@ class SVNCalledProcessError(Exception):
(self.cmd, self.returncode, self.stdout, self.stderr)
+def svn_path_exists(path):
+ svn = SVNLibWrapper(pysvn.Client())
+ try:
+ svn.info2(path)
+ return True
+ except pysvn.ClientError:
+ return False
+
+
class SVNLibWrapper(object):
"""Wrapper around pysvn, used for instrumentation."""
def __init__(self, client):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6db2bc23/ForgeSVN/forgesvn/svn_main.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/svn_main.py b/ForgeSVN/forgesvn/svn_main.py
index 29e531a..2df8ea4 100644
--- a/ForgeSVN/forgesvn/svn_main.py
+++ b/ForgeSVN/forgesvn/svn_main.py
@@ -18,13 +18,13 @@ from allura.lib.repository import RepositoryApp, RepoAdminController
from allura.app import SitemapEntry, ConfigOption
from allura.lib import helpers as h
from allura import model as M
-from allura.lib.utils import svn_path_exists
# Local imports
from . import model as SM
from . import version
from . import widgets
from .controllers import BranchBrowser
+from .model.svn import svn_path_exists
log = logging.getLogger(__name__)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6db2bc23/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 43d6cbc..89964a7 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -17,11 +17,11 @@ from ming.orm import session, ThreadLocalORMSession
from alluratest.controller import setup_basic_test, setup_global_objects
from allura import model as M
from allura.lib import helpers as h
-from allura.lib.utils import svn_path_exists
from allura.tests import decorators as td
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
class TestNewRepo(unittest.TestCase):
[37/46] git commit: [#5973] allow print in ForgeSVN/setup.py
Posted by jo...@apache.org.
[#5973] allow print in ForgeSVN/setup.py
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7d53aacb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7d53aacb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7d53aacb
Branch: refs/heads/cj/5879
Commit: 7d53aacbef9fe1d3173c838e80c9448c043a4d0e
Parents: 3fec1d2
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Apr 3 10:35:25 2013 -0400
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 10:35:25 2013 -0400
----------------------------------------------------------------------
AlluraTesting/alluratest/test_syntax.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7d53aacb/AlluraTesting/alluratest/test_syntax.py
----------------------------------------------------------------------
diff --git a/AlluraTesting/alluratest/test_syntax.py b/AlluraTesting/alluratest/test_syntax.py
index 902574d..4784eda 100644
--- a/AlluraTesting/alluratest/test_syntax.py
+++ b/AlluraTesting/alluratest/test_syntax.py
@@ -68,6 +68,7 @@ def test_no_prints():
'Allura/allura/lib/AsciiDammit.py',
'/scripts/',
'Allura/allura/lib/import_api.py',
+ 'ForgeSVN/setup.py',
]
if run(find_py + " | grep -v '" + "' | grep -v '".join(skips) + "' | xargs grep -v '^ *#' | grep 'print ' | grep -E -v '(pprint|#pragma: ?printok)' ") != 1:
raise Exception("These should use logging instead of print")
[07/46] git commit: Output the URL being used to import tickets when
verbose is turned on
Posted by jo...@apache.org.
Output the URL being used to import tickets when verbose is turned on
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5c079303
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5c079303
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5c079303
Branch: refs/heads/cj/5879
Commit: 5c079303c38f33edb1f603ea6f4f02ccc2f01506
Parents: cbbd95e
Author: Jon Schewe <jp...@mtu.net>
Authored: Tue Mar 26 18:26:43 2013 -0500
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Mar 28 20:42:12 2013 +0000
----------------------------------------------------------------------
Allura/allura/lib/import_api.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5c079303/Allura/allura/lib/import_api.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/import_api.py b/Allura/allura/lib/import_api.py
index 365532d..ea07756 100644
--- a/Allura/allura/lib/import_api.py
+++ b/Allura/allura/lib/import_api.py
@@ -30,6 +30,9 @@ class AlluraImportApiClient(object):
def call(self, url, **params):
url = urlparse.urljoin(self.base_url, url)
+ if self.verbose:
+ print "Using URL '%s'" % (url)
+
params = self.sign(urlparse.urlparse(url).path, params.items())
while True:
[10/46] git commit: [#5978] Fixed call to guess_repo in History view
and log any other calls as errors
Posted by jo...@apache.org.
[#5978] Fixed call to guess_repo in History view and log any other calls as errors
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/34729f5c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/34729f5c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/34729f5c
Branch: refs/heads/cj/5879
Commit: 34729f5cc504c027115f251f91f5ad67b8a286f2
Parents: 789d7b8
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Mar 28 22:09:19 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri Mar 29 14:30:15 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 6 +++++-
Allura/allura/model/repo.py | 2 ++
2 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/34729f5c/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index e110e10..bbfb307 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -470,7 +470,11 @@ class CommitBrowser(BaseController):
next_commit = None
if len(commits) > limit:
next_commit = M.repo.Commit.query.get(_id=commits.pop())
- revisions = sorted(M.repo.Commit.query.find({'_id': {'$in': commits}}), key=lambda c:commits.index(c._id))
+ next_commit.set_context(c.app.repo)
+ revisions = list(M.repo.Commit.query.find({'_id': {'$in': commits}}))
+ for commit in revisions:
+ commit.set_context(c.app.repo)
+ revisions = sorted(revisions, key=lambda c:commits.index(c._id))
c.log_widget = self.log_widget
return dict(
username=c.user._id and c.user.username,
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/34729f5c/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 40f4567..85fa875 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -231,6 +231,8 @@ class Commit(RepoObject):
return self.repo.url_for_commit(self)
def guess_repo(self):
+ import traceback
+ log.error('guess_repo: should not be called: %s' % ''.join(traceback.format_stack()))
for ac in c.project.app_configs:
try:
app = c.project.app_instance(ac)
[39/46] git commit: Setup pysvn in venv before doing a rebuild
Posted by jo...@apache.org.
Setup pysvn in venv before doing a rebuild
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/cb210e98
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/cb210e98
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/cb210e98
Branch: refs/heads/cj/5879
Commit: cb210e98e3a29999ac8bf49adf725a01cde0e8aa
Parents: c0f67e3
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Apr 3 13:18:29 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 14:49:42 2013 +0000
----------------------------------------------------------------------
Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/cb210e98/Makefile
----------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 12c9048..e9565d3 100644
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,11 @@ PID_PATH?=.
test:
ifdef BB
# running on buildbot (Makefile.def.buildbot sets BB to 1)
-# rebuild apps
- ./rebuild-all.bash
# setup pysvn
-[ ! -f $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn ] && ln -s /usr/lib64/python2.7/site-packages/pysvn $(VIRTUAL_ENV)/lib/python2.7/site-packages/
-[ ! -d $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info ] && mkdir $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info
+# rebuild apps
+ ./rebuild-all.bash
endif
ALLURA_VALIDATION=none ./run_tests
./run_clonedigger
[11/46] git commit: [#5971] don't re-query the Users nbhd every time
we look up a user-project
Posted by jo...@apache.org.
[#5971] don't re-query the Users nbhd every time we look up a user-project
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/53635e77
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/53635e77
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/53635e77
Branch: refs/heads/cj/5879
Commit: 53635e778f61d8a8a20f0205caa45eabdbe0d143
Parents: d7846b2
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Thu Mar 28 19:12:50 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Fri Mar 29 15:23:59 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/auth.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/53635e77/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index ee9abec..5ccfd60 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -23,6 +23,7 @@ from ming.orm import session, state
from ming.orm import FieldProperty, RelationProperty, ForeignIdProperty
from ming.orm.declarative import MappedClass
from ming.orm.ormsession import ThreadLocalORMSession
+from ming.utils import LazyProperty
import allura.tasks.mail_tasks
from allura.lib import helpers as h
@@ -583,6 +584,11 @@ class User(MappedClass, ActivityNode, ActivityObject):
user=user, user_project=True)
return user
+ @LazyProperty
+ def neighborhood(self):
+ from allura import model as M
+ return M.Neighborhood.query.get(name='Users')
+
def private_project(self):
'''
Returns the personal user-project for the user
@@ -591,7 +597,7 @@ class User(MappedClass, ActivityNode, ActivityObject):
return None
from allura import model as M
- n = M.Neighborhood.query.get(name='Users')
+ n = self.neighborhood
auth_provider = plugin.AuthenticationProvider.get(request)
project_shortname = auth_provider.user_project_shortname(self)
p = M.Project.query.get(shortname=project_shortname, neighborhood_id=n._id)
[21/46] git commit: [#5973] remove ancient README within the Allura
dir since we have a top-level one
Posted by jo...@apache.org.
[#5973] remove ancient README within the Allura dir since we have a top-level one
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/92a7522c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/92a7522c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/92a7522c
Branch: refs/heads/cj/5879
Commit: 92a7522c6a57482e4995d1e144fac3150b04b5d0
Parents: b0c97b9
Author: Dave Brondsema <db...@geek.net>
Authored: Thu Mar 14 10:50:16 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
Allura/README.txt | 24 ------------------------
1 files changed, 0 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/92a7522c/Allura/README.txt
----------------------------------------------------------------------
diff --git a/Allura/README.txt b/Allura/README.txt
deleted file mode 100644
index 929d51d..0000000
--- a/Allura/README.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-This file is for you to describe the allura application. Typically
-you would include information such as the information below:
-
-Installation and Setup
-======================
-
-Install ``allura`` using the setup.py script::
-
- $ cd allura
- $ python setup.py install
-
-Create the project database for any model classes defined::
-
- $ paster setup-app development.ini
-
-Start the paste http server::
-
- $ paster serve development.ini
-
-While developing you may want the server to reload after changes in package files (or its dependencies) are saved. This can be achieved easily by adding the --reload option::
-
- $ paster serve --reload development.ini
-
-Then you are ready to go.
[41/46] git commit: [#4329] Change repo_refreshed event params
Posted by jo...@apache.org.
[#4329] Change repo_refreshed event params
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/c06eeda2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c06eeda2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c06eeda2
Branch: refs/heads/cj/5879
Commit: c06eeda207244d4f10cb65a84a067d9db0b3ae78
Parents: cb210e9
Author: Tim Van Steenburgh <tv...@gmail.com>
Authored: Mon Apr 1 14:35:41 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 16:24:06 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo_refresh.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c06eeda2/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index ca0c43b..d42def3 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -113,10 +113,8 @@ def refresh_repo(repo, all_commits=False, notify=True):
log.info('Refresh complete for %s', repo.full_fs_path)
- g.post_event(
- 'repo_refreshed',
- commit_number=len(commit_ids),
- new=bool(new_commit_ids))
+ g.post_event('repo_refreshed', len(commit_ids), all_commits)
+
# Send notifications
if notify:
send_notifications(repo, commit_ids)
[40/46] git commit: Make pysvn symlinks on buildbot
Posted by jo...@apache.org.
Make pysvn symlinks on buildbot
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e9ad55a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e9ad55a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e9ad55a7
Branch: refs/heads/cj/5879
Commit: e9ad55a73f6a984c25e14e5df7a532b92fc8e1bd
Parents: 7d53aac
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed Apr 3 11:22:45 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Apr 3 14:49:42 2013 +0000
----------------------------------------------------------------------
Makefile.def.buildbot | 1 +
run_clonedigger | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e9ad55a7/Makefile.def.buildbot
----------------------------------------------------------------------
diff --git a/Makefile.def.buildbot b/Makefile.def.buildbot
index 93aff55..f88ae0e 100644
--- a/Makefile.def.buildbot
+++ b/Makefile.def.buildbot
@@ -3,5 +3,6 @@ test: buildbot_test
buildbot_test:
./rebuild-all.bash
-[ ! -f $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn ] && ln -s /usr/lib64/python2.7/site-packages/pysvn $(VIRTUAL_ENV)/lib/python2.7/site-packages/
+ -[ ! -d $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info ] && mkdir $(VIRTUAL_ENV)/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info
ALLURA_VALIDATION=none ./run_tests
./run_clonedigger
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e9ad55a7/run_clonedigger
----------------------------------------------------------------------
diff --git a/run_clonedigger b/run_clonedigger
index 8ebfbce..58e8fdb 100755
--- a/run_clonedigger
+++ b/run_clonedigger
@@ -17,10 +17,11 @@ if [ "$TEST_MODULES" == "" ]; then
ForgeChat \
ForgeDiscussion \
ForgeGit \
- ForgeHg \
ForgeSVN \
ForgeTracker \
ForgeWiki \
+ ForgeActivity \
+ ForgeShortUrl \
"
fi
[31/46] git commit: [#5973] crazy pysvn hacking so that packaging
tools know it is in the venv
Posted by jo...@apache.org.
[#5973] crazy pysvn hacking so that packaging tools know it is in the venv
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/dcf934e0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/dcf934e0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/dcf934e0
Branch: refs/heads/cj/5879
Commit: dcf934e01089bc71a81939009abeb6145373e675
Parents: 1f9e46b
Author: Dave Brondsema <db...@geek.net>
Authored: Tue Mar 19 17:57:09 2013 -0700
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Apr 2 21:29:21 2013 +0000
----------------------------------------------------------------------
README.markdown | 3 ++-
vagrant/manifests/ubuntu-1204-server-amd64.pp | 5 +++++
2 files changed, 7 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dcf934e0/README.markdown
----------------------------------------------------------------------
diff --git a/README.markdown b/README.markdown
index bbd03cb..198a0f0 100644
--- a/README.markdown
+++ b/README.markdown
@@ -62,9 +62,10 @@ Although the application setup.py files define a number of dependencies, the `re
This will take a while. If you get an error from pip, it is typically a temporary download error. Just run the command again and it will quickly pass through the packages it already downloaded and then continue.
-Optional, for SVN support: symlink the system pysvn package into our virtual environment
+Optional, for SVN support: symlink the system pysvn package into our virtual environment and make packaging utilities know its there.
(anvil)~/src/allura$ ln -s /usr/lib/python2.7/dist-packages/pysvn ~/anvil/lib/python2.7/site-packages/
+ (anvil)~/src/allura$ mkdir ~/anvil/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info
And now to setup the Allura applications for development. If you want to setup all of them, run `./rebuild-all.bash`
If you only want to use a few tools, run:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/dcf934e0/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 d80e22a..6206350 100644
--- a/vagrant/manifests/ubuntu-1204-server-amd64.pp
+++ b/vagrant/manifests/ubuntu-1204-server-amd64.pp
@@ -102,6 +102,11 @@ file { '/home/vagrant/anvil/lib/python2.7/site-packages/pysvn':
target => '/usr/lib/python2.7/dist-packages/pysvn',
require => [ Package[ "python-svn" ], Exec[ "pip install" ]],
}
+# and trick pip/setuptools etc to know its there
+file { '/home/vagrant/anvil/lib/python2.7/site-packages/pysvn-1.7.5-py2.7.egg-info':
+ ensure => 'directory',
+ require => File['/home/vagrant/anvil/lib/python2.7/site-packages/pysvn'],
+}
# create SCM repo dirs
file { [ "/home/vagrant/scm", "/home/vagrant/scm/git", "/home/vagrant/scm/hg", "/home/vagrant/scm/svn" ]:
[46/46] git commit: [#5879] Fixed tests failing due to new commit in
test repo
Posted by jo...@apache.org.
[#5879] Fixed tests failing due to new commit in test repo
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/5eb6d368
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5eb6d368
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5eb6d368
Branch: refs/heads/cj/5879
Commit: 5eb6d368d458e45a69ed3d15d1d9a9bd1f18e3b9
Parents: 0531982
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Mar 28 21:35:51 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Apr 3 17:26:03 2013 +0000
----------------------------------------------------------------------
.../forgegit/tests/functional/test_controllers.py | 6 +++---
ForgeGit/forgegit/tests/model/test_repository.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5eb6d368/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 1c8e0df..5be4d01 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -81,14 +81,14 @@ class TestRootController(_TestCase):
def test_commit_browser_data(self):
resp = self.app.get('/src-git/commit_browser_data')
data = json.loads(resp.body);
- assert data['max_row'] == 3
+ assert data['max_row'] == 4
assert data['next_column'] == 1
assert_equal(data['built_tree']['df30427c488aeab84b2352bdf88a3b19223f9d7a'],
{u'url': u'/p/test/src-git/ci/df30427c488aeab84b2352bdf88a3b19223f9d7a/',
u'oid': u'df30427c488aeab84b2352bdf88a3b19223f9d7a',
u'column': 0,
u'parents': [u'6a45885ae7347f1cac5103b0050cc1be6a1496c8'],
- u'message': u'Add README', u'row': 1})
+ u'message': u'Add README', u'row': 2})
def test_log(self):
resp = self.app.get('/src-git/ci/1e146e67985dcd71c74de79613719bef7bddca4a/log/')
@@ -184,7 +184,7 @@ class TestRootController(_TestCase):
def test_refresh(self):
notification = M.Notification.query.find(
- dict(subject='[test:src-git] 4 new commits to test Git')).first()
+ dict(subject='[test:src-git] 5 new commits to test Git')).first()
domain = '.'.join(reversed(c.app.url[1:-1].split('/'))).replace('_', '-')
common_suffix = tg.config.get('forgemail.domain', '.sourceforge.net')
email = 'noreply@%s%s' % (domain, common_suffix)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5eb6d368/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 1102ee8..bce1a4f 100644
--- a/ForgeGit/forgegit/tests/model/test_repository.py
+++ b/ForgeGit/forgegit/tests/model/test_repository.py
@@ -56,7 +56,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'], [])
+ assert self.rev.symbolic_ids == (['master', 'zz'], [])
assert self.rev.url() == (
'/p/test/src-git/ci/'
'1e146e67985dcd71c74de79613719bef7bddca4a/')