mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 19:01:33 +00:00
Refactor SnapshotProvider
This commit is contained in:
parent
0dd66c33bf
commit
a8fdd3b0d8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user