hgext/convert/__init__.py
changeset 4885 d77accdd236e
parent 4811 a5209b0487e0
parent 4884 72ac66e88c43
child 4896 ee04732fe61d
equal deleted inserted replaced
4883:2a01e03ffacd 4885:d77accdd236e
   272 
   272 
   273     If no revision is given, all revisions will be converted. Otherwise,
   273     If no revision is given, all revisions will be converted. Otherwise,
   274     convert will only import up to the named revision (given in a format
   274     convert will only import up to the named revision (given in a format
   275     understood by the source).
   275     understood by the source).
   276 
   276 
   277     If destination isn't given, a new Mercurial repo named <src>-hg will
   277     If no destination directory name is specified, it defaults to the
   278     be created. If <mapfile> isn't given, it will be put in a default
   278     basename of the source with '-hg' appended.  If the destination
   279     location (<dest>/.hg/shamap by default)
   279     repository doesn't exist, it will be created.
   280 
   280 
   281     The <mapfile> is a simple text file that maps each source commit ID to
   281     If <mapfile> isn't given, it will be put in a default location
   282     the destination ID for that revision, like so:
   282     (<dest>/.hg/shamap by default).  The <mapfile> is a simple text
       
   283     file that maps each source commit ID to the destination ID for
       
   284     that revision, like so:
   283     <source ID> <destination ID>
   285     <source ID> <destination ID>
   284 
   286 
   285     If the file doesn't exist, it's automatically created.  It's updated
   287     If the file doesn't exist, it's automatically created.  It's updated
   286     on each commit copied, so convert-repo can be interrupted and can
   288     on each commit copied, so convert-repo can be interrupted and can
   287     be run repeatedly to copy new commits.
   289     be run repeatedly to copy new commits.
   292     mapping and the line format is:
   294     mapping and the line format is:
   293     srcauthor=whatever string you want
   295     srcauthor=whatever string you want
   294     '''
   296     '''
   295 
   297 
   296     if not dest:
   298     if not dest:
   297         dest = src + "-hg"
   299         dest = hg.defaultdest(src) + "-hg"
   298         ui.status("assuming destination %s\n" % dest)
   300         ui.status("assuming destination %s\n" % dest)
   299 
   301 
   300     # Try to be smart and initalize things when required
   302     # Try to be smart and initalize things when required
   301     created = False
   303     created = False
   302     if os.path.isdir(dest):
   304     if os.path.isdir(dest):