# HG changeset patch # User Thomas Arendsen Hein # Date 1184526247 -7200 # Node ID 72ac66e88c43e01f99a735f9dc37d012c32331c2 # Parent 25d753efd48ead3122198776553d1c6cd64dd0d1 convert: Use clone's behaviour for the default destionation name. Adjusted the documentation for this and for the fact that the destionation is created even if a name is specified. diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py --- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -248,12 +248,14 @@ def _convert(ui, src, dest=None, mapfile Accepted destination formats: - Mercurial - If destination isn't given, a new Mercurial repo named -hg will - be created. If isn't given, it will be put in a default - location (/.hg/shamap by default) + If no destination directory name is specified, it defaults to the + basename of the source with '-hg' appended. If the destination + repository doesn't exist, it will be created. - The is a simple text file that maps each source commit ID to - the destination ID for that revision, like so: + If isn't given, it will be put in a default location + (/.hg/shamap by default). The is a simple text + file that maps each source commit ID to the destination ID for + that revision, like so: If the file doesn't exist, it's automatically created. It's updated @@ -272,7 +274,7 @@ def _convert(ui, src, dest=None, mapfile raise util.Abort("%s: can't read from this repo type" % src) if not dest: - dest = src + "-hg" + dest = hg.defaultdest(src) + "-hg" ui.status("assuming destination %s\n" % dest) # Try to be smart and initalize things when required