From c11d8d1d5859d8a763e97b5b31d416ea79d5cb73 Mon Sep 17 00:00:00 2001 From: Philippe Miossec Date: Wed, 16 Jan 2013 14:40:48 +0100 Subject: [PATCH 1/2] Order shelves by CreationDate by default --- GitTfs.VsCommon/TfsHelper.Common.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GitTfs.VsCommon/TfsHelper.Common.cs b/GitTfs.VsCommon/TfsHelper.Common.cs index 00fe7e623..fad652626 100644 --- a/GitTfs.VsCommon/TfsHelper.Common.cs +++ b/GitTfs.VsCommon/TfsHelper.Common.cs @@ -277,7 +277,7 @@ public int ListShelvesets(ShelveList shelveList, IGitTfsRemote remote) shelvesets = shelvesets.OrderBy(s => s.CreationDate); break; case "owner": - shelvesets = shelvesets.OrderBy(s => s.OwnerName); + shelvesets = shelvesets.OrderBy(s => s.OwnerName).ThenBy(s => s.CreationDate); break; case "name": shelvesets = shelvesets.OrderBy(s => s.Name); @@ -290,6 +290,9 @@ public int ListShelvesets(ShelveList shelveList, IGitTfsRemote remote) return GitTfsExitCodes.InvalidArguments; } } + else + shelvesets = shelvesets.OrderBy(s => s.CreationDate); + if (shelveList.FullFormat) WriteShelvesetsToStdoutDetailed(shelvesets); else From 438371b2c7a915da616ffee41cfa0040a3a44b54 Mon Sep 17 00:00:00 2001 From: Philippe Miossec Date: Wed, 16 Jan 2013 14:47:38 +0100 Subject: [PATCH 2/2] better use the few column space we have --- GitTfs.VsCommon/TfsHelper.Common.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GitTfs.VsCommon/TfsHelper.Common.cs b/GitTfs.VsCommon/TfsHelper.Common.cs index fad652626..596f74686 100644 --- a/GitTfs.VsCommon/TfsHelper.Common.cs +++ b/GitTfs.VsCommon/TfsHelper.Common.cs @@ -304,7 +304,7 @@ private void WriteShelvesetsToStdout(IEnumerable shelvesets) { foreach (var shelveset in shelvesets) { - _stdout.WriteLine(" {0,-20} {1,-20}", shelveset.OwnerName, shelveset.Name); + _stdout.WriteLine("{0,-22} {1,-20}", shelveset.OwnerName, shelveset.Name); } }