From f72ab902f78afe726f9f89e6721927860d10d9e5 Mon Sep 17 00:00:00 2001 From: Bryan Gardiner Date: Tue, 17 Sep 2024 18:21:13 -0700 Subject: [PATCH] Add 'history' command to changelog; tweak ProfileVersion.__eq__(). - Add mention of the new history command to the changelog. - Make ProfileVersion.__eq__() compare version but not path, so that it lines up with what __lt__() does, for simplicity. --- CHANGELOG.md | 3 +++ src/nvd | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b62c6e8..1c2cd44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## 0.2.4 (unreleased) +- Added an `nvd history` command for diffing successive generations of a + profile, issue #18. Big thanks to Felix Uhl for the idea and implementation! + - Added `--sort` option for controlling the order packages are listed in, for issue #17. diff --git a/src/nvd b/src/nvd index 0634da6..35373ce 100755 --- a/src/nvd +++ b/src/nvd @@ -125,8 +125,8 @@ class ProfileVersion: def __eq__(self, other): if not isinstance(other, ProfileVersion): return NotImplemented - - return self._version == other._version and self._path == other._path + + return self._version == other._version def path(self): return self._path @@ -1040,7 +1040,7 @@ def run_history( ) else: print(f"Contents of profile version {oldest_profile.version()} were omitted, use --list-oldest to show them.") - + # Show diff between all profiles. for [base_profile, displayed_profile] in pairwise(all_profiles): print(f"\n--- Version {displayed_profile.version()}:")