示例#1
0
文件: git.py 项目: pombreda/bigitr
 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
文件: git.py 项目: pombreda/bigitr
 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
文件: git.py 项目: 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
示例#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
文件: git.py 项目: pombreda/bigitr
 def status(self):
     _, output = shell.read(self.log,
         'git', 'status', '--porcelain')
     return output
示例#8
0
文件: git.py 项目: pombreda/bigitr
 def branch(self):
     _, branch = shell.read(self.log,
         'git', 'symbolic-ref', '--short', '-q', 'HEAD')
     return branch
示例#9
0
文件: git.py 项目: pombreda/bigitr
 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
文件: git.py 项目: pombreda/bigitr
 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