Ejemplo n.º 1
0
Archivo: git.py Proyecto: ilius/starcal
def getCommitList(obj, startJd=None, endJd=None):
	"""
	returns a list of (epoch, commit_id) tuples
	"""
	cmd = [
		"git",
		"--git-dir", join(obj.vcsDir, ".git"),
		"log",
		"--format=%ct %H",## or "--format=%ct %H"
	]
	if startJd is not None:
		cmd += [
			"--since",
			encodeJd(startJd),
		]
	if endJd is not None:
		cmd += [
			"--until",
			encodeJd(endJd),
		]
	data = []
	for line in Popen(cmd, stdout=PIPE).stdout:
		line = toStr(line)
		parts = line.strip().split(" ")
		data.append((
			int(parts[0]),
			parts[1],
		))
	return data
Ejemplo n.º 2
0
def getCommitList(obj, startJd=None, endJd=None):
    '''
        returns a list of (epoch, commit_id) tuples
    '''
    cmd = [
        'git',
        '--git-dir',
        join(obj.vcsDir, '.git'),
        'log',
        '--format=%ct %H',  ## or '--format=%ct %H'
    ]
    if startJd is not None:
        cmd += [
            '--since',
            encodeJd(startJd),
        ]
    if endJd is not None:
        cmd += [
            '--until',
            encodeJd(endJd),
        ]
    data = []
    for line in Popen(cmd, stdout=PIPE).stdout:
        line = toStr(line)
        parts = line.strip().split(' ')
        data.append((
            int(parts[0]),
            parts[1],
        ))
    return data
Ejemplo n.º 3
0
def getCommitList(obj, startJd=None, endJd=None):
    """
	returns a list of (epoch, commit_id) tuples
	"""
    cmd = [
        "git",
        "--git-dir",
        join(obj.vcsDir, ".git"),
        "log",
        "--format=%ct %H",  ## or "--format=%ct %H"
    ]
    if startJd is not None:
        cmd += [
            "--since",
            encodeJd(startJd),
        ]
    if endJd is not None:
        cmd += [
            "--until",
            encodeJd(endJd),
        ]
    data = []
    for line in Popen(cmd, stdout=PIPE).stdout:
        line = toStr(line)
        parts = line.strip().split(" ")
        data.append((
            int(parts[0]),
            parts[1],
        ))
    return data
Ejemplo n.º 4
0
def getCommitList(obj, startJd=None, endJd=None):
    '''
        returns a list of (epoch, commit_id) tuples
    '''
    cmd = [
        'git',
        '--git-dir', join(obj.vcsDir, '.git'),
        'log',
        '--format=%ct %H',## or '--format=%ct %H'
    ]
    if startJd is not None:
        cmd += [
            '--since',
            encodeJd(startJd),
        ]
    if endJd is not None:
        cmd += [
            '--until',
            encodeJd(endJd),
        ]
    data = []
    for line in Popen(cmd, stdout=PIPE).stdout:
        line = toStr(line)
        parts = line.strip().split(' ')
        data.append((
            int(parts[0]),
            parts[1],
        ))
    return data
Ejemplo n.º 5
0
Archivo: git.py Proyecto: ilius/starcal
def getLastCommitIdUntilJd(obj, jd):
	return Popen([
		"git",
		"--git-dir", join(obj.vcsDir, ".git"),
		"log",
		"--until", encodeJd(jd),
		"-1",
		"--format=%H",
	], stdout=PIPE).stdout.read().strip()
Ejemplo n.º 6
0
def getLastCommitIdUntilJd(obj, jd):
    return Popen([
        "git",
        "--git-dir",
        join(obj.vcsDir, ".git"),
        "log",
        "--until",
        encodeJd(jd),
        "-1",
        "--format=%H",
    ],
                 stdout=PIPE).stdout.read().strip()
Ejemplo n.º 7
0
        'rev-list',
        '--max-parents=0',
        'HEAD',
        '--format=%ct',
    ],
          stdout=PIPE).stdout.readlines()[1].strip())

getLastCommitEpoch = lambda obj: int(
    Popen([
        'git',
        '--git-dir',
        join(obj.vcsDir, '.git'),
        'log',
        '-1',
        '--format=%ct',
    ],
          stdout=PIPE).stdout.read().strip())

getLastCommitIdUntilJd = lambda obj, jd: Popen([
    'git',
    '--git-dir',
    join(obj.vcsDir, '.git'),
    'log',
    '--until',
    encodeJd(jd),
    '-1',
    '--format=%H',
],
                                               stdout=PIPE).stdout.read(
                                               ).strip()
Ejemplo n.º 8
0
        'git',
        '--git-dir', join(obj.vcsDir, '.git'),
        'rev-list',
        '--max-parents=0',
        'HEAD',
        '--format=%ct',
    ], stdout=PIPE).stdout.readlines()[1].strip()
)


getLastCommitEpoch = lambda obj: int(Popen([
    'git',
    '--git-dir', join(obj.vcsDir, '.git'),
    'log',
    '-1',
    '--format=%ct',
], stdout=PIPE).stdout.read().strip())


getLastCommitIdUntilJd = lambda obj, jd: Popen([
    'git',
    '--git-dir', join(obj.vcsDir, '.git'),
    'log',
    '--until', encodeJd(jd),
    '-1',
    '--format=%H',
], stdout=PIPE).stdout.read().strip()



Ejemplo n.º 9
0
		'git',
		'--git-dir', join(obj.vcsDir, '.git'),
		'rev-list',
		'--max-parents=0',
		'HEAD',
		'--format=%ct',
	], stdout=PIPE).stdout.readlines()[1].strip()
)


getLastCommitEpoch = lambda obj: int(Popen([
	'git',
	'--git-dir', join(obj.vcsDir, '.git'),
	'log',
	'-1',
	'--format=%ct',
], stdout=PIPE).stdout.read().strip())


getLastCommitIdUntilJd = lambda obj, jd: Popen([
	'git',
	'--git-dir', join(obj.vcsDir, '.git'),
	'log',
	'--until', encodeJd(jd),
	'-1',
	'--format=%H',
], stdout=PIPE).stdout.read().strip()