mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-06 12:20:56 +01:00
Sort hg files
This commit is contained in:
@@ -153,7 +153,8 @@ class File_Walker:
|
||||
return path
|
||||
|
||||
def walk(self, structure, parent = ""):
|
||||
for key, value in structure.iteritems():
|
||||
sortedItems = sorted(structure.iteritems(), key = lambda item: item[1])
|
||||
for key, value in sortedItems:
|
||||
if key == FILE_MARKER:
|
||||
if value:
|
||||
for v in value:
|
||||
|
||||
@@ -190,7 +190,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase {
|
||||
|
||||
Collection<FileObject> foList = root.getChildren();
|
||||
|
||||
assertThat(foList).extracting("name").containsExactlyInAnyOrder("a.txt", "b.txt");
|
||||
assertThat(foList).extracting("name").containsExactlyInAnyOrder("c", "a.txt");
|
||||
assertThat(root.isTruncated()).isTrue();
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase {
|
||||
|
||||
Collection<FileObject> foList = root.getChildren();
|
||||
|
||||
assertThat(foList).extracting("name").containsExactlyInAnyOrder("c", "f.txt");
|
||||
assertThat(foList).extracting("name").containsExactlyInAnyOrder("b.txt", "f.txt");
|
||||
assertThat(root.isTruncated()).isFalse();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user