Show More
@@ -15,7 +15,7 b' try:' | |||||
15 | from vcs.backends.hg import get_repositories, MercurialRepository |
|
15 | from vcs.backends.hg import get_repositories, MercurialRepository | |
16 | except ImportError: |
|
16 | except ImportError: | |
17 | print 'You have to import vcs module' |
|
17 | print 'You have to import vcs module' | |
18 | raise |
|
18 | raise Exception('Unable to import vcs') | |
19 |
|
19 | |||
20 | class HgModel(object): |
|
20 | class HgModel(object): | |
21 | """ |
|
21 | """ | |
@@ -37,7 +37,8 b' class HgModel(object):' | |||||
37 | continue |
|
37 | continue | |
38 |
|
38 | |||
39 | last_change = mercurial_repo.last_change |
|
39 | last_change = mercurial_repo.last_change | |
40 |
tip = mercurial_repo. |
|
40 | tip_rev = mercurial_repo._get_revision('tip') | |
|
41 | tip = mercurial_repo.get_changeset(tip_rev) | |||
41 | tmp_d = {} |
|
42 | tmp_d = {} | |
42 | tmp_d['name'] = mercurial_repo.name |
|
43 | tmp_d['name'] = mercurial_repo.name | |
43 | tmp_d['name_sort'] = tmp_d['name'] |
|
44 | tmp_d['name_sort'] = tmp_d['name'] | |
@@ -45,9 +46,9 b' class HgModel(object):' | |||||
45 | tmp_d['description_sort'] = tmp_d['description'] |
|
46 | tmp_d['description_sort'] = tmp_d['description'] | |
46 | tmp_d['last_change'] = last_change |
|
47 | tmp_d['last_change'] = last_change | |
47 | tmp_d['last_change_sort'] = last_change[1] - last_change[0] |
|
48 | tmp_d['last_change_sort'] = last_change[1] - last_change[0] | |
48 |
tmp_d['tip'] = |
|
49 | tmp_d['tip'] = tip._short | |
49 |
tmp_d['tip_sort'] = tip |
|
50 | tmp_d['tip_sort'] = tip_rev | |
50 |
tmp_d['rev'] = tip |
|
51 | tmp_d['rev'] = tip_rev | |
51 | tmp_d['contact'] = mercurial_repo.contact |
|
52 | tmp_d['contact'] = mercurial_repo.contact | |
52 | tmp_d['contact_sort'] = tmp_d['contact'] |
|
53 | tmp_d['contact_sort'] = tmp_d['contact'] | |
53 | tmp_d['repo_archives'] = list(mercurial_repo._get_archives()) |
|
54 | tmp_d['repo_archives'] = list(mercurial_repo._get_archives()) |
General Comments 0
You need to be logged in to leave comments.
Login now