Fix bug in prettyDiffEntry output
It was not handling adding or removing modules correctly.
This commit is contained in:
parent
aa076ee53b
commit
d0676dbf7c
@ -223,9 +223,15 @@ def prettyDiffEntry(diff):
|
|||||||
else:
|
else:
|
||||||
return "Unknown"
|
return "Unknown"
|
||||||
elif change(diff) == "Added":
|
elif change(diff) == "Added":
|
||||||
return " ".join([diff["new"][k] for k in diff["new"]])
|
if name(diff) in ["Module", "Package"]:
|
||||||
|
return "%s %s" % (diff["new"][name(diff)]["name"], diff["new"][name(diff)]["version"])
|
||||||
|
else:
|
||||||
|
return " ".join([diff["new"][k] for k in diff["new"]])
|
||||||
elif change(diff) == "Removed":
|
elif change(diff) == "Removed":
|
||||||
return " ".join([diff["old"][k] for k in diff["old"]])
|
if name(diff) in ["Module", "Package"]:
|
||||||
|
return "%s %s" % (diff["old"][name(diff)]["name"], diff["old"][name(diff)]["version"])
|
||||||
|
else:
|
||||||
|
return " ".join([diff["old"][k] for k in diff["old"]])
|
||||||
|
|
||||||
return change(diff) + " " + name(diff) + " " + details(diff)
|
return change(diff) + " " + name(diff) + " " + details(diff)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user