Mercurial > hg
diff hgext/convert/__init__.py @ 5375:dae323e453aa
convert: disable current --filemap support
The --filemap support in hg convert doesn't handle merges correctly.
(And after 33015dac5df5 I managed to break it even for simple cases
where we don't want the first revision.)
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Thu, 04 Oct 2007 23:21:37 -0300 |
parents | e710874247d1 |
children | d60a067227a5 |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Thu Oct 04 23:21:37 2007 -0300 +++ b/hgext/convert/__init__.py Thu Oct 04 23:21:37 2007 -0300 @@ -40,7 +40,7 @@ raise util.Abort('%s: unknown repository type' % path) class converter(object): - def __init__(self, ui, source, dest, revmapfile, filemapper, opts): + def __init__(self, ui, source, dest, revmapfile, opts): self.source = source self.dest = dest @@ -51,7 +51,6 @@ self.revmapfilefd = None self.authors = {} self.authorfile = None - self.mapfile = filemapper self.maporder = [] self.map = {} @@ -221,28 +220,21 @@ pbranch = None self.dest.setbranch(commit.branch, pbranch, parents) for f, v in files: - newf = self.mapfile(f) - if not newf: - continue - filenames.append(newf) + filenames.append(f) try: data = self.source.getfile(f, v) except IOError, inst: - self.dest.delfile(newf) + self.dest.delfile(f) else: e = self.source.getmode(f, v) - self.dest.putfile(newf, e, data) + self.dest.putfile(f, e, data) if do_copies: if f in copies: - copyf = self.mapfile(copies[f]) - if copyf: - # Merely marks that a copy happened. - self.dest.copyfile(copyf, newf) + copyf = copies[f] + # Merely marks that a copy happened. + self.dest.copyfile(copyf, f) - if not filenames and self.mapfile.active(): - newnode = parents[0] - else: - newnode = self.dest.putcommit(filenames, parents, commit) + newnode = self.dest.putcommit(filenames, parents, commit) self.mapentry(rev, newnode) def convert(self): @@ -478,9 +470,7 @@ except: revmapfile = os.path.join(destc, "map") - - c = converter(ui, srcc, destc, revmapfile, filemapper(ui, opts['filemap']), - opts) + c = converter(ui, srcc, destc, revmapfile, opts) c.convert()