# HG changeset patch # User Marcin Kuzminski # Date 1285705558 0 # Node ID d945c95ba4ac48609a3301f6627b04222af2e288 # Parent 0fce1f9e4dcef14e4e376244e4128e81878de731 refactoring for new vcs implementation renamed all ._short and .raw_id into .short_id updated dependency for vcs to 0.1.6 diff -r 0fce1f9e4dce -r d945c95ba4ac celeryconfig.py --- a/celeryconfig.py Tue Sep 28 20:14:16 2010 +0000 +++ b/celeryconfig.py Tue Sep 28 20:25:58 2010 +0000 @@ -4,7 +4,7 @@ import ConfigParser root = os.getcwd() -PYLONS_CONFIG_NAME = 'development.ini' +PYLONS_CONFIG_NAME = 'production.ini' sys.path.append(root) config = ConfigParser.ConfigParser({'here':root}) diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/controllers/changeset.py --- a/pylons_app/controllers/changeset.py Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/controllers/changeset.py Tue Sep 28 20:25:58 2010 +0000 @@ -65,7 +65,7 @@ diff = differ.DiffProcessor(f_udiff).as_html() cs1 = None - cs2 = node.last_changeset.raw_id + cs2 = node.last_changeset.short_id c.changes.append(('added', node, diff, cs1, cs2)) for node in c.changeset.changed: @@ -76,8 +76,8 @@ f_udiff = differ.get_udiff(filenode_old, node) diff = differ.DiffProcessor(f_udiff).as_html() - cs1 = filenode_old.last_changeset.raw_id - cs2 = node.last_changeset.raw_id + cs1 = filenode_old.last_changeset.short_id + cs2 = node.last_changeset.short_id c.changes.append(('changed', node, diff, cs1, cs2)) for node in c.changeset.removed: @@ -110,7 +110,7 @@ diff = differ.DiffProcessor(f_udiff).raw_diff() cs1 = None - cs2 = node.last_changeset.raw_id + cs2 = node.last_changeset.short_id c.changes.append(('added', node, diff, cs1, cs2)) for node in c.changeset.changed: @@ -121,8 +121,8 @@ f_udiff = differ.get_udiff(filenode_old, node) diff = differ.DiffProcessor(f_udiff).raw_diff() - cs1 = filenode_old.last_changeset.raw_id - cs2 = node.last_changeset.raw_id + cs1 = filenode_old.last_changeset.short_id + cs2 = node.last_changeset.short_id c.changes.append(('changed', node, diff, cs1, cs2)) response.content_type = 'text/plain' diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/controllers/feed.py --- a/pylons_app/controllers/feed.py Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/controllers/feed.py Tue Sep 28 20:25:58 2010 +0000 @@ -54,7 +54,7 @@ for cs in changesets[:self.feed_nr]: feed.add_item(title=cs.message, link=url('changeset_home', repo_name=repo_name, - revision=cs.raw_id, qualified=True), + revision=cs.short_id, qualified=True), description=str(cs.date)) response.content_type = feed.mime_type @@ -73,7 +73,7 @@ for cs in changesets[:self.feed_nr]: feed.add_item(title=cs.message, link=url('changeset_home', repo_name=repo_name, - revision=cs.raw_id, qualified=True), + revision=cs.short_id, qualified=True), description=str(cs.date)) response.content_type = feed.mime_type diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/controllers/files.py --- a/pylons_app/controllers/files.py Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/controllers/files.py Tue Sep 28 20:25:58 2010 +0000 @@ -68,8 +68,8 @@ try: cur_rev = repo.get_changeset(revision).revision - prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).raw_id - next_rev = repo.get_changeset(get_next_rev(cur_rev)).raw_id + prev_rev = repo.get_changeset(get_prev_rev(cur_rev)).short_id + next_rev = repo.get_changeset(get_next_rev(cur_rev)).short_id c.url_prev = url('files_home', repo_name=c.repo_name, revision=prev_rev, f_path=f_path) @@ -78,7 +78,7 @@ c.changeset = repo.get_changeset(revision) - c.cur_rev = c.changeset.raw_id + c.cur_rev = c.changeset.short_id c.rev_nr = c.changeset.revision c.files_list = c.changeset.get_node(f_path) c.file_history = self._get_history(repo, c.files_list, f_path) @@ -111,7 +111,7 @@ cs = c.repo.get_changeset(revision) c.file = cs.get_node(f_path) c.file_msg = cs.get_file_message(f_path) - c.cur_rev = cs.raw_id + c.cur_rev = cs.short_id c.rev_nr = cs.revision c.f_path = f_path @@ -171,8 +171,8 @@ return redirect(url('files_home', repo_name=c.repo_name, f_path=f_path)) - c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1.raw_id) - c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2.raw_id) + c.diff1 = 'r%s:%s' % (c.changeset_1.revision, c.changeset_1.short_id) + c.diff2 = 'r%s:%s' % (c.changeset_2.revision, c.changeset_2.short_id) f_udiff = differ.get_udiff(node1, node2) diff = differ.DiffProcessor(f_udiff) @@ -202,6 +202,6 @@ changesets = node.history hist_l = [] for chs in changesets: - n_desc = 'r%s:%s' % (chs.revision, chs._short) - hist_l.append((chs._short, n_desc,)) + n_desc = 'r%s:%s' % (chs.revision, chs.short_id) + hist_l.append((chs.short_id, n_desc,)) return hist_l diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/lib/helpers.py --- a/pylons_app/lib/helpers.py Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/lib/helpers.py Tue Sep 28 20:25:58 2010 +0000 @@ -271,12 +271,12 @@ changeset.date, tooltip(changeset.message)) lnk_format = 'r%-5s:%s' % (changeset.revision, - changeset.raw_id) + changeset.short_id) uri = link_to( lnk_format, url('changeset_home', repo_name=changeset.repository.name, - revision=changeset.raw_id), - style=get_color_string(changeset.raw_id), + revision=changeset.short_id), + style=get_color_string(changeset.short_id), class_='tooltip', tooltip_title=tooltip_html ) diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/model/hg_model.py --- a/pylons_app/model/hg_model.py Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/model/hg_model.py Tue Sep 28 20:25:58 2010 +0000 @@ -155,7 +155,7 @@ tmp_d['description_sort'] = tmp_d['description'] tmp_d['last_change'] = last_change tmp_d['last_change_sort'] = last_change[1] - last_change[0] - tmp_d['tip'] = tip.raw_id + tmp_d['tip'] = tip.short_id tmp_d['tip_sort'] = tip.revision tmp_d['rev'] = tip.revision tmp_d['contact'] = repo.contact diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/branches/branches_data.html --- a/pylons_app/templates/branches/branches_data.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/branches/branches_data.html Tue Sep 28 20:25:58 2010 +0000 @@ -9,17 +9,17 @@ %for cnt,branch in enumerate(c.repo_branches.items()): ${h.age(branch[1]._ctx.date())} - r${branch[1].revision}:${branch[1].raw_id} + r${branch[1].revision}:${branch[1].short_id} ${h.link_to(branch[0], - h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))} + h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].short_id))} - ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id))} + ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].short_id))} | - ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].raw_id))} + ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch[1].short_id))} %endfor diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/changelog/changelog.html --- a/pylons_app/templates/changelog/changelog.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/changelog/changelog.html Tue Sep 28 20:25:58 2010 +0000 @@ -46,7 +46,7 @@ %for cnt,cs in enumerate(c.pagination):
-
${_('commit')} ${cs.revision}: ${cs.raw_id}@${cs.date}
+
${_('commit')} ${cs.revision}: ${cs.short_id}@${cs.date}
${cs.branch} %for tag in cs.tags: @@ -62,7 +62,7 @@
${h.link_to(h.wrap_paragraphs(cs.message), - h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} + h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id))}
@@ -77,8 +77,8 @@
%endif %for p_cs in reversed(cs.parents): -
${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.raw_id, - h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} +
${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.short_id, + h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.short_id),title=p_cs.message)}
%endfor
diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/changeset/changeset.html --- a/pylons_app/templates/changeset/changeset.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/changeset/changeset.html Tue Sep 28 20:25:58 2010 +0000 @@ -9,7 +9,7 @@ » ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} » - ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.raw_id} + ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.short_id} <%def name="page_nav()"> @@ -26,11 +26,11 @@
- ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.raw_id} + ${_('Changeset')} - r${c.changeset.revision}:${c.changeset.short_id} » ${h.link_to(_('raw diff'), - h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))} + h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.short_id,diff='show'))} » ${h.link_to(_('download diff'), - h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))} + h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.short_id,diff='download'))}
@@ -56,8 +56,8 @@ %endif %for p_cs in reversed(c.changeset.parents): -
${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.raw_id, - h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)} +
${_('Parent')} ${p_cs.revision}: ${h.link_to(p_cs.short_id, + h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.short_id),title=p_cs.message)}
%endfor
@@ -78,7 +78,7 @@
${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name, - revision=filenode.changeset.raw_id,f_path=filenode.path))} + revision=filenode.changeset.short_id,f_path=filenode.path))} %if 1: » ${h.link_to(_('diff'), diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/files/files_annotate.html --- a/pylons_app/templates/files/files_annotate.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/files/files_annotate.html Tue Sep 28 20:25:58 2010 +0000 @@ -26,8 +26,8 @@

${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cur_rev,c.file.path)}

${_('Last revision')}
-
${h.link_to("r%s:%s" % (c.file.last_changeset.revision,c.file.last_changeset._short), - h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset._short,f_path=c.f_path))}
+
${h.link_to("r%s:%s" % (c.file.last_changeset.revision,c.file.last_changeset.short_id), + h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file.last_changeset.short_id,f_path=c.f_path))}
${_('Size')}
${h.format_byte_size(c.file.size,binary=True)}
${_('Mimetype')}
@@ -43,7 +43,7 @@
-
${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset._short}
+
${c.file.name}@r${c.file.last_changeset.revision}:${c.file.last_changeset.short_id}
"${c.file_msg}"
diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/files/files_source.html --- a/pylons_app/templates/files/files_source.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/files/files_source.html Tue Sep 28 20:25:58 2010 +0000 @@ -1,8 +1,8 @@
${_('Last revision')}
- ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset._short), - h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset._short,f_path=c.f_path))} + ${h.link_to("r%s:%s" % (c.files_list.last_changeset.revision,c.files_list.last_changeset.short_id), + h.url('files_home',repo_name=c.repo_name,revision=c.files_list.last_changeset.short_id,f_path=c.f_path))}
${_('Size')}
${h.format_byte_size(c.files_list.size,binary=True)}
@@ -20,8 +20,8 @@
${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')} - ${h.hidden('diff2',c.files_list.last_changeset._short)} - ${h.select('diff1',c.files_list.last_changeset._short,c.file_history)} + ${h.hidden('diff2',c.files_list.last_changeset.short_id)} + ${h.select('diff1',c.files_list.last_changeset.short_id,c.file_history)} ${h.submit('diff','diff to revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} ${h.submit('show_rev','show at revision',class_="ui-button ui-widget ui-state-default ui-corner-all")} ${h.end_form()} @@ -32,7 +32,7 @@
-
${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}
+
${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset.short_id}
"${c.files_list.last_changeset.message}"
diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/shortlog/shortlog_data.html --- a/pylons_app/templates/shortlog/shortlog_data.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/shortlog/shortlog_data.html Tue Sep 28 20:25:58 2010 +0000 @@ -15,10 +15,10 @@ ${h.age(cs._ctx.date())} - ${h.rfc822date_notz(cs._ctx.date())} ${h.person(cs.author)} - r${cs.revision}:${cs.raw_id} + r${cs.revision}:${cs.short_id} ${h.link_to(h.truncate(cs.message,60), - h.url('changeset_home',repo_name=c.repo_name,revision=cs._short), + h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id), title=cs.message)} @@ -34,9 +34,9 @@ - ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} + ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=cs.short_id))} | - ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))} + ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=cs.short_id))} %endfor diff -r 0fce1f9e4dce -r d945c95ba4ac pylons_app/templates/tags/tags_data.html --- a/pylons_app/templates/tags/tags_data.html Tue Sep 28 20:14:16 2010 +0000 +++ b/pylons_app/templates/tags/tags_data.html Tue Sep 28 20:25:58 2010 +0000 @@ -9,17 +9,17 @@ %for cnt,tag in enumerate(c.repo_tags.items()): ${h.age(tag[1]._ctx.date())} - r${tag[1].revision}:${tag[1].raw_id} + r${tag[1].revision}:${tag[1].short_id} ${h.link_to(tag[0], - h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))} + h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].short_id))} - ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))} + ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].short_id))} | - ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].raw_id))} + ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag[1].short_id))} %endfor diff -r 0fce1f9e4dce -r d945c95ba4ac setup.py --- a/setup.py Tue Sep 28 20:14:16 2010 +0000 +++ b/setup.py Tue Sep 28 20:25:58 2010 +0000 @@ -20,7 +20,7 @@ "SQLAlchemy>=0.6", "babel", "Mako>=0.3.2", - "vcs>=0.1.5", + "vcs>=0.1.6", "pygments>=1.3.0", "mercurial>=1.6", "pysqlite",