Mercurial > hg-stable
comparison hgext/convert/filemap.py @ 35187:671aba341d90
convert: save an indicator of the repo type for sources and sinks
This seems like basic info to have, and will be used shortly when deciding
whether or not to wrap the class for lfs conversions.
The other option is to just add a function to each class. But this seems better
in that the strings aren't duplicated, and the constructor for most of these
will run even if the VCS isn't installed, so it's easier to catch errors.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 22 Nov 2017 20:49:01 -0500 |
parents | a8994d08e4a2 |
children | 42a393ea56d2 |
comparison
equal
deleted
inserted
replaced
35186:e0a1b9ee93cd | 35187:671aba341d90 |
---|---|
170 # touch files we're interested in, but also merges that merge two | 170 # touch files we're interested in, but also merges that merge two |
171 # or more interesting revisions. | 171 # or more interesting revisions. |
172 | 172 |
173 class filemap_source(common.converter_source): | 173 class filemap_source(common.converter_source): |
174 def __init__(self, ui, baseconverter, filemap): | 174 def __init__(self, ui, baseconverter, filemap): |
175 super(filemap_source, self).__init__(ui) | 175 super(filemap_source, self).__init__(ui, baseconverter.repotype) |
176 self.base = baseconverter | 176 self.base = baseconverter |
177 self.filemapper = filemapper(ui, filemap) | 177 self.filemapper = filemapper(ui, filemap) |
178 self.commits = {} | 178 self.commits = {} |
179 # if a revision rev has parent p in the original revision graph, then | 179 # if a revision rev has parent p in the original revision graph, then |
180 # rev will have parent self.parentmap[p] in the restricted graph. | 180 # rev will have parent self.parentmap[p] in the restricted graph. |