From 5b22fe48fb18a97d1c8c4ef930e9338dd4a3d057 Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Fri, 11 Mar 2016 22:29:51 +0800 Subject: [PATCH] convert: specify unit for ui.progress when operating on files --- hgext/convert/convcmd.py | 2 +- tests/test-convert-svn-encoding.t | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hgext/convert/convcmd.py b/hgext/convert/convcmd.py index d3db18c66b..7df12db87f 100644 --- a/hgext/convert/convcmd.py +++ b/hgext/convert/convcmd.py @@ -145,7 +145,7 @@ class progresssource(object): def getfile(self, file, rev): self.retrieved += 1 self.ui.progress(_('getting files'), self.retrieved, - item=file, total=self.filecount) + item=file, total=self.filecount, unit=_('files')) return self.source.getfile(file, rev) def targetfilebelongstosource(self, targetfilename): diff --git a/tests/test-convert-svn-encoding.t b/tests/test-convert-svn-encoding.t index fa74c665d7..fc40030fee 100644 --- a/tests/test-convert-svn-encoding.t +++ b/tests/test-convert-svn-encoding.t @@ -62,9 +62,9 @@ Convert while testing all possible outputs scanning paths: /trunk/\xc3\xa9 2/3 (66.67%) (esc) committing files: \xc3\xa0/e\xcc\x81 (esc) - getting files: \xc3\xa0/e\xcc\x81 1/2 (50.00%) (esc) + getting files: \xc3\xa0/e\xcc\x81 1/2 files (50.00%) (esc) \xc3\xa9 (esc) - getting files: \xc3\xa9 2/2 (100.00%) (esc) + getting files: \xc3\xa9 2/2 files (100.00%) (esc) committing manifest committing changelog 3 copy files @@ -82,14 +82,14 @@ Convert while testing all possible outputs reparent to file://*/svn-repo/trunk (glob) scanning paths: /trunk/\xc3\xb9 3/4 (75.00%) (esc) mark /trunk/\xc3\xb9 came from \xc3\xa0:2 (esc) - getting files: \xc3\xa0/e\xcc\x81 1/4 (25.00%) (esc) - getting files: \xc3\xa9 2/4 (50.00%) (esc) + getting files: \xc3\xa0/e\xcc\x81 1/4 files (25.00%) (esc) + getting files: \xc3\xa9 2/4 files (50.00%) (esc) committing files: \xc3\xa8 (esc) - getting files: \xc3\xa8 3/4 (75.00%) (esc) + getting files: \xc3\xa8 3/4 files (75.00%) (esc) \xc3\xa8: copy \xc3\xa9:6b67ccefd5ce6de77e7ead4f5292843a0255329f (esc) \xc3\xb9/e\xcc\x81 (esc) - getting files: \xc3\xb9/e\xcc\x81 4/4 (100.00%) (esc) + getting files: \xc3\xb9/e\xcc\x81 4/4 files (100.00%) (esc) \xc3\xb9/e\xcc\x81: copy \xc3\xa0/e\xcc\x81:a9092a3d84a37b9993b5c73576f6de29b7ea50f6 (esc) committing manifest committing changelog @@ -104,8 +104,8 @@ Convert while testing all possible outputs gone from -1 reparent to file://*/svn-repo (glob) reparent to file://*/svn-repo/trunk (glob) - getting files: \xc3\xa8 1/2 (50.00%) (esc) - getting files: \xc3\xb9/e\xcc\x81 2/2 (100.00%) (esc) + getting files: \xc3\xa8 1/2 files (50.00%) (esc) + getting files: \xc3\xb9/e\xcc\x81 2/2 files (100.00%) (esc) committing files: committing manifest committing changelog