Pylons==1.0.0
Beaker==1.6.3
WebHelpers==1.3
formencode==1.2.4
SQLAlchemy==0.7.6
Mako==0.7.0
pygments>=1.4
whoosh>=2.3.0,<2.4
celery>=2.2.5,<2.3
babel
python-dateutil>=1.5.0,<2.0.0
dulwich>=0.8.5,<0.9.0
webob==1.0.8
markdown==2.1.1
docutils==0.8.1
py-bcrypt
mercurial>=2.1,<2.2
\ No newline at end of file
mercurial>=2.2,<2.3
@@ -24,71 +24,71 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
import platform
VERSION = (1, 3, 5, 'b')
try:
from rhodecode.lib import get_current_revision
_rev = get_current_revision()
if _rev and len(VERSION) > 3:
VERSION += ('dev%s' % _rev[0],)
except ImportError:
pass
__version__ = ('.'.join((str(each) for each in VERSION[:3])) +
'.'.join(VERSION[3:]))
__dbversion__ = 5 # defines current db version for migrations
__platform__ = platform.system()
__license__ = 'GPLv3'
__py_version__ = sys.version_info
PLATFORM_WIN = ('Windows')
PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD', 'OpenBSD', 'SunOS')
requirements = [
"Pylons==1.0.0",
"Beaker==1.6.3",
"WebHelpers==1.3",
"formencode==1.2.4",
"SQLAlchemy==0.7.6",
"Mako==0.7.0",
"pygments>=1.4",
"whoosh>=2.3.0,<2.4",
"celery>=2.2.5,<2.3",
"babel",
"python-dateutil>=1.5.0,<2.0.0",
"dulwich>=0.8.5,<0.9.0",
"webob==1.0.8",
"markdown==2.1.1",
"docutils==0.8.1",
]
if __py_version__ < (2, 6):
requirements.append("simplejson")
requirements.append("pysqlite")
if __platform__ in PLATFORM_WIN:
requirements.append("mercurial>=2.1,<2.2")
requirements.append("mercurial>=2.2,<2.3")
else:
requirements.append("py-bcrypt")
def get_version():
"""Returns shorter version (digit parts only) as string."""
return '.'.join((str(each) for each in VERSION[:3]))
BACKENDS = {
'hg': 'Mercurial repository',
'git': 'Git repository',
}
CELERY_ON = False
# link to config for pylons
CONFIG = {}
# Linked module for extensions
EXTENSIONS = {}
@@ -80,55 +80,56 @@ class ChangelogController(BaseRepoContro
c.total_cs = len(c.rhodecode_repo)
c.pagination = RepoPage(collection, page=p, item_count=c.total_cs,
items_per_page=c.size, branch=branch_name)
collection = list(c.pagination)
page_revisions = [x.raw_id for x in collection]
c.comments = c.rhodecode_db_repo.comments(page_revisions)
except (RepositoryError, ChangesetDoesNotExistError, Exception), e:
log.error(traceback.format_exc())
h.flash(str(e), category='warning')
return redirect(url('home'))
self._graph(c.rhodecode_repo, collection, c.total_cs, c.size, p)
c.branch_name = branch_name
c.branch_filters = [('', _('All Branches'))] + \
[(k, k) for k in c.rhodecode_repo.branches.keys()]
return render('changelog/changelog.html')
def changelog_details(self, cs):
if request.environ.get('HTTP_X_PARTIAL_XHR'):
c.cs = c.rhodecode_repo.get_changeset(cs)
return render('changelog/changelog_details.html')
def _graph(self, repo, collection, repo_size, size, p):
"""
Generates a DAG graph for mercurial
:param repo: repo instance
:param size: number of commits to show
:param p: page number
if not collection:
c.jsdata = json.dumps([])
return
data = []
revs = [x.revision for x in collection]
if repo.alias == 'git':
for _ in revs:
vtx = [0, 1]
edges = [[0, 0, 1]]
data.append(['', vtx, edges])
elif repo.alias == 'hg':
c.dag = graphmod.colored(graphmod.dagwalker(repo._repo, revs))
dag = graphmod.dagwalker(repo._repo, revs)
c.dag = graphmod.colored(dag, repo._repo)
for (id, type, ctx, vtx, edges) in c.dag:
if type != graphmod.CHANGESET:
continue
c.jsdata = json.dumps(data)
Status change: