Refactor SnapshotProvider

This commit is contained in:
Kristóf Tóth 2018-07-19 16:15:54 +02:00
parent 0dd66c33bf
commit a8fdd3b0d8

View File

@ -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