def __init__(self, view):
     self.view = view
     self.git_temp_file = ViewCollection.git_tmp_file(self.view)
     self.buf_temp_file = ViewCollection.buf_tmp_file(self.view)
     if self.on_disk():
         self.git_tree = git_helper.git_tree(self.view)
         self.git_dir = git_helper.git_dir(self.git_tree)
         self.git_path = git_helper.git_file_path(self.view, self.git_tree)
Example #2
0
 def on_disk(self):
     # if the view is saved to disk
     on_disk = self.view.file_name() is not None
     if on_disk:
         self.git_tree = self.git_tree or git_helper.git_tree(self.view)
         self.git_dir = self.git_dir or git_helper.git_dir(self.git_tree)
         self.git_path = self.git_path or git_helper.git_file_path(
             self.view, self.git_tree)
     return on_disk
Example #3
0
 def on_disk(self):
     # if the view is saved to disk
     on_disk = self.view.file_name() is not None
     if on_disk:
         self.git_tree = self.git_tree or git_helper.git_tree(self.view)
         self.git_dir = self.git_dir or git_helper.git_dir(self.git_tree)
         self.git_path = self.git_path or git_helper.git_file_path(
             self.view, self.git_tree
         )
     return on_disk
Example #4
0
 def on_disk(self):
     """Determine, if the view is saved to disk."""
     file_name = self.view.file_name()
     on_disk = file_name is not None and os.path.isfile(file_name)
     if on_disk:
         self.git_tree = self.git_tree or git_helper.git_tree(self.view)
         self.git_dir = self.git_dir or git_helper.git_dir(self.git_tree)
         self.git_path = self.git_path or git_helper.git_file_path(
             self.view, self.git_tree)
     return on_disk
Example #5
0
 def __init__(self, view):
     self.load_settings()
     self.view = view
     self.git_temp_file = ViewCollection.git_tmp_file(self.view)
     self.buf_temp_file = ViewCollection.buf_tmp_file(self.view)
     if self.on_disk():
         self.git_tree = git_helper.git_tree(self.view)
         self.git_dir = git_helper.git_dir(self.git_tree)
         self.git_path = git_helper.git_file_path(self.view, self.git_tree)
         if self.view.get_status('remote'):
             self.git_path = self.view.get_status('remote')
Example #6
0
 def __init__(self, view):
     self.load_settings()
     self.view = view
     self.git_temp_file = ViewCollection.git_tmp_file(self.view)
     self.buf_temp_file = ViewCollection.buf_tmp_file(self.view)
     if self.on_disk():
         self.git_tree = git_helper.git_tree(self.view)
         self.git_dir = git_helper.git_dir(self.git_tree)
         self.git_path = git_helper.git_file_path(self.view, self.git_tree)
         if self.view.get_status('remote'):
             self.git_path = self.view.get_status('remote')