Skip to content

Commit

Permalink
Ignore warnings when running hg commands.
Browse files Browse the repository at this point in the history
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
csilvers authored and chipx86 committed Mar 29, 2012
1 parent 2612bfd commit fe27946
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rbtools/clients/mercurial.py
Expand Up @@ -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'
Expand Down

0 comments on commit fe27946

Please sign in to comment.