[Bug 6099] New: 'ZeroDivisionError' with experimental features

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Sun Mar 10 06:41:23 EDT 2019


https://bz.mercurial-scm.org/show_bug.cgi?id=6099

            Bug ID: 6099
           Summary: 'ZeroDivisionError' with experimental features
           Product: Mercurial
           Version: stable branch
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: damien-43 at gmx.fr
                CC: mercurial-devel at mercurial-scm.org

$ bash <<SH
export HGRCPATH=$PWD/hgrc

cat <<HGRC > hgrc
[ui]
tweakdefaults=true
[experimental]
extendedheader.similarity=true
HGRC

test -d hg-all || hg clone https://www.mercurial-scm.org/repo/hg-all

hg -R hg-all log -pr 9da97f49d4f4

SH
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.15 (default, Jan 10 2019, 23:20:52) [GCC 8.2.1 20181127]
** Mercurial version 4.9, système de gestion de sources distribué
** Extensions chargées : 
Traceback (most recent call last):
  File "/usr/bin/hg", line 43, in <module>
    dispatch.run()
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 99, in
run
    status = dispatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 225, in
dispatch
    ret = _runcatch(req) or 0
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 376, in
_runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 384, in
_callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/lib/python2.7/site-packages/mercurial/scmutil.py", line 165, in
callcatch
    return func()
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 367, in
_runcatchfunc
    return _dispatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 1021, in
_dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 756, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 1030, in
_runcommand
    return cmdfunc()
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 1018, in
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 1670, in
check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/commands.py", line 3884, in
log
    displayfn(ui, repo, revs, displayer, getrenamed)
  File "/usr/lib/python2.7/site-packages/mercurial/logcmdutil.py", line 899, in
displayrevs
    displayer.show(ctx, copies=copies)
  File "/usr/lib/python2.7/site-packages/mercurial/logcmdutil.py", line 189, in
show
    self._show(ctx, copies, props)
  File "/usr/lib/python2.7/site-packages/mercurial/logcmdutil.py", line 290, in
_show
    self._showpatch(ctx, graphwidth)
  File "/usr/lib/python2.7/site-packages/mercurial/logcmdutil.py", line 317, in
_showpatch
    graphwidth, stat=False)
  File "/usr/lib/python2.7/site-packages/mercurial/logcmdutil.py", line 140, in
showdiff
    hunksfilterfn=self._makehunksfilter(ctx))
  File "/usr/lib/python2.7/site-packages/mercurial/logcmdutil.py", line 89, in
diffordiffstat
    for chunk in util.filechunkiter(util.chunkbuffer(chunks)):
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 2412, in
filechunkiter
    s = nbytes and f.read(nbytes)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 2353, in read
    for chunk in self.iter:
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 2325, in
splitbig
    for chunk in chunks:
  File "/usr/lib/python2.7/site-packages/mercurial/patch.py", line 2272, in
diff
    losedatafn=losedatafn, prefix=prefix, relroot=relroot, copy=copy,
  File "/usr/lib/python2.7/site-packages/mercurial/patch.py", line 2704, in
trydiff
    sim = similar.score(ctx1[path1], ctx2[path2]) * 100
  File "/usr/lib/python2.7/site-packages/mercurial/similar.py", line 69, in
score
    return _score(fctx1, _ctxdata(fctx2))
  File "/usr/lib/python2.7/site-packages/mercurial/similar.py", line 66, in
_score
    return equal * 2.0 / lengths
ZeroDivisionError: float division by zero

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list