mercurial/commands.py
changeset 523 003df62ae39f
parent 522 2f1de824798a
child 525 337163e4d4b9
equal deleted inserted replaced
522:2f1de824798a 523:003df62ae39f
   270     source = ui.expandpath(source)
   270     source = ui.expandpath(source)
   271 
   271 
   272     success = created = False
   272     success = created = False
   273 
   273 
   274     if dest is None:
   274     if dest is None:
   275         dest = os.getcwd()
   275         dest = os.path.basename(source)
   276     elif not os.path.exists(dest):
   276         if dest == source:
   277         os.mkdir(dest)
   277             ui.warn('abort: source and destination are the same\n')
   278         created = True
   278             sys.exit(1)
       
   279 
       
   280     os.mkdir(dest)
   279 
   281 
   280     try:
   282     try:
   281         dest = os.path.realpath(dest)
   283         dest = os.path.realpath(dest)
   282 
   284 
   283         link = 0
   285         link = 0