convert/gnuarch: parse continuation-of revisions in gnuarch source
In GNU Arch, continuation-of was often used for:
- tagging revisions
- continue working on a project in a new archive, because arch
was scaling poorly in revision numbers (cat-logs were slow
to be parsed and scanned through)
- very similar to the previous point, fork his own branch of
a project.
Parsing this header information will allow to 'follow' new history
because it often hints at older/forked/personal revision trees.
This patch however just implements the parsing of the
continuation-of header. A followup patch will implement the proper
use of this new information.
--- 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
@@ -14,6 +14,7 @@
self.summary = ''
self.date = None
self.author = ''
+ self.continuationof = None
self.add_files = []
self.mod_files = []
self.del_files = []
@@ -239,6 +240,8 @@
'%Y-%m-%d %H:%M:%S'))
self.changes[rev].author = catlog['Creator']
self.changes[rev].summary = catlog['Summary']
+ if catlog.has_key('Continuation-of'):
+ self.changes[rev].continuationof = catlog['Continuation-of']
except Exception, err:
raise util.Abort(_('could not parse cat-log of %s') % rev)