Closed
Bug 1797848
Opened 2 years ago
Closed 2 years ago
"hg reviewers -f" command fails
Categories
(Developer Services :: Mercurial: hg.mozilla.org, defect)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: rjl, Assigned: rjl)
Details
Attachments
(1 file)
Running "hg reviewers -f <file>" failed when I ran it:
File "/home/rob/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 1736, in reviewers
for change in patch_changes(ui, repo, patchfile, **opts):
File "/home/rob/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 1671, in patch_changes
(changedFiles, source, source_info) = choose_changes(ui, repo, patchfile, opts)
File "/home/rob/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 1604, in choose_changes
changed_files = fullpaths(repo, opts['file'])
File "/home/rob/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 1592, in fullpaths
return [pathutil.canonpath(repo.root, cwd, path) for path in paths]
File "/home/rob/.mozbuild/version-control-tools/hgext/mozext/__init__.py", line 1592, in <listcomp>
return [pathutil.canonpath(repo.root, cwd, path) for path in paths]
File "/usr/lib/python3.10/site-packages/mercurial/pathutil.py", line 230, in canonpath
name = os.path.join(root, cwd, name)
File "/usr/lib/python3.10/posixpath.py", line 90, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.10/genericpath.py", line 155, in _check_arg_types
raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components
The initial problem being that the cwd
argument passed to canonpath
was a str
type, while the others are bytes
.
With that fixed, get_logrevs_for_files
required some adjustments to work with changes tomercurial.logcmdutil.getrevs
from ~mercurial 5.6 in 2020.
Assignee | ||
Comment 1•2 years ago
|
||
This will probably require Mercurial 5.6 due to changes in logcmdutil.getrevs made about that time.
Updated•2 years ago
|
Assignee: nobody → rob
Status: NEW → ASSIGNED
Pushed by cosheehan@mozilla.com:
https://hg.mozilla.org/hgcustom/version-control-tools/rev/65686a3927ea
Fix errors with "hg reviewers" command. r=sheehan
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•