#10652 closed enhancement (fixed)
[Patch] Suppress repeated file changes for collapsed changesets on timeline
Reported by: | Mikael Relbe | Owned by: | Mikael Relbe |
---|---|---|---|
Priority: | normal | Milestone: | 1.0 |
Component: | timeline | Version: | 0.13dev |
Severity: | normal | Keywords: | patch |
Cc: | Branch: | ||
Release Notes: |
Collapsed changesets in timeline won't show duplicated modified file entries. |
||
API Changes: | |||
Internal Changes: |
Description
Repeated changes of a file causes it to be reported repeatedly within a collapsed changeset event on the timeline when trac.ini is configured like this:
[timeline] changeset_collapse_events = true changeset_show_files = -1
Example of timeline event report:
8:57 Changesets [1-4] (edit) test/text.txt (edit) test/text.txt (edit) test/text.txt (add) test/text.txt
This ticket suggests that identical file changes within a collapsed changeset event are suppressed.
The example above would then become:
8:57 Changesets [1-4] (edit) test/text.txt (add) test/text.txt
Attachments (2)
Change History (16)
by , 13 years ago
Attachment: | t10652-suppress-files-11028.patch added |
---|
by , 13 years ago
Attachment: | t10652-suppress-files-11028.2.patch added |
---|
use set instead of list for filter
comment:2 by , 13 years ago
The supplied patch t10652-suppress-files-11028.2.patch might be rough, but does the job. (Long time since I contributed here, I'm therefore a bit rusty.)
comment:3 by , 13 years ago
Summary: | Suppress repeated file changes for collapsed changesets on timeline → [Patch] Suppress repeated file changes for collapsed changesets on timeline |
---|
comment:4 by , 13 years ago
Keywords: | patch added |
---|
comment:7 by , 12 years ago
Replying to rblank:
Should the entries be sorted after de-duping?
The patch does not affect the order, but sorted entries would be prefered I think (I don't remember if the default behaviour is sorted entries or not).
follow-up: 10 comment:8 by , 12 years ago
Milestone: | 1.0-triage → 1.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
The files from get_changes()
are sorted, at least for svn, hg and git.
I tested the patch a while ago and it was working fine.
Committed as r11069, thanks!
comment:9 by , 12 years ago
Owner: | set to |
---|
comment:10 by , 12 years ago
Replying to cboos:
The files from
get_changes()
are sorted, at least for svn, hg and git.
They are sorted within a changeset, but not across changesets. For example, if you have two changesets with the same message:
[123]
- zzz/file.txt
[124]
- aaa/file.txt
Then the collapsed event will be:
[123-124]
- zzz/file.txt
- aaa/file.txt
How about sorting by (filename, event_type) before adding the elements to the list?
comment:11 by , 12 years ago
Ah well, you're right.
Looking for "unique sort python" led me to so:479897 → sorted(set(myList))
. Given we already have the set, we could just sort it.
Follow-up: repos:cboos.git:t10652/suppress-files.2
comment:14 by , 12 years ago
Release Notes: | modified (diff) |
---|
patch to be applied on r11028