convert/gnuarch: robustify cat-log retrieval
GNU Arch used to scale very poorly when revision number was
increasing. This was mostly caused by the huge amount of
cat-log it has to scan/read through to keep track of all
patches that were merged in a given revision.
In order to improve things, cat-log prunning was a common
admin task that would accelerate cat-log parsing at the expense
of unreachabe locally stored cat-logs.
However, these missing cat-logs are still available in the archive.
So try to get them from the archive as a fallback solution.
--- a/hgext/convert/gnuarch.py Sun Jan 04 02:36:48 2009 +0100
+++ b/hgext/convert/gnuarch.py Sun Jan 04 02:36:48 2009 +0100
@@ -73,7 +73,9 @@
self.changes[rev] = self.gnuarch_rev(rev)
# Read author, date and summary
- catlog = self.run0('cat-log', '-d', self.path, rev)
+ catlog, status = self.run('cat-log', '-d', self.path, rev)
+ if status:
+ catlog = self.run0('cat-archive-log', rev)
self._parsecatlog(catlog, rev)
self.parents[rev] = child