aboutsummaryrefslogtreecommitdiffstats
path: root/.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/508ea95e-7bc6-4b9b-9e36-a3a87014423d
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-02-01 12:02:11 -0500
committerW. Trevor King <wking@drexel.edu>2010-02-01 12:02:11 -0500
commitcf930f941de308f5d46ce89aa7f6358ba3c453d6 (patch)
tree4a4b2d690e116bf74e1b25a6727f9d3d58950ca6 /.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/508ea95e-7bc6-4b9b-9e36-a3a87014423d
parent0dd273f8605bc21589a51d3b046a231ff9df6fbb (diff)
downloadbugseverywhere-cf930f941de308f5d46ce89aa7f6358ba3c453d6.tar.gz
Fixed Chris' "zero name length for Mercurial w/o ~/.hgrc" bug.
From: Chris Ball <cjb@laptop.org> Subject: Test suite status Date: Mon, 01 Feb 2010 11:27:53 -0500 Message-id: <m38wbcor92.fsf@pullcord.laptop.org> ... I hit the "assert len(name) > 0" in libbe/ui/util/libbe.py, coming from hg.py when running with no ~/.hgrc. Fixed by the following patch: === modified file 'libbe/storage/vcs/hg.py' --- libbe/storage/vcs/hg.py 2010-01-21 17:45:49 +0000 +++ libbe/storage/vcs/hg.py 2010-02-01 16:17:03 +0000 @@ -87,7 +87,14 @@ return tmp_stdout.getvalue().rstrip('\n') def _vcs_get_user_id(self): - return self._u_invoke_client('showconfig', 'ui.username') + output = self._u_invoke_client('showconfig', 'ui.username') + if output != "": + return output.rstrip('\n') + else: + # guess missing info + name = libbe.ui.util.user.get_fallback_username() + email = libbe.ui.util.user.get_fallback_email() + return libbe.ui.util.user.create_user_id(name, email) def _vcs_detect(self, path): """Detect whether a directory is revision-controlled using Mercurial"""
Diffstat (limited to '.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/508ea95e-7bc6-4b9b-9e36-a3a87014423d')
0 files changed, 0 insertions, 0 deletions