Skip to content

Commit

Permalink
py3: fix test-visibility.t
Browse files Browse the repository at this point in the history
Summary:
This module was using binascii.hex directly instead of using Mercurial hex
function.

Reviewed By: xavierd

Differential Revision: D22096490

fbshipit-source-id: 32c912c16415ffd94371ad945c4df2f5a82b92e5
  • Loading branch information
DurhamG authored and facebook-github-bot committed Jun 19, 2020
1 parent 49d5ada commit 8a15d29
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions eden/scm/edenscm/mercurial/commands/eden.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
util,
)
from ..i18n import _
from ..node import hex
from .cmdtable import command


Expand All @@ -49,8 +50,6 @@ def fdopen(handle, mode):
return util.fdopen(handle, mode)


hex = binascii.hexlify

AttributeType = TypeVar("AttributeType")


Expand Down Expand Up @@ -837,8 +836,6 @@ def runedenimporthelper(repo, **opts):
get_manifest_node_arg = opts.get("get_manifest_node")
if get_manifest_node_arg:
node = server.get_manifest_node(get_manifest_node_arg)
# pyre-fixme[6]: Expected `str` for 1st param but got `bytes`.
# pyre-fixme[6]: Expected `bytes` for 1st param but got `str`.
repo.ui.write(hex(node) + "\n")
return 0

Expand Down
2 changes: 1 addition & 1 deletion eden/scm/edenscm/mercurial/visibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def stoptracking(repo):
if "visibleheads" in repo.storerequirements:
repo.storerequirements.discard("visibleheads")
repo._writestorerequirements()
repo.svfs.write("visibleheads", "")
repo.svfs.write("visibleheads", b"")


# Supported file format version.
Expand Down
1 change: 0 additions & 1 deletion eden/scm/tests/test-visibility.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#require py2
#chg-compatible

$ enable amend rebase undo directaccess shelve
Expand Down

0 comments on commit 8a15d29

Please sign in to comment.