Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 1314:d37a46859acd
Fix default clone destination
The default clone wasn't working:
$ hg clone hg
abort: repository hg/.hg not found!
This was because we were creating the destination directory from the
default, then checking whether it existed to determine whether to
expand the path.
author | mpm@selenic.com |
---|---|
date | Thu, 22 Sep 2005 09:47:03 -0700 |
parents | 1cc7c0cbc30b |
children | 32f6cae83db7 |
comparison
equal
deleted
inserted
replaced
1313:1cc7c0cbc30b | 1314:d37a46859acd |
---|---|
620 if opts['ssh']: | 620 if opts['ssh']: |
621 ui.setconfig("ui", "ssh", opts['ssh']) | 621 ui.setconfig("ui", "ssh", opts['ssh']) |
622 if opts['remotecmd']: | 622 if opts['remotecmd']: |
623 ui.setconfig("ui", "remotecmd", opts['remotecmd']) | 623 ui.setconfig("ui", "remotecmd", opts['remotecmd']) |
624 | 624 |
625 d = Dircleanup(dest) | |
626 if not os.path.exists(source): | 625 if not os.path.exists(source): |
627 source = ui.expandpath(source) | 626 source = ui.expandpath(source) |
627 | |
628 d = Dircleanup(dest) | |
628 abspath = source | 629 abspath = source |
629 other = hg.repository(ui, source) | 630 other = hg.repository(ui, source) |
630 | 631 |
631 copy = False | 632 copy = False |
632 if not opts['pull'] and other.dev() != -1: | 633 if not opts['pull'] and other.dev() != -1: |