Mercurial > hg
changeset 7582:3b2383c90034
convert/gnuarch: use fully qualified revisions
There is no need loosing information in the conversion process. This could
lead to wrong shamap mappings if different archives used the same 'version'
naming.
author | Edouard Gomez <ed.gomez@free.fr> |
---|---|
date | Sun, 04 Jan 2009 02:36:48 +0100 |
parents | 3742981341c1 |
children | 77fec2d270ae |
files | hgext/convert/gnuarch.py |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ -66,7 +66,7 @@ # Generate parents dictionary child = [] - output, status = self.runlines('revisions', self.treeversion) + output, status = self.runlines('revisions', '-f', self.treeversion) self.checkexit(status, 'archive registered?') for l in output: rev = l.strip() @@ -156,14 +156,13 @@ return os.system(cmdline) def _update(self, rev): - if rev == 'base-0': + if rev[-6:] == 'base-0': # Initialise 'base-0' revision self._obtainrevision(rev) else: self.ui.debug(_('applying revision %s...\n') % rev) - revision = '%s--%s' % (self.treeversion, rev) changeset, status = self.runlines('replay', '-d', self.tmppath, - revision) + rev) if status: # Something went wrong while merging (baz or tla # issue?), get latest revision and try from there @@ -221,8 +220,7 @@ def _obtainrevision(self, rev): self.ui.debug(_('obtaining revision %s...\n') % rev) - revision = '%s--%s' % (self.treeversion, rev) - output = self._execute('get', revision, self.tmppath) + output = self._execute('get', rev, self.tmppath) self.checkexit(output) self.ui.debug(_('analysing revision %s...\n') % rev) files = self._readcontents(self.tmppath)