From 53a27350551844e1ed1a9257690294767389ef0d Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 1 Jul 2020 00:05:38 -0700 Subject: [PATCH 1/1] 2.1.1: Pin faster --- Changelog | 4 ++++ default.nix | 2 +- pinch.py | 2 ++ setup.py | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 11afedc..2a12d5a 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,9 @@ ## [Unreleased] +## [2.1.1] - 2020-07-01 +### Changed +- Pin faster: Skip archive comparison if git rev is unchanged + ## [2.1.0] - 2020-06-30 ### Added diff --git a/default.nix b/default.nix index dcd9c66..6ad80df 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ pkgs.python3Packages.callPackage ({ lib, buildPythonPackage, nix, git, autopep8, mypy, pylint, }: buildPythonPackage rec { pname = "pinch"; - version = "2.1.0"; + version = "2.1.1"; src = lib.cleanSource ./.; checkInputs = [ nix git mypy ] ++ lib.optionals lint [ autopep8 pylint ]; doCheck = true; diff --git a/pinch.py b/pinch.py index a7f3449..ed33c92 100644 --- a/pinch.py +++ b/pinch.py @@ -186,6 +186,8 @@ class ChannelSearchPath(NamedTuple): channel_html, forwarded_url = fetch_channel(v, self) table, new_gitpin = parse_channel(v, channel_html) + if old_pin is not None and old_pin.git_revision == new_gitpin.git_revision: + return old_pin fetch_resources(v, new_gitpin, forwarded_url, table) ensure_git_rev_available(v, self, new_gitpin, old_revision) check_channel_contents(v, self, table, new_gitpin) diff --git a/setup.py b/setup.py index a460921..40618e9 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="pinch", - version="2.1.0", + version="2.1.1", py_modules=['pinch'], entry_points={"console_scripts": ["pinch = pinch:main"]}, ) -- 2.44.1