Mercurial > hg-git
changeset 216:8d961ea5fc5a
Making compatible with Python 2.4
author | Michael J. Pedersen <mpedersen@datapipe.com> |
---|---|
date | Wed, 08 Jul 2009 14:14:52 -0500 |
parents | b5d4d1552765 |
children | b6cf621e781e |
files | git_handler.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/git_handler.py Tue Jul 07 17:46:14 2009 +0100 +++ b/git_handler.py Wed Jul 08 14:14:52 2009 -0500 @@ -436,7 +436,10 @@ commits = [commit for commit in commits if not commit in self._map_git] # import each of the commits, oldest first total = len(commits) - magnitude = int(math.log(total, 10)) + 1 if total else 1 + if total: + magnitude = int(math.log(total, 10)) + 1 + else: + magnitude = 1 for i, csha in enumerate(commits): if i%100 == 0: self.ui.status(_("at: %*d/%d\n") % (magnitude, i, total))