Closed Bug 1431005 Opened 7 years ago Closed 7 years ago

`hg push` fails with Mercurial 4.5 due to TypeError: __init__() got an unexpected keyword argument 'memctx'

Categories

(MozReview Graveyard :: Integration: Mercurial, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(5 files)

`hg push` to MozReview fails with Mercurial 4.5 due to an upstream API change. Here's a traceback fragment: File "/home/gps/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 316, in wrappedpush newbranch=False, **kwargs) File "/home/gps/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 375, in wrappedpush newbranch=newbranch, **kwargs) File "/home/gps/src/hgext/mutable-history/hgext3rd/evolve/__init__.py", line 841, in push return orig(repo, *args, **opts) File "/home/gps/lib/python/mercurial/exchange.py", line 473, in push _pushdiscovery(pushop) File "/home/gps/.mozbuild/version-control-tools/hgext/reviewboard/client.py", line 504, in wrappedpushdiscovery backuptopic='addcommitid') File "/home/gps/.mozbuild/version-control-tools/pylib/mozhg/mozhg/rewrite.py", line 201, in replacechangesets newnode = newctx.commit() File "/home/gps/lib/python/mercurial/context.py", line 2493, in commit return self._repo.commitctx(self) File "/home/gps/lib/python/mercurial/localrepo.py", line 142, in wrapper return orig(repo.unfiltered(), *args, **kwargs) File "/home/gps/lib/python/mercurial/localrepo.py", line 1917, in commitctx elif ctx.files(): File "/home/gps/lib/python/mercurial/context.py", line 1425, in files return sorted(self._status.modified + self._status.added + File "/home/gps/lib/python/mercurial/util.py", line 933, in __get__ result = self.func(obj) File "/home/gps/lib/python/mercurial/context.py", line 2541, in _status elif self[f]: File "/home/gps/lib/python/mercurial/context.py", line 99, in __getitem__ return self.filectx(key) File "/home/gps/lib/python/mercurial/context.py", line 2489, in filectx return self._filectxfn(self._repo, self, path) File "/home/gps/lib/python/mercurial/context.py", line 2386, in getfilectx cache[path] = func(repo, memctx, path) File "/home/gps/.mozbuild/version-control-tools/pylib/mozhg/mozhg/rewrite.py", line 77, in filectxfn memctx=memctx) TypeError: __init__() got an unexpected keyword argument 'memctx'
I /think/ this same bug prevents `mach try` from working, since that module also does some in-memory commits. What I'm not sure is whether it is using the same code.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Comment on attachment 8946521 [details] mozhg: adapt to new memfilectx API in Mercurial 4.5 (bug 1431005); r?glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D505
Attachment #8946521 - Flags: review+
Comment on attachment 8946521 [details] mozhg: adapt to new memfilectx API in Mercurial 4.5 (bug 1431005); r?glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D505#11298
Attachment #8946521 - Flags: review+
Pushed by gszorc@mozilla.com: https://hg.mozilla.org/hgcustom/version-control-tools/rev/dc659492e299 mozhg: adapt to new memfilectx API in Mercurial 4.5 ; r=glob
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment on attachment 8946519 [details] mozhg: remove unused import (bug 1431005); r=glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D503
Attachment #8946519 - Flags: review+
Comment on attachment 8946519 [details] mozhg: remove unused import (bug 1431005); r=glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D503#11441
Attachment #8946519 - Flags: review+
Comment on attachment 8946520 [details] mozhg: use preferred import style (bug 1431005); r=glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D504#11443
Attachment #8946520 - Flags: review+
Comment on attachment 8946522 [details] overlay: port to Mercurial 4.5 (bug 1431005); r=glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D506#11445
Attachment #8946522 - Flags: review+
Comment on attachment 8946523 [details] overlay: mark as compatible with Mercurial 4.5 (bug 1431005); r=glob Byron Jones ‹:glob› has approved the revision. https://phabricator.services.mozilla.com/D507#11447
Attachment #8946523 - Flags: review+
Attachment #8946519 - Attachment description: mozhg: remove unused import (bug 1431005); r?glob → mozhg: remove unused import (bug 1431005); r=glob
Attachment #8946520 - Attachment description: mozhg: use preferred import style (bug 1431005); r?glob → mozhg: use preferred import style (bug 1431005); r=glob
Attachment #8946522 - Attachment description: overlay: port to Mercurial 4.5 (bug 1431005); r?glob → overlay: port to Mercurial 4.5 (bug 1431005); r=glob
Attachment #8946523 - Attachment description: overlay: mark as compatible with Mercurial 4.5 (bug 1431005); r?glob → overlay: mark as compatible with Mercurial 4.5 (bug 1431005); r=glob
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: