facebook / sapling

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

sl doctor crashes with repository not found #882

Open fahrradflucht opened 5 months ago

fahrradflucht commented 5 months ago

I'm using a build from source on current HEAD (version 4.4.2_20240419-180803-h95896256) and ran sl doctor, because smartlog was warning me that I had too many commits and should run doctor to hide unrelated ones. However, that consistently leads to a crash:

Traceback ``` $ sl doctor checking internal storage ** Sapling SCM (version 4.4.2_20240419-180803-h95896256) 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 163, in run status = (dispatch(req) or 0) & 255 File "static:sapling.dispatch", line 382, in dispatch ret = _runcatch(req) File "static:sapling.dispatch", line 566, in _runcatch return _callcatch(ui, req, _runcatchfunc) File "static:sapling.dispatch", line 575, in _callcatch return scmutil.callcatch(ui, req, func) File "static:sapling.scmutil", line 153, in callcatch return func() File "static:sapling.dispatch", line 553, in _runcatchfunc return _dispatch(req) File "static:sapling.dispatch", line 1105, in _dispatch ret = runcommand( File "static:sapling.ext.undo", line 131, in _runcommandwrapper return 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 83, 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 177, in _runcommand return orig(lui, repo, cmd, fullargs, ui, *args, **kwargs) File "static:sapling.dispatch", line 788, in runcommand ret = _runcommand(ui, options, cmd, d) File "static:sapling.dispatch", line 1156, in _runcommand return cmdfunc() File "static:sapling.dispatch", line 1104, in d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) File "static:sapling.util", line 1373, in check return func(*args, **kwargs) File "static:sapling.commands.doctor", line 91, in doctor cl = openchangelog(ui, svfs) File "static:sapling.commands.doctor", line 249, in openchangelog repo = ChangelogRepo(ui, svfs) File "static:sapling.commands.doctor", line 607, in __init__ ui.reloadconfigs(root) File "static:sapling.ui", line 259, in reloadconfigs self._uiconfig.reload(self, repopath) File "static:sapling.uiconfig", line 79, in reload self._rcfg.reload(repopath) error.UncategorizedNativeError: repository /Users/fahrradflucht/Code/my-project/.git not found! ```

I couldn't really make anything out of this. This .git directory definitely exists.