Checks that there is no pending commit in the sandbox.
()
| 65 | return stdout |
| 66 | |
| 67 | def check_no_pending_commit(): |
| 68 | """Checks that there is no pending commit in the sandbox.""" |
| 69 | stdout = svn_command('status', '--xml') |
| 70 | etree = ElementTree.fromstring(stdout) |
| 71 | msg = [] |
| 72 | for entry in etree.getiterator('entry'): |
| 73 | path = entry.get('path') |
| 74 | status = entry.find('wc-status').get('item') |
| 75 | if status != 'unversioned' and path != 'version': |
| 76 | msg.append('File "%s" has pending change (status="%s")' % (path, status)) |
| 77 | if msg: |
| 78 | msg.insert(0, 'Pending change to commit found in sandbox. Commit them first!') |
| 79 | return '\n'.join(msg) |
| 80 | |
| 81 | def svn_join_url(base_url, suffix): |
| 82 | if not base_url.endswith('/'): |