path: pass `path` to `peer` in `hg histedit`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 01 Dec 2022 02:21:18 +0100
changeset 49712 905eb32fdf4e
parent 49711 e2a31b0bc5d0
child 49713 6f89a1d74511
path: pass `path` to `peer` in `hg histedit` We directly use the `path` object to build the `peer` object.
hgext/histedit.py
--- a/hgext/histedit.py	Thu Dec 01 02:14:40 2022 +0100
+++ b/hgext/histedit.py	Thu Dec 01 02:21:18 2022 +0100
@@ -1051,12 +1051,11 @@
     if opts is None:
         opts = {}
     path = urlutil.get_unique_push_path(b'histedit', repo, ui, remote)
-    dest = path.loc
-
-    ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(dest))
+
+    ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(path.loc))
 
     revs, checkout = hg.addbranchrevs(repo, repo, (path.branch, []), None)
-    other = hg.peer(repo, opts, dest)
+    other = hg.peer(repo, opts, path)
 
     if revs:
         revs = [repo.lookup(rev) for rev in revs]