Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ignore warnings when running hg commands.

hg may sometimes emit warnings that are not actually meaningful to the
command being run by post-review.  For instance, my hg will emit the
following for 'hg -q outgoing --template 'b:{branches}\nr:{rev}\n\n'
when run with python2.5:

---
warning: certificate for foo can't be verified (Python too old)"
b:
r:8869
---

This warning is not meaningful, so we just ignore it.

Reviewed at http://reviews.reviewboard.org/r/2995/
  • Loading branch information...
commit fe27946ae759aad74e7616bad15e54e7e9792527 1 parent 2612bfd
@csilvers csilvers authored chipx86 committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 rbtools/clients/mercurial.py
View
5 rbtools/clients/mercurial.py
@@ -245,7 +245,10 @@ def _get_outgoing_changesets(self, current_branch, remote):
if not pair.strip():
continue
- branch, rev = pair.strip().split('\n')
+ # Ignore warning messages that hg might put in, such as
+ # "warning: certificate for foo can't be verified (Python too old)"
+ branch, rev = [l for l in pair.strip().split('\n')
+ if not l.startswith('warning: ')]
branch_name = branch[len('b:'):].strip()
branch_name = branch_name or 'default'
Please sign in to comment.
Something went wrong with that request. Please try again.