Пример #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
Пример #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')]
Пример #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
Пример #4
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
Пример #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')
     ]
Пример #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
Пример #7
0
 def status(self):
     _, output = shell.read(self.log,
         'git', 'status', '--porcelain')
     return output
Пример #8
0
 def branch(self):
     _, branch = shell.read(self.log,
         'git', 'symbolic-ref', '--short', '-q', 'HEAD')
     return branch
Пример #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()
Пример #10
0
 def logmessages(self, since, until):
     _, messages = shell.read(self.log,
         'git', 'log', '%s..%s' %(since, until))
     return messages
Пример #11
0
 def branch(self):
     _, branch = shell.read(self.log, 'git', 'symbolic-ref', '--short',
                            '-q', 'HEAD')
     return branch
Пример #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()
Пример #13
0
 def statusIgnored(self):
     _, output = shell.read(self.log, 'git', 'status', '--porcelain',
                            '--ignored')
     return output