Ticket #1994 (closed enhancement: fixed)
[PATCH] Sort files by version (like strverscmp(3) does)
Reported by: | bvk | Owned by: | slavazanko |
---|---|---|---|
Priority: | major | Milestone: | 4.7.1 |
Component: | mc-core | Version: | master |
Keywords: | panel sort | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description
Suppose we have 3 files with version in their names:
file-2.1.tgz
file-2.2.tgz
file-2.10.tgz
It is impossible to see them in natural order using standard facilities, they will be sorted in alphabet order:
file-2.1.tgz
file-2.10.tgz
file-2.2.tgz
There was some attempts to fix this. I've picked up the patch by Roland Illig <roland illig gmx de> (http://mail.gnome.org/archives/mc-devel/2004-July/msg00016.html) and adopted it for today's git snapshot. It adds "version" option to the sort menu, which uses copy of strverscmp function from glibc.
Attachments
Change History
comment:1 Changed 15 years ago by slavazanko
- Status changed from new to accepted
- Owner set to slavazanko
comment:2 Changed 15 years ago by slavazanko
- Keywords panel added
- Version changed from version not selected to master
- severity changed from no branch to on review
- Milestone changed from 4.7 to 4.7.1
Created branch 1994_sort_files_by_version
Initial changeset:099cf996942907213e52e5b5b48befd0db98e774
Review, please.
comment:4 Changed 15 years ago by andrew_b
I think we should use strverscmp(3) if possible. If there is no such function in target platform then use own implementation of strverscmp().
comment:5 Changed 15 years ago by andrew_b
- severity changed from on review to on rework
The height of 'Sort order' dialog window should be increased to provide one empty row between sort mode radiobuttons and main dialog buttons (OK and Cancel) for more nice view.
comment:6 Changed 15 years ago by slavazanko
- Votes for changeset slavazanko deleted
- severity changed from on rework to on review
- 3b3f864d1300e05d69109fafee8d570d7e6154b1: Height of 'Sort order' dialog window now calculated automatically
Review, please.
comment:8 Changed 15 years ago by angel_il
- Votes for changeset changed from iNode to iNode angel_il
- severity changed from on review to approved