Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'float' object cannot be interpreted as an integer #1006

Open
stepancheg opened this issue Jan 8, 2025 · 2 comments
Open

'float' object cannot be interpreted as an integer #1006

stepancheg opened this issue Jan 8, 2025 · 2 comments

Comments

@stepancheg
Copy link
Contributor

histedit was failing like this after asking it to fold, consistently.

I rebased, and problem disappeared. No repro.

** Sapling SCM (version 0.2.20241203-120811-a2174689) has crashed:
Traceback (most recent call last):
  File "static:sapling", line 86, in run
    dispatch.run(args, fin, fout, ferr, ctx, skipprehooks)
  File "static:sapling.dispatch", line 161, in run
    status = (dispatch(req) or 0) & 255
              ^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 344, in dispatch
    ret = _runcatch(req)
          ^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 528, in _runcatch
    return _callcatch(ui, req, _runcatchfunc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 537, in _callcatch
    return scmutil.callcatch(ui, req, func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.scmutil", line 151, in callcatch
    return func()
           ^^^^^^
  File "static:sapling.dispatch", line 515, in _runcatchfunc
    return _dispatch(req)
           ^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 1083, in _dispatch
    ret = runcommand(
          ^^^^^^^^^^^
  File "static:sapling.ext.undo", line 176, in _runcommandwrapper
    result = orig(lui, repo, cmd, fullargs, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.undo", line 120, in origunsetpid
    return _orig(*args, **opts)
           ^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.journal", line 82, in runcommand
    return orig(lui, repo, cmd, fullargs, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 755, in runcommand
    ret = _runcommand(ui, options, cmd, d)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 1134, in _runcommand
    return cmdfunc()
           ^^^^^^^^^
  File "static:sapling.dispatch", line 1082, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 1376, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 1376, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.remotenames", line 390, in exhistedit
    ret = orig(ui, repo, *args, **opts)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 1376, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.histedit", line 1094, in histedit
    _histedit(ui, repo, state, *freeargs, **opts)
  File "static:sapling.ext.fbhistedit", line 282, in _histedit
    return orig(ui, repo, state, *freeargs, **opts)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.histedit", line 1176, in _histedit
    _continuehistedit(ui, repo, state)
  File "static:sapling.ext.histedit", line 1218, in _continuehistedit
    parentctx, replacement_ = actobj.run()
                              ^^^^^^^^^^^^
  File "static:sapling.ext.histedit", line 548, in run
    self.continuedirty()
  File "static:sapling.ext.histedit", line 823, in continuedirty
    self.collapsedctx, self.replacements = self.finishfold()
                                           ^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.histedit", line 899, in finishfold
    n = collapse(repo, ctx, commitopts, skipprompt=self.skipprompt())
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.histedit", line 729, in collapse
    n = repo.commitctx(new)
        ^^^^^^^^^^^^^^^^^^^
  File "static:sapling.extensions", line 641, in closure
    return func(*(args + a), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.dirsync", line 529, in _commitctx
    node = orig(self, ctx, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.localrepo", line 2833, in commitctx
    n = self.changelog.add(
        ^^^^^^^^^^^^^^^^^^^
  File "static:sapling.extensions", line 641, in closure
    return func(*(args + a), **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.treemanifest", line 275, in changelogadd
    node = orig(self, *args)
           ^^^^^^^^^^^^^^^^^
  File "static:sapling.changelog2", line 379, in add
    text = gitcommittext(
           ^^^^^^^^^^^^^^
  File "static:sapling.changelog", line 405, in gitcommittext
    text = to_text(fields).encode()
           ^^^^^^^^^^^^^^^
TypeError: 'float' object cannot be interpreted as an integer
@stepancheg
Copy link
Contributor Author

2030e47 looks relevant CC @sggutier.

sl --version
Sapling 0.2.20241203-120811-a2174689

So if this is the fix, then it was made after the last release of Sapling.

@sggutier
Copy link
Contributor

sggutier commented Jan 8, 2025

@stepancheg , thanks for letting us know! I'll see if we can make a new release with these changes soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants