Exemplo n.º 1
0
 def stashes(self):
     reflog_path = os.path.join(
         self._repo.commondir(), 'logs', self._ref)
     try:
         with GitFile(reflog_path, 'rb') as f:
             return reversed(list(read_reflog(f)))
     except FileNotFoundError:
         return []
Exemplo n.º 2
0
 def stashes(self):
     reflog_path = os.path.join(self._repo.commondir(), "logs",
                                os.fsdecode(self._ref))
     try:
         with GitFile(reflog_path, "rb") as f:
             return reversed(list(read_reflog(f)))
     except FileNotFoundError:
         return []
Exemplo n.º 3
0
 def stashes(self):
     reflog_path = os.path.join(self._repo.commondir(), 'logs', self._ref)
     try:
         with GitFile(reflog_path, 'rb') as f:
             return reversed(list(read_reflog(f)))
     except EnvironmentError as e:
         if e.errno == errno.ENOENT:
             return []
         raise
Exemplo n.º 4
0
 def stashes(self):
     reflog_path = os.path.join(
         self._repo.commondir(), 'logs', self._ref)
     try:
         with GitFile(reflog_path, 'rb') as f:
             return reversed(list(read_reflog(f)))
     except EnvironmentError as e:
         if e.errno == errno.ENOENT:
             return []
         raise
Exemplo n.º 5
0
 def stashes(self):
     try:
         with GitFile(self._reflog_path, "rb") as f:
             return reversed(list(read_reflog(f)))
     except FileNotFoundError:
         return []
Exemplo n.º 6
0
 def _read_log(self):
     self.f.seek(0)
     return list(read_reflog(self.f))
Exemplo n.º 7
0
 def setUp(self):
     TestCase.setUp(self)
     self.f = BytesIO(_TEST_REFLOG)
     self.original_log = list(read_reflog(self.f))
     self.f.seek(0)