diff -r 2f1de824798a -r 003df62ae39f mercurial/commands.py --- a/mercurial/commands.py Wed Jun 29 13:48:57 2005 -0800 +++ b/mercurial/commands.py Wed Jun 29 14:04:56 2005 -0800 @@ -272,10 +272,12 @@ success = created = False if dest is None: - dest = os.getcwd() - elif not os.path.exists(dest): - os.mkdir(dest) - created = True + dest = os.path.basename(source) + if dest == source: + ui.warn('abort: source and destination are the same\n') + sys.exit(1) + + os.mkdir(dest) try: dest = os.path.realpath(dest)