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

Error deleting path #875

Open
francois opened this issue Apr 13, 2024 · 0 comments
Open

Error deleting path #875

francois opened this issue Apr 13, 2024 · 0 comments

Comments

@francois
Copy link

Previously, I always started from some repository I had cloned. This time, I started locally and wanted to push my code to GitHub. I created a new repository on GitHub, then used the following commands:

$ sl path --add origin https://github.com/scoutges/scoutges

$ sl path
origin = https://github.com/scoutges/scoutges

$ sl push --create --to origin/main
Enumerating objects: 234, done.
Counting objects: 100% (234/234), done.
Delta compression using up to 8 threads
Compressing objects: 100% (216/216), done.
Writing objects: 100% (234/234), 44.16 KiB | 3.68 MiB/s, done.
Total 234 (delta 85), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (85/85), done.
To https://github.com/scoutges/scoutges
 * [new branch]      0c273c986bb03e4a5c8e6a63f5b46a29e5cf5bef -> main

The repository has the code I wanted, yay!

Next, I tried pulling (useless, but I'm testing both sides):

$ sl pull
pulling from default
abort: repository default does not exist!

Oh, bother! I decided to rename "origin" to "default" to see if that would fix the issue, but this backtrace hit me instead:

$ sl path --delete origin
** Sapling SCM (version 0.2.20240219-172743+3e819974) has crashed:
** ProgrammingError: metalog change outside a transaction is unsupported
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 419, in expaths
    saveremotenames(repo, {delete: {}})
  File "static:sapling.bookmarks", line 1086, in saveremotenames
    with repo.wlock(), repo.lock():
  File "static:sapling.lock", line 241, in __exit__
    self.release()
  File "static:sapling.lock", line 372, in release
    self.releasefn()
  File "static:sapling.localrepo", line 2404, in metalogdirtycheck
    raise errormod.ProgrammingError(
sapling.error.ProgrammingError: metalog change outside a transaction is unsupported

Apparently, the path was deleted because the following worked beautifully:

$ sl path --add default https://github.com/scoutges/scoutges

$ sl pull
pulling from https://github.com/scoutges/scoutges

$ sl path
default = https://github.com/scoutges/scoutges

Environment:

$ sl --version
Sapling 0.2.20240219-172743+3e819974

$ uname -a
Darwin iMac.local 22.6.0 Darwin Kernel Version 22.6.0: Mon Feb 19 19:48:53 PST 2024; root:xnu-8796.141.3.704.6~1/RELEASE_X86_64 x86_64

Mac OS X, Ventura 13.6.6 (22G630)

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

1 participant