Closed Bug 1485877 Opened 6 years ago Closed 6 years ago

Make overlay extension compatible with Mercurial 4.7

Categories

(Developer Services :: Mercurial: hg.mozilla.org, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sheehan, Unassigned)

References

Details

Attachments

(1 file)

At least 2 unique breakages in this extension when upgrading Mercurial. Logs below: --- /home/connor/version-control-tools/hgext/overlay/tests/test-overlay-errors.t +++ /home/connor/version-control-tools/hgext/overlay/tests/test-overlay-errors.t.err @@ -93,5 +93,44 @@ Dest revision is invalid $ hg overlay --dest foo http://localhost:$HGPORT1 af1e0a150cd4::tip --into prefix - abort: unknown revision 'foo'! - [255] + ** Unknown exception encountered with possibly-broken third-party extension overlay + ** which supports versions 4.6 of Mercurial. + ** Please disable overlay and try your action again. + ** If that fixes the bug please report it to the extension author. + ** Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0] + ** Mercurial Distributed SCM (version 4.7) + ** Extensions loaded: strip, overlay + ** ProgrammingError: unsupported changeid 'foo' of type <type 'str'> + Traceback (most recent call last): + File "/home/connor/version-control-tools/venv/mercurials/4.7/bin/hg", line 41, in <module> + dispatch.run() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 90, in run + status = dispatch(req) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 213, in dispatch + ret = _runcatch(req) or 0 + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 354, in _runcatch + return _callcatch(ui, _runcatchfunc) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 362, in _callcatch + return scmutil.callcatch(ui, func) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/scmutil.py", line 161, in callcatch + return func() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 344, in _runcatchfunc + return _dispatch(req) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 984, in _dispatch + cmdpats, cmdoptions) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 730, in runcommand + ret = _runcommand(ui, options, cmd, d) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 992, in _runcommand + return cmdfunc() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 981, in <lambda> + d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/util.py", line 1528, in check + return func(*args, **kwargs) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 497, in overlay + destctx = repo[dest] + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/localrepo.py", line 856, in __getitem__ + return context.changectx(self, changeid) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/context.py", line 439, in __init__ + (changeid, type(changeid))) + mercurial.error.ProgrammingError: unsupported changeid 'foo' of type <type 'str'> + [1] ERROR: test-overlay-errors.t output changed !.. --- /home/connor/version-control-tools/hgext/overlay/tests/test-overlay-dest-state.t +++ /home/connor/version-control-tools/hgext/overlay/tests/test-overlay-dest-state.t.err @@ -126,36 +126,101 @@ Notification $ hg overlay http://localhost:$HGPORT --into subdir --notify 'sed "s/^/notify: /"' - notify: metadata mismatch for file subdir/foo-copy2 between source and dest: {'copy': 'foo-copy'} != {'copy': 'root'} - notify: - notify: Destination Repository: - notify: - notify: Last overlaid revision: - notify: - notify: changeset: 4930b59d998731eedd4a01b6f3f671af0c080e36 - notify: user: Test User <someone@example.com> - notify: date: Thu Jan 01 00:00:00 1970 +0000 - notify: summary: copy foo-copy to foo-copy2 - notify: - notify: Revisions that require investigation: - notify: - notify: changeset: 5d9084d79cc3074ae45081dcb64e3473b2f55d70 - notify: user: Test User <someone@example.com> - notify: date: Thu Jan 01 00:00:00 1970 +0000 - notify: summary: remove foo-copy2 - notify: - notify: changeset: 83b0c8a8cf2f5b0db017e4efab8726b722ff9d00 - notify: user: Test User <someone@example.com> - notify: date: Thu Jan 01 00:00:00 1970 +0000 - notify: summary: create foo-copy2 from different source - 0f7e081c425c already processed as 4930b59d9987; skipping 4/5 revisions - abort: metadata mismatch for file subdir/foo-copy2 between source and dest: {'copy': 'foo-copy'} != {'copy': 'root'} - [255] + 0f7e081c425c already processed as 4930b59d9987; skipping 4/5 revisions + ** Unknown exception encountered with possibly-broken third-party extension overlay + ** which supports versions 4.6 of Mercurial. + ** Please disable overlay and try your action again. + ** If that fixes the bug please report it to the extension author. + ** Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0] + ** Mercurial Distributed SCM (version 4.7) + ** Extensions loaded: strip, overlay + Traceback (most recent call last): + File "/home/connor/version-control-tools/venv/mercurials/4.7/bin/hg", line 41, in <module> + dispatch.run() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 90, in run + status = dispatch(req) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 213, in dispatch + ret = _runcatch(req) or 0 + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 354, in _runcatch + return _callcatch(ui, _runcatchfunc) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 362, in _callcatch + return scmutil.callcatch(ui, func) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/scmutil.py", line 161, in callcatch + return func() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 344, in _runcatchfunc + return _dispatch(req) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 984, in _dispatch + cmdpats, cmdoptions) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 730, in runcommand + ret = _runcommand(ui, options, cmd, d) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 992, in _runcommand + return cmdfunc() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 981, in <lambda> + d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/util.py", line 1528, in check + return func(*args, **kwargs) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 505, in overlay + noncontiguous, notify) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 399, in _dooverlay + prefix, lastsourcectx, lastdestctx, notify) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 217, in _verifymanifestsequal + notify=notify) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 129, in _report_mismatch + prefix, prefixed_file_set) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 108, in _summarise_changed + summary.extend(_ctx_summary(overlaid_ctx)) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 76, in _ctx_summary + _('date: %s') % util.datestr(ctx.date()), + AttributeError: 'module' object has no attribute 'datestr' + [1] Bad notification switch shouldn't prevent normal errors $ hg overlay http://localhost:$HGPORT --into subdir --notify this-command-is-bad 0f7e081c425c already processed as 4930b59d9987; skipping 4/5 revisions - notify command "this-command-is-bad" failed: [Errno 2] No such file or directory - abort: metadata mismatch for file subdir/foo-copy2 between source and dest: {'copy': 'foo-copy'} != {'copy': 'root'} - [255] + ** Unknown exception encountered with possibly-broken third-party extension overlay + ** which supports versions 4.6 of Mercurial. + ** Please disable overlay and try your action again. + ** If that fixes the bug please report it to the extension author. + ** Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34) [GCC 7.3.0] + ** Mercurial Distributed SCM (version 4.7) + ** Extensions loaded: strip, overlay + Traceback (most recent call last): + File "/home/connor/version-control-tools/venv/mercurials/4.7/bin/hg", line 41, in <module> + dispatch.run() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 90, in run + status = dispatch(req) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 213, in dispatch + ret = _runcatch(req) or 0 + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 354, in _runcatch + return _callcatch(ui, _runcatchfunc) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 362, in _callcatch + return scmutil.callcatch(ui, func) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/scmutil.py", line 161, in callcatch + return func() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 344, in _runcatchfunc + return _dispatch(req) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 984, in _dispatch + cmdpats, cmdoptions) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 730, in runcommand + ret = _runcommand(ui, options, cmd, d) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 992, in _runcommand + return cmdfunc() + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 981, in <lambda> + d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) + File "/home/connor/version-control-tools/venv/mercurials/4.7/lib/python2.7/site-packages/mercurial/util.py", line 1528, in check + return func(*args, **kwargs) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 505, in overlay + noncontiguous, notify) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 399, in _dooverlay + prefix, lastsourcectx, lastdestctx, notify) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 217, in _verifymanifestsequal + notify=notify) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 129, in _report_mismatch + prefix, prefixed_file_set) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 108, in _summarise_changed + summary.extend(_ctx_summary(overlaid_ctx)) + File "/home/connor/version-control-tools/hgext/overlay/__init__.py", line 76, in _ctx_summary + _('date: %s') % util.datestr(ctx.date()), + AttributeError: 'module' object has no attribute 'datestr' + [1] ERROR: test-overlay-dest-state.t output changed ! Failed test-overlay-errors.t: output changed Failed test-overlay-dest-state.t: output changed
Switching away from `repo[x]` and fixing the import location for `datestr` make us compatible with 4.7.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/f4ff0c4b1758 overlay: make compatible with Mercurial 4.7 r=gps
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: