Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 5843:83c354c4d529
Add endswithsep() and use it instead of using os.sep and os.altsep directly.
This change is intended to allow hooking endswithsep() by win32mbcs
extension for MBCS support.
author | Shun-ichi GOTO <shunichi.goto@gmail.com> |
---|---|
date | Wed, 09 Jan 2008 21:30:35 +0900 |
parents | c5c9a022bd9a |
children | d0576d065993 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Wed Jan 09 21:30:13 2008 +0900 +++ b/mercurial/cmdutil.py Wed Jan 09 21:30:35 2008 +0900 @@ -462,7 +462,7 @@ if len(pats) > 1 or util.patkind(pats[0], None)[0]: raise util.Abort(_('with multiple sources, destination must be an ' 'existing directory')) - if dest.endswith(os.sep) or os.altsep and dest.endswith(os.altsep): + if util.endswithsep(dest): raise util.Abort(_('destination %s is not a directory') % dest) tfn = targetpathfn