Submitter | timeless |
---|---|
Date | Jan. 29, 2016, 4:38 p.m. |
Message ID | <CAAKMeYh+QuqkKgP6MJnYDeJD-H84pu0gm2XZDKJjAjTnRZEUHQ@mail.gmail.com> |
Download | mbox | patch |
Permalink | /patch/12905/ |
State | Superseded |
Headers | show |
Comments
On Fri, 29 Jan 2016 11:38:04 -0500, timeless wrote: > > Why checking numerator? > > If it's 0, then I'm happy saying the value is 0. If it's not zero, > then I don't want to decide how to handle it. I.e. from my perspective > 0/x should be treated as 0, people can understand that. 1/0 otoh > should be Inf, and that's too hard to reason through. If we manage to > hit that case, I'd like someone else to solve it. I don't see much difference between 0/0=0 and x/0=0. Both are generally undefined. Because this patch is the workaround for ZeroDivisionError, it doesn't make sense for me to handle 0/x specially. FYI, "gzip -l" shows "0.0%" for x/0, but in "xz -l", it is "---". > > You can make an empty commit by "--config ui.allowemptycommit=True" or > > "hg branch foo && hg ci". > > This doesn't seem to match what I was expecting at all. Apparently an > empty commit isn't considered a revision (?!). You're right. Empty commit doesn't make a new entry in 00manifest.i. https://selenic.com/repo/hg/rev/301725c3df9a
Patch
diff -r 8b7958075035 tests/test-debugcommands.t --- a/tests/test-debugcommands.t Mon Jan 25 20:40:38 2016 +0000 +++ b/tests/test-debugcommands.t Fri Jan 29 16:24:05 2016 +0000 @@ -1,5 +1,3 @@ -#require test-repo - $ cat << EOF >> $HGRCPATH > [format] > usegeneraldelta=yes