##// END OF EJS Templates
convert: display files data retrieval progress
Patrick Mezard -
r11136:ecc8b187 default
parent child Browse files
Show More
@@ -72,6 +72,25 b' def convertsink(ui, path, type):'
72 ui.note(_("convert: %s\n") % inst)
72 ui.note(_("convert: %s\n") % inst)
73 raise util.Abort(_('%s: unknown repository type') % path)
73 raise util.Abort(_('%s: unknown repository type') % path)
74
74
75 class progresssource(object):
76 def __init__(self, ui, source, filecount):
77 self.ui = ui
78 self.source = source
79 self.filecount = filecount
80 self.retrieved = 0
81
82 def getfile(self, file, rev):
83 self.retrieved += 1
84 self.ui.progress(_('retrieving file'), self.retrieved,
85 item=file, total=self.filecount)
86 return self.source.getfile(file, rev)
87
88 def lookuprev(self, rev):
89 return self.source.lookuprev(rev)
90
91 def close(self):
92 self.ui.progress(_('retrieving file'), None)
93
75 class converter(object):
94 class converter(object):
76 def __init__(self, ui, source, dest, revmapfile, opts):
95 def __init__(self, ui, source, dest, revmapfile, opts):
77
96
@@ -304,8 +323,10 b' class converter(object):'
304 parents = [self.map.get(p, p) for p in parents]
323 parents = [self.map.get(p, p) for p in parents]
305 except KeyError:
324 except KeyError:
306 parents = [b[0] for b in pbranches]
325 parents = [b[0] for b in pbranches]
326 source = progresssource(self.ui, self.source, len(files))
307 newnode = self.dest.putcommit(files, copies, parents, commit,
327 newnode = self.dest.putcommit(files, copies, parents, commit,
308 self.source, self.map)
328 source, self.map)
329 source.close()
309 self.source.converted(rev, newnode)
330 self.source.converted(rev, newnode)
310 self.map[rev] = newnode
331 self.map[rev] = newnode
311
332
@@ -88,12 +88,23 b' scanning [ <=> '
88 scanning [ <=> ] 4
88 scanning [ <=> ] 4
89
89
90 converting [ ] 0/4
90 converting [ ] 0/4
91 retrieving file [==========> ] 1/5
92 retrieving file [=====================> ] 2/5
93 retrieving file [=================================> ] 3/5
94 retrieving file [============================================> ] 4/5
95 retrieving file [========================================================>] 5/5
91
96
92 converting [==============> ] 1/4
97 converting [==============> ] 1/4
98 retrieving file [========================================================>] 1/1
93
99
94 converting [==============================> ] 2/4
100 converting [==============================> ] 2/4
101 retrieving file [=============> ] 1/4
102 retrieving file [===========================> ] 2/4
103 retrieving file [=========================================> ] 3/4
104 retrieving file [========================================================>] 4/4
95
105
96 converting [=============================================> ] 3/4
106 converting [=============================================> ] 3/4
107 retrieving file [========================================================>] 1/1
97
108
98 initializing destination hg-progress repository
109 initializing destination hg-progress repository
99 scanning source...
110 scanning source...
General Comments 0
You need to be logged in to leave comments. Login now