Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 3629:4cfb72bcb978
util: add copyfile function
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 13 Nov 2006 13:26:57 -0600 |
parents | 45574a225632 |
children | eb0b4a2d70a9 |
line wrap: on
line diff
--- a/mercurial/patch.py Mon Nov 13 13:26:57 2006 -0600 +++ b/mercurial/patch.py Mon Nov 13 13:26:57 2006 -0600 @@ -26,11 +26,8 @@ targetdir = os.path.dirname(absdst) if not os.path.isdir(targetdir): os.makedirs(targetdir) - try: - shutil.copyfile(abssrc, absdst) - shutil.copymode(abssrc, absdst) - except shutil.Error, inst: - raise util.Abort(str(inst)) + + util.copyfile(abssrc, absdst) # public functions