예제 #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