Skip to content

Commit

Permalink
Merge pull request git-tfs#294 from pmiossec/better_shelve-list_display
Browse files Browse the repository at this point in the history
Better shelve list display
  • Loading branch information
sc68cal committed Jan 21, 2013
2 parents ea98a4a + 438371b commit 779bae8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions GitTfs.VsCommon/TfsHelper.Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -301,7 +304,7 @@ private void WriteShelvesetsToStdout(IEnumerable<Shelveset> 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);
}
}

Expand Down

0 comments on commit 779bae8

Please sign in to comment.