Returns the date for the specified branch/tag/hash.
(path, branch)
| 275 | |
| 276 | |
| 277 | def get_git_date(path, branch): |
| 278 | """ Returns the date for the specified branch/tag/hash. """ |
| 279 | cmd = "%s show -s --format=%%ct %s" % (git_exe, branch) |
| 280 | result = exec_cmd(cmd, path) |
| 281 | if result['out'] != '': |
| 282 | return datetime.utcfromtimestamp( |
| 283 | int(result['out'].strip())).strftime('%Y-%m-%d %H:%M:%S UTC') |
| 284 | return 'Unknown' |
| 285 | |
| 286 | |
| 287 | def get_git_url(path): |
no test coverage detected