Ejemplo n.º 1
0
 def refs(self):
     # no refs yet returns an error in normal operations
     rc, refs = shell.read(self.log,
         'git', 'show-ref', '--head', error=False)
     if not rc:
         return [tuple(x.split()) for x in refs.strip().split('\n')]
     return None
Ejemplo n.º 2
0
 def listContentFiles(self):
     _, files = shell.read(self.log,
         'git', 'ls-files', '--exclude-standard', '-z')
     # --exclude-standard does not apply to .gitignore or .gitmodules
     # make sure that no .git metadata files are included in the
     # content that might be exported to CVS
     return [x for x in files.split('\0')
             if x and not os.path.basename(x).startswith('.git')]
Ejemplo n.º 3
0
 def logmessages(self, since, until):
     options = self.ctx.getGitLogOptions(self.repo, until)
     if options is None:
         options = []
     else:
         options = shlex.split(options)
     options = ['git', 'log'] + options + ['%s..%s' % (since, until)]
     _, messages = shell.read(self.log, *options)
     return messages
Ejemplo n.º 4
0
Archivo: git.py Proyecto: mikjo/bigitr
 def logmessages(self, since, until):
     options = self.ctx.getGitLogOptions(self.repo, until)
     if options is None:
         options = []
     else:
         options = shlex.split(options)
     options = ['git', 'log'] + options + ['%s..%s' %(since, until)]
     _, messages = shell.read(self.log, *options)
     return messages
Ejemplo n.º 5
0
 def listContentFiles(self):
     _, files = shell.read(self.log, 'git', 'ls-files',
                           '--exclude-standard', '-z')
     # --exclude-standard does not apply to .gitignore or .gitmodules
     # make sure that no .git metadata files are included in the
     # content that might be exported to CVS
     return [
         x for x in files.split('\0')
         if x and not os.path.basename(x).startswith('.git')
     ]
Ejemplo n.º 6
0
 def refs(self):
     # no refs yet returns an error in normal operations
     rc, refs = shell.read(self.log,
                           'git',
                           'show-ref',
                           '--head',
                           error=False)
     if not rc:
         return [tuple(x.split()) for x in refs.strip().split('\n')]
     return None
Ejemplo n.º 7
0
 def status(self):
     _, output = shell.read(self.log,
         'git', 'status', '--porcelain')
     return output
Ejemplo n.º 8
0
 def branch(self):
     _, branch = shell.read(self.log,
         'git', 'symbolic-ref', '--short', '-q', 'HEAD')
     return branch
Ejemplo n.º 9
0
 def branches(self):
     _, branches = shell.read(self.log,
         'git', 'branch', '-a')
     if branches:
         return set(x[2:].split()[0] for x in branches.split('\n') if x)
     return set()
Ejemplo n.º 10
0
 def logmessages(self, since, until):
     _, messages = shell.read(self.log,
         'git', 'log', '%s..%s' %(since, until))
     return messages
Ejemplo n.º 11
0
 def branch(self):
     _, branch = shell.read(self.log, 'git', 'symbolic-ref', '--short',
                            '-q', 'HEAD')
     return branch
Ejemplo n.º 12
0
 def branches(self):
     _, branches = shell.read(self.log, 'git', 'branch', '-a')
     if branches:
         return set(x[2:].split()[0] for x in branches.split('\n') if x)
     return set()
Ejemplo n.º 13
0
 def statusIgnored(self):
     _, output = shell.read(self.log, 'git', 'status', '--porcelain',
                            '--ignored')
     return output