mercurial/commands.py
changeset 532 2e9698a5c92c
parent 528 648386fabf9c
child 534 ab0d1bfeee7c
equal deleted inserted replaced
531:0e9234a1a3f6 532:2e9698a5c92c
   271 
   271 
   272     success = False
   272     success = False
   273 
   273 
   274     if dest is None:
   274     if dest is None:
   275         dest = os.path.basename(os.path.normpath(source))
   275         dest = os.path.basename(os.path.normpath(source))
   276         if dest == source:
   276 
   277             ui.warn('abort: source and destination are the same\n')
   277     if os.path.exists(dest):
   278             sys.exit(1)
   278         ui.warn("abort: destination '%s' already exists\n" % dest)
       
   279         return 1
   279 
   280 
   280     os.mkdir(dest)
   281     os.mkdir(dest)
   281 
   282 
   282     try:
   283     try:
   283         link = 0
   284         link = 0