mercurial/cmdutil.py
changeset 5843 83c354c4d529
parent 5836 c5c9a022bd9a
child 5915 d0576d065993
equal deleted inserted replaced
5842:111ed8c871bf 5843:83c354c4d529
   460     destdirexists = os.path.isdir(dest)
   460     destdirexists = os.path.isdir(dest)
   461     if not destdirexists:
   461     if not destdirexists:
   462         if len(pats) > 1 or util.patkind(pats[0], None)[0]:
   462         if len(pats) > 1 or util.patkind(pats[0], None)[0]:
   463             raise util.Abort(_('with multiple sources, destination must be an '
   463             raise util.Abort(_('with multiple sources, destination must be an '
   464                                'existing directory'))
   464                                'existing directory'))
   465         if dest.endswith(os.sep) or os.altsep and dest.endswith(os.altsep):
   465         if util.endswithsep(dest):
   466             raise util.Abort(_('destination %s is not a directory') % dest)
   466             raise util.Abort(_('destination %s is not a directory') % dest)
   467 
   467 
   468     tfn = targetpathfn
   468     tfn = targetpathfn
   469     if after:
   469     if after:
   470         tfn = targetpathafterfn
   470         tfn = targetpathafterfn