Mercurial > hg
comparison hgext/convert/__init__.py @ 4883:72ac66e88c43
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.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 15 Jul 2007 21:04:07 +0200 |
parents | 1069205a8894 |
children | d77accdd236e fa6c9381d053 |
comparison
equal
deleted
inserted
replaced
4882:25d753efd48e | 4883:72ac66e88c43 |
---|---|
246 - CVS | 246 - CVS |
247 | 247 |
248 Accepted destination formats: | 248 Accepted destination formats: |
249 - Mercurial | 249 - Mercurial |
250 | 250 |
251 If destination isn't given, a new Mercurial repo named <src>-hg will | 251 If no destination directory name is specified, it defaults to the |
252 be created. If <mapfile> isn't given, it will be put in a default | 252 basename of the source with '-hg' appended. If the destination |
253 location (<dest>/.hg/shamap by default) | 253 repository doesn't exist, it will be created. |
254 | 254 |
255 The <mapfile> is a simple text file that maps each source commit ID to | 255 If <mapfile> isn't given, it will be put in a default location |
256 the destination ID for that revision, like so: | 256 (<dest>/.hg/shamap by default). The <mapfile> is a simple text |
257 file that maps each source commit ID to the destination ID for | |
258 that revision, like so: | |
257 <source ID> <destination ID> | 259 <source ID> <destination ID> |
258 | 260 |
259 If the file doesn't exist, it's automatically created. It's updated | 261 If the file doesn't exist, it's automatically created. It's updated |
260 on each commit copied, so convert-repo can be interrupted and can | 262 on each commit copied, so convert-repo can be interrupted and can |
261 be run repeatedly to copy new commits. | 263 be run repeatedly to copy new commits. |
270 srcc = converter(ui, src) | 272 srcc = converter(ui, src) |
271 if not hasattr(srcc, "getcommit"): | 273 if not hasattr(srcc, "getcommit"): |
272 raise util.Abort("%s: can't read from this repo type" % src) | 274 raise util.Abort("%s: can't read from this repo type" % src) |
273 | 275 |
274 if not dest: | 276 if not dest: |
275 dest = src + "-hg" | 277 dest = hg.defaultdest(src) + "-hg" |
276 ui.status("assuming destination %s\n" % dest) | 278 ui.status("assuming destination %s\n" % dest) |
277 | 279 |
278 # Try to be smart and initalize things when required | 280 # Try to be smart and initalize things when required |
279 if os.path.isdir(dest): | 281 if os.path.isdir(dest): |
280 if len(os.listdir(dest)) > 0: | 282 if len(os.listdir(dest)) > 0: |