changeset 47037:3af293735d0f stable

convert: update p4 for Python 3 Differential Revision: https://phab.mercurial-scm.org/D10703
author Nate Skulic <nate.skulic@gmail.com>
date Mon, 10 May 2021 00:54:08 +0000
parents ea563187ee7c
children 5b3513177f2b
files hgext/convert/p4.py
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/p4.py	Sun May 02 16:56:20 2021 -0400
+++ b/hgext/convert/p4.py	Mon May 10 00:54:08 2021 +0000
@@ -151,12 +151,10 @@
                     views[sview] = cview
 
         # list of changes that affect our source files
-        p4changes = p4changes.keys()
-        p4changes.sort(key=int)
+        p4changes = sorted(p4changes.keys(), key=int)
 
         # list with depot pathnames, longest first
-        vieworder = views.keys()
-        vieworder.sort(key=len, reverse=True)
+        vieworder = sorted(views.keys(), key=len, reverse=True)
 
         # handle revision limiting
         startrev = self.ui.config(b'convert', b'p4.startrev')
@@ -188,7 +186,7 @@
             else:
                 shortdesc = b'**empty changelist description**'
 
-            t = b'%s %s' % (c.rev, repr(shortdesc)[1:-1])
+            t = b'%s %s' % (c.rev, shortdesc)
             ui.status(stringutil.ellipsis(t, 80) + b'\n')
 
             files = []