Skip to content

Commit

Permalink
Bug 1797848 - Fix errors with "hg reviewers" command. r=sheehan
Browse files Browse the repository at this point in the history
This will probably require Mercurial 5.6 due to changes in logcmdutil.getrevs made about that time.

Differential Revision: https://phabricator.services.mozilla.com/D160567

--HG--
extra : moz-landing-system : lando
  • Loading branch information
jfx2006 committed Oct 28, 2022
1 parent 55e29aa commit a47994d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hgext/mozext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1587,13 +1587,14 @@ def __getitem__(self, key):


def fullpaths(repo, paths):
cwd = os.getcwd()
cwd = repo.getcwd()
return [pathutil.canonpath(repo.root, cwd, path) for path in paths]


def get_logrevs_for_files(repo, files, opts):
def get_logrevs_for_files(ui, repo, files, opts):
limit = opts['limit'] or 1000000
revs = getlogrevs(repo, files, {b'follow': True, b'limit': limit})[0]
wopts = logcmdutil.parseopts(ui, files, {b'follow': True, b'limit': limit})
revs = getlogrevs(repo, wopts)[0]
for rev in revs:
yield rev

Expand Down Expand Up @@ -1695,7 +1696,7 @@ def patch_changes(ui, repo, patchfile=None, **opts):
if len(exact_files) == 0:
return

for rev in get_logrevs_for_files(repo, exact_files, opts):
for rev in get_logrevs_for_files(ui, repo, exact_files, opts):
yield repo[rev]


Expand Down

0 comments on commit a47994d

Please sign in to comment.