Opened 8 years ago
Closed 8 years ago
#12655 closed defect (fixed)
BrowserModule displays wrong author in SVN keywords on HEAD Revision
Reported by: | Owned by: | Jun Omae | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.14 |
Component: | version control | Version: | 1.2 |
Severity: | normal | Keywords: | svn:keywords |
Cc: | Branch: | ||
Release Notes: |
Fixed substitution for author in svn:keywords. |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
Hello,
I'm responsible for the Trac environment located at https://svn.fhem.de/trac/
We're using only the BrowserModule to display our SVN repository.
The $Id$ replacement always contains the wrong author when opening the file content in HEAD revision.
Example: The following file was last modified by me (markusbloch) at revision 11987, but the displayed author in $Id$ contains the author name of the latest revision HEAD and not revision 11987 (were this file was last modified)
my file: https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/98_version.pm HEAD author: https://svn.fhem.de/trac/changeset/HEAD/
Only when explicitly selecting my file at revision 11987, the author is displayed correctly: https://svn.fhem.de/trac/browser/trunk/fhem/FHEM/98_version.pm?rev=11987
So when browing the repository, all files were displayed by Trac with the author name of the latest commit (HEAD) no matter if the file was modified during the latest commit or not.
This problem also occurs when using the ZIP download functionality for trunk. All files contains $Id$ with the author of the latest commit.
Our project relies on correct $Id$ replacement, because we have about 60 developers, were each is commiting changes to specific files only. The developed application uses the author names from $Id$.
The problem could be verified on Trac 1.0.2 (used at svn.fhem.de) and latest Trac 1.2 (virtual machine on my laptop)
Please use the correct author name of the last change revision per file and not the author name of HEAD revision.
Please let me know, if I can help you.
Kind Regards
Markus Bloch
Attachments (2)
Change History (10)
comment:2 by , 8 years ago
Description: | modified (diff) |
---|
follow-up: 4 comment:3 by , 8 years ago
Description: | modified (diff) |
---|---|
Keywords: | svn:keywords added; svn browser author removed |
Milestone: | undecided → next-stable-1.0.x |
Replying to markusbloch@…:
I wanted to attach some screenshots for clarification but your Trac (trac.edgewall.org) raises an error when click on file upload.
That's #11184. Please try to upload with English language.
comment:4 by , 8 years ago
Replying to Jun Omae:
Replying to markusbloch@…:
I wanted to attach some screenshots for clarification but your Trac (trac.edgewall.org) raises an error when click on file upload.
That's #11184. Please try to upload with English language.
Thank you, now it works. I attached the mentioned screenshots.
follow-up: 6 comment:5 by , 8 years ago
Could you please try the following patch?
-
tracopt/versioncontrol/svn/svn_fs.py
diff --git a/tracopt/versioncontrol/svn/svn_fs.py b/tracopt/versioncontrol/svn/svn_fs.py index 44ddab4c4..76ea19416 100644
a b class FileContentStream(object): 1206 1206 return self._read_substitute(self.stream, n) 1207 1207 1208 1208 def _get_revprop(self, name): 1209 return fs.revision_prop(self.fs_ptr, self.node.rev, name, self.pool()) 1209 return fs.revision_prop(self.fs_ptr, self.node.created_rev, name, 1210 self.pool()) 1210 1211 1211 1212 def _split_keywords(self, keywords): 1212 1213 return filter(None, self.KEYWORD_SPLIT_RE.split(keywords or ''))
comment:6 by , 8 years ago
Replying to Jun Omae:
Could you please try the following patch?
tracopt/versioncontrol/svn/svn_fs.py
diff --git a/tracopt/versioncontrol/svn/svn_fs.py b/tracopt/versioncontrol/svn/svn_fs.py index 44ddab4c4..76ea19416 100644
a b class FileContentStream(object): 1206 1206 return self._read_substitute(self.stream, n) 1207 1207 1208 1208 def _get_revprop(self, name): 1209 return fs.revision_prop(self.fs_ptr, self.node.rev, name, self.pool()) 1209 return fs.revision_prop(self.fs_ptr, self.node.created_rev, name, 1210 self.pool()) 1210 1211 1211 1212 def _split_keywords(self, keywords): 1212 1213 return filter(None, self.KEYWORD_SPLIT_RE.split(keywords or ''))
I applied the patch and it works now perfectly, thanks a lot.
comment:7 by , 8 years ago
Milestone: | next-stable-1.0.x → 1.0.14 |
---|---|
Owner: | set to |
Status: | new → assigned |
Thanks for the feedback! I'll apply it with unit tests to 1.0-stable branch.
comment:8 by , 8 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in [15342] and merged in [15343-15344].
I wanted to attach some screenshots for clarification but your Trac (trac.edgewall.org) raises an error when click on file upload.