facebook / sapling

A Scalable, User-Friendly Source Control System.
https://sapling-scm.com
GNU General Public License v2.0
6.18k stars 284 forks source link

Internal error after accidently downgrading sapling #927

Open adamh-oai opened 4 months ago

adamh-oai commented 4 months ago

I accidentally downgraded sapling from some HEAD build to the current release in homebrew (2020.02.19), and am hitting this internal error (below). No expectation of backwards compatability, but a more explicit error message would be helpful. Also, could you put a new build on homebrew?

$ sl goto remote/master
** Sapling SCM (version 0.2.20240219-172743+3e819974) 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 162, in run
    status = (dispatch(req) or 0) & 255
              ^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 377, in dispatch
    ret = _runcatch(req)
          ^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 561, in _runcatch
    return _callcatch(ui, req, _runcatchfunc)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 570, in _callcatch
    return scmutil.callcatch(ui, req, func)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.scmutil", line 153, in callcatch
    return func()
           ^^^^^^
  File "static:sapling.dispatch", line 548, in _runcatchfunc
    return _dispatch(req)
           ^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 1098, 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 81, in runcommand
    return orig(lui, repo, cmd, fullargs, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.sparse", line 497, in _tracktelemetry
    res = runcommand(lui, repo, *args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.copytrace", line 191, in _runcommand
    return orig(lui, repo, cmd, fullargs, ui, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 783, in runcommand
    ret = _runcommand(ui, options, cmd, d)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.dispatch", line 1149, in _runcommand
    return cmdfunc()
           ^^^^^^^^^
  File "static:sapling.dispatch", line 1097, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 1373, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 1373, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.remotenames", line 368, in updatecmd
    return orig(ui, repo, node=node, rev=rev, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 1373, in check
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.commands", line 6478, in update
    result = hg.updatetotally(
             ^^^^^^^^^^^^^^^^^
  File "static:sapling.hg", line 972, in updatetotally
    hasunresolved = _update(repo, checkout, updatecheck=updatecheck)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.hg", line 907, in update
    stats = updaterepo(repo, node, False, updatecheck=updatecheck)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.remotenames", line 327, in exupdate
    res = orig(repo, *args, **opts)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.hg", line 893, in updaterepo
    return mergemod.goto(
           ^^^^^^^^^^^^^^
  File "static:sapling.ext.undo", line 161, in log
    return orig(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.ext.sparse", line 418, in _goto
    results = orig(repo, node, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.merge", line 1994, in goto
    ret = donativecheckout(
          ^^^^^^^^^^^^^^^^^
  File "static:sapling.util", line 4175, in inner
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "static:sapling.merge", line 2429, in donativecheckout
    failed_removes = plan.apply(
                     ^^^^^^^^^^^
error.UncategorizedNativeError: checkout error: <some filename>@<some hash> <many many more repeating>
sggutier commented 2 months ago

@adamh-oai sorry for the delay, my PR for upgrading the package got upgraded a few hours after you opened the issue 😅

Does the issue still appear when using the latest Sapling version? If so, could you run your command as SL_LOG=checkout=trace sl goto remote/master ?