|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST] mg-list-all-branches: Sort branches according to any embedded version
Many of our branches include a version number, this change results in
e.g. linux-3.0 < linux-3.4 < linux-3.10 rather than linux-3.0 <
linux-3.10 < linux-3.4, which is more natural for uses such as
./mg-all-branch-statuses.
Requires Sort::Versions (Debian package libsort-versions-perl).
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
mg-list-all-branches | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mg-list-all-branches b/mg-list-all-branches
index c968a99..1549f81 100755
--- a/mg-list-all-branches
+++ b/mg-list-all-branches
@@ -3,6 +3,7 @@
# mentioned in cr-daily-branch or crontab
use strict;
+use Sort::Versions;
our %branches;
@@ -15,4 +16,4 @@ foreach my $f (qw(cr-for-branches crontab)) {
close C or die $!;
}
-print $_,"\n" or die $! foreach sort keys %branches;
+print $_,"\n" or die $! foreach sort { versioncmp($a, $b) } keys %branches;
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |