예제 #1
0
 def make_branch(self, name):
     self.load_config()
     di = DirectoryInfo()
     if di.branch_exists(name):
         print(f'Branch \'{name}\' already exists!')
         return
     di.add_branch_path(name)
     self.current_branch.copy_to_branch(name)
     print(f'Successfully made branch {name}')
예제 #2
0
 def checkout(self, branch_name):
     di = DirectoryInfo()
     if not di.branch_exists(branch_name):
         print(f'No branch {branch_name} exists!')
     self.repository.set_current_branch_name(branch_name)
     print(f'Current branch is {branch_name}')