(path)
| 39 | |
| 40 | |
| 41 | def CheckRepoIsClean(path): |
| 42 | os.chdir(path) # As a side effect this also checks for existence of the dir. |
| 43 | # If path isn't a git repo, this will throw and exception. |
| 44 | # And if it is a git repo and 'git status' has anything interesting to say, |
| 45 | # then it's not clean (uncommitted files etc.) |
| 46 | if len(RunCmd(['git', 'status', '--porcelain'])) != 0: |
| 47 | raise Exception('%s is not a clean git repo (run git status)' % path) |
| 48 | |
| 49 | |
| 50 | def CheckRepoIsInspectorProtocolCheckout(path): |