Make the diffs absolute and sort them.

This commit is contained in:
yackob03 2013-10-18 17:05:51 -04:00
parent 3d0b165de9
commit 63ffa52245
71 changed files with 433680 additions and 433679 deletions

View file

@ -357,6 +357,7 @@ def process_image_changes(namespace, repository, image_id):
sections = ('added', 'changed', 'removed') sections = ('added', 'changed', 'removed')
for section, source_trie in zip(sections, new_metadata[1:]): for section, source_trie in zip(sections, new_metadata[1:]):
diffs[section] = list(source_trie) diffs[section] = list(source_trie)
diffs[section].sort()
store.put_content(image_diffs_path, json.dumps(diffs, indent=2)) store.put_content(image_diffs_path, json.dumps(diffs, indent=2))
return new_trie_path return new_trie_path

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,16 +1,16 @@
{ {
"removed": [], "removed": [],
"added": [ "added": [
"dev/kmsg", "/dev/kmsg",
"root/.bash_history", "/root/.bash_history",
"usr/sbin/policy-rc.d" "/usr/sbin/policy-rc.d"
], ],
"changed": [ "changed": [
"tmp", "/.",
"dev", "/dev",
".", "/root",
"usr", "/tmp",
"root", "/usr",
"usr/sbin" "/usr/sbin"
] ]
} }

Binary file not shown.

View file

@ -27,7 +27,7 @@ def files_and_dirs_from_tar(source_stream, removed_prefix_collector):
continue continue
else: else:
yield absolute yield "/" + absolute
def __compute_removed(base_trie, removed_prefixes): def __compute_removed(base_trie, removed_prefixes):