Mercurial > hg-git
changeset 148:201d30003120
Splitting the if statement up since python didn't like that.
author | Nick Quaranto <nick@quaran.to> |
---|---|
date | Wed, 13 May 2009 15:48:26 -0400 |
parents | 366052cae03c |
children | eb1fcdb8fc9b |
files | git_handler.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/git_handler.py Wed May 13 13:54:54 2009 -0700 +++ b/git_handler.py Wed May 13 15:48:26 2009 -0400 @@ -165,7 +165,10 @@ def export_git_objects(self): self.ui.status(_("exporting git objects\n")) total = len(self.repo.changelog) - 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, rev in enumerate(self.repo.changelog): if i%100 == 0: self.ui.status(_("at: %*d/%d\n") % (magnitude, i, total))