Opened 17 years ago
Last modified 15 months ago
#5549 new defect
Improve diff message "no files"
Reported by: | Emmanuel Blot | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | next-stable-1.6.x |
Component: | version control/changeset view | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
When a changeset contains only minor modifications (blank line, whitespace changes …) and the matching "ignore" checkboxes are selected, Trac outputs a confusing message:
(No files)
whereas the actual message should be something like "(No visible changes)", as the changeset does contain files, but the selected diff options lead to an empty diff.
This is confusing especially as Trac conveniently keeps track of the user diff preferences from one diff to another - which implies that a user can get a "(No files)" message as soon as he wants a diff.
Attachments (1)
Change History (22)
comment:1 by , 17 years ago
Keywords: | patch added |
---|
comment:2 by , 17 years ago
Milestone: | → 0.11.1 |
---|
comment:3 by , 17 years ago
Any reason why this cannot just be committed? The new text provides good information, both for whitespace and hidden properties that can make a changset appear completely empty.
comment:5 by , 17 years ago
Actually, that did not turn out so nice with regards to formatting. There is only room for 1-2 words, so it breaks a line and just looks a bit out of place on the side of the page.
Alternative proposal:
-
trac/versioncontrol/templates/changeset.html
135 135 <dt class="property location">Location:</dt> 136 136 <dd class="searchable"><a href="${req.href.browser(location, rev=new_rev)}">$location</a></dd> 137 137 </py:if> 138 <dt class="property files"> ${files and 'Files:' or '(No files)'}</dt>138 <dt class="property files">Files:</dt> 139 139 <dd class="files"> 140 <py:if test="not files">No files with visible changes.</py:if> 140 141 <div class="legend" id="file-legend" py:if="filestats"> 141 142 <dl> 142 143 <py:if test="filestats['add']"><dt class="add"></dt><dd>${filestats['add']} added</dd></py:if>
I basically renders:
Files: No files with visible changes.
That will also give better space for future l10n messages that might need more room.
Only question: Any reason why it should not render correctly being placed inside the <dd>
tag? Any circumstance where it will not be alone, or why we can't have just text instead of the ususal lists?
comment:6 by , 17 years ago
That latest change is better. Still, I think that for "perfect" clarity we should make clear whether the list of files is empty because there's no files in the changeset or no visible change according to the current diff options.
I'm OK for committing the intermediate improvement of comment:5, but maybe leave the ticket open for 0.11.1 as a reminder to implement the above.
comment:7 by , 17 years ago
When testing this, I found that even property changes rendered as a file. I was not able to think of anything (using Subversion) that could make a change without listing some file - ie. in all circumstances it was diff options that made this list appear.
Perhaps with other versioncontrol systems? Could there be circumstances with full diff that as change is made that has no file references? The versioncontrol code is really not what I know best…
comment:8 by , 17 years ago
Well, the situations I had in mind for the no files were admittedly corner cases.
The first was when a property change is hidden on purpose ([browser] hide_properties
), e.g. r5705.
The second situation was root property change. But in this case we generate a pseudo-"(root)" file entry.
So the only confusing situation would be r5705, as there's no way a change of diff options will make that prop change visible.
I'll attach a patch shortly that would instead render this minimal information about the hidden property change:
by , 17 years ago
Attachment: | minimal-hidden_properties-diff-rendering.patch added |
---|
Show at least Property xyz changed for a change of a hidden property, so that there's at least one file entry in the Files: list.
comment:9 by , 17 years ago
Ah, and of course, besides the above corner cases that are now addressed, there's one more situation to think about: changesets restricted on a path outside of the scope of the changeset, e.g. [6334/sandbox]. In this case, it's a legitimate (No files).
follow-up: 11 comment:10 by , 17 years ago
are there also changesets that could be empty due to permission settings, ie, you don't have permission to see the changed files?
comment:11 by , 17 years ago
Replying to anonymous:
are there also changesets that could be empty due to permission settings, ie, you don't have permission to see the changed files?
Yes. Both regular permissions, and I Just configured a project today myself where anonymous has CHANGESET_VIEW
for seeing changesets in Timeline and reading log messages, but no FILE_VEW
permissions to see the changed files. That will actually list (No files.) for all changesets.
follow-up: 13 comment:12 by , 17 years ago
Milestone: | 0.11 → 0.12 |
---|---|
Severity: | minor → normal |
This issue is less trivial than it seemed at first. I think we should keep the (No files) for now and improve that message once with the correct information later on:
- "(No files)" when this is effectively a changeset without files (i.e. property changes only)
- "(No files in the restricted scope)" when there are files in the changeset but outside of the restricted path
- "(No visible changes)" when there should be files but there's no changes to show because of the current diff options
- more?
comment:13 by , 16 years ago
Replying to cboos:
This issue is less trivial than it seemed at first. I think we should keep the (No files) for now and improve that message once with the correct information later on:
The current implementation is unsettling for the end user.
If a changeset only contains property change(s):
- the diff view shows "(No files)" - and nothing more, while
- the changeset view shows the actual property change (with the property name and value)
comment:14 by , 16 years ago
Milestone: | 0.13 → 0.12 |
---|
comment:15 by , 15 years ago
Milestone: | 0.12 → next-minor-0.12.x |
---|
comment:16 by , 14 years ago
Keywords: | patch removed |
---|
Removing keyword, as there's no patch currently meeting the requirements.
comment:17 by , 10 years ago
Milestone: | next-minor-0.12.x → next-stable-1.0.x |
---|
comment:18 by , 10 years ago
Owner: | removed |
---|
comment:19 by , 8 years ago
Milestone: | next-stable-1.0.x → next-stable-1.2.x |
---|
Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.
comment:20 by , 5 years ago
Milestone: | next-stable-1.2.x → next-stable-1.4.x |
---|
Simple patch to fix this issue:
trac/versioncontrol/templates/changeset.html
files)'}</dt>