From a8fdd3b0d8620f2e0356d4da7803936c993fea8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Thu, 19 Jul 2018 16:15:54 +0200 Subject: [PATCH] Refactor SnapshotProvider --- lib/tfw/components/snapshot_provider.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/tfw/components/snapshot_provider.py b/lib/tfw/components/snapshot_provider.py index 69aa33e..edee8ab 100644 --- a/lib/tfw/components/snapshot_provider.py +++ b/lib/tfw/components/snapshot_provider.py @@ -111,6 +111,12 @@ class SnapshotProvider: )) self._checkout(branch_name) + def _checkout(self, what): + self._run(( + 'git', 'checkout', + what + )) + def restore_snapshot(self, date): commit = self._get_commit_from_timestamp(date) self._checkout(commit) @@ -130,12 +136,6 @@ class SnapshotProvider: self.__last_valid_branch = self._branch return self.__last_valid_branch - def _checkout(self, what): - self._run(( - 'git', 'checkout', - what - )) - @property def all_timelines(self): return self._branches