#2685 closed defect (wontfix)
shortrev_len does not work
Reported by: | Owned by: | Herbert Valerio Riedel | |
---|---|---|---|
Priority: | normal | Component: | GitPlugin |
Severity: | normal | Keywords: | |
Cc: | lkraav, Ronnie Maor, Sigurd Hogsbro | Trac Release: | 0.12 |
Description
Trac-0.11b1 and gitplugin (3275). no matter how I set shortrev_len rev sha remain 40 caracter long
Attachments (6)
Change History (23)
comment:1 Changed 15 years ago by
comment:2 Changed 14 years ago by
I'd like to use this feature too, but it doesn't work with GitPlugin trunk and Trac 0.11.3.
comment:4 Changed 14 years ago by
same here
GitPlugin (the latest)
Trac 0.12multirepos-r8178
git 1.6.2.4
comment:5 Changed 14 years ago by
Same here. This is so annoying that it (a) clutters the code browser and I can't read the commit messages and (b) it keeps me switching from Redmine (which I would really like to do ;-) ).
comment:6 follow-ups: 7 15 Changed 14 years ago by
shortrev_len
works as designed; however, there seems to be some
confusion as to what it does: it configures the length of the
shortened revision number displayed in things like the diff (column
heads) and the annotated file view (revision for each line).
I'm attaching three patches, the second one of which does the main job
of adding a new rev_len
option which controls the length of all
revisions displayed (except for those covered by shortrev). This also
makes trac recognize shortened revs in the wiki syntax. The third
patch adds support for recognizing the r<rev> wiki syntax too. The
patches must be applied in the order I'm attaching them.
Changed 14 years ago by
Attachment: | pass_repo.patch added |
---|
A small preparatory change (same patch as in #5351)
Changed 14 years ago by
Attachment: | rev_len.patch added |
---|
Add rev_len
config option and shorten all displayed revisions to that length
comment:7 Changed 14 years ago by
Replying to roadrunner:
I'm attaching three patches, the second one of which does the main job of adding a new
rev_len
option which controls the length of all revisions displayed (except for those covered by shortrev). This also makes trac recognize shortened revs in the wiki syntax. The third patch adds support for recognizing the r<rev> wiki syntax too. The patches must be applied in the order I'm attaching them.
any reason why these patches haven't been merged? i'm reluctant to patch my installation (it's enough dealing with the python2.4 compatibility patch...)
just asking...
comment:8 Changed 13 years ago by
Cc: | lkraav added; anonymous removed |
---|
cc-ing, looking to get this fixed too.
Changed 13 years ago by
Attachment: | svn_mapping.patch added |
---|
patch for supporting existing svn wiki references
comment:9 Changed 13 years ago by
I'm working on migrating our company from svn to git. I applied the patches above, and they are a great improvement.
Since we're migrating and not starting a new project, we have quite a bit of history in tickets etc. that points to changesets using their svn revision number, and it would be a shame to lose that functionality after the conversion.
I'm attaching a patch that allows you to configure an svn revision mapping file that maps svn revisions to git revisions (easy to get it with git svn find-rev or going over the git log after importing from svn). The plugin then treats old svn wiki references as if they were pointing to the new git SHAs.
hope others find this useful and/or that you can include this patch too (I tried to keep to the coding conventions...)
comment:10 Changed 13 years ago by
Cc: | Ronnie Maor added |
---|
Changed 13 years ago by
Attachment: | rev_mapping.py added |
---|
script for generating svn_mapping file for the svn_mapping patch
Changed 13 years ago by
Attachment: | rev_len_0.12.patch added |
---|
Use Trac 0.12's display_rev feature to shorten SHAs in the UI (also includes the rXYZ linking patch)
comment:12 follow-up: 14 Changed 13 years ago by
For anyone who has upgraded to Trac 0.12, I've attached a patch that uses the new display_rev functionality from #T3533 to shorten SHAs. Rather than introducing a new variable, it just uses shortrev_len. The patch also includes the minor change to make parsing rXYZ as a link, but it's slightly buggy in multiple repository tracs.
comment:13 Changed 13 years ago by
Cc: | Sigurd Hogsbro added |
---|
comment:14 Changed 13 years ago by
Replying to bash:
For anyone who has upgraded to Trac 0.12, I've attached a patch that uses the new display_rev functionality from #T3533 to shorten SHAs. Rather than introducing a new variable, it just uses shortrev_len. The patch also includes the minor change to make parsing rXYZ as a link, but it's slightly buggy in multiple repository tracs.
I've integrated and enhanced your suggestions in
3551f77861d14314771400ed2ee68c425d80e5b7 and 23afc8ee8908bf4ae0da38d78604d85b5736539e
N.b.: I do introduce a new separate config option for configuring the wiki syntax hex-string min-length, wiki_shortrev_len
.
comment:15 Changed 13 years ago by
Replying to roadrunner:
I'm attaching three patches, the second one of which does the main job of adding a new
rev_len
option which controls the length of all revisions displayed (except for those covered by shortrev).
I'm wondering whether we want to have two different displayed length, or if the implementation I just committed is good enough for everybody? :)
comment:16 Changed 13 years ago by
Status: | new → assigned |
---|---|
Trac Release: | 0.11 → 0.12 |
comment:17 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
GitPlugin is deprecated. Please upgrade to Trac 1.0 and use TracGit.
I took a glance at this too with 0.10, 0.11b1, and trunk (with the respective plugins from t-h) and it looks the same to me on a very simple git db (or whatever you call it). Adding some print statements seems to indicate that short_rev is only called for displaying the changeset page, but that might be be clouded by the cache.