Mercurial > hg-stable
changeset 25770:39de2e9cc6f4
vfs: add basename
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Fri, 10 Jul 2015 00:59:51 +0900 |
parents | 2538b87660be |
children | a7178d8fe7ee |
files | mercurial/scmutil.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Fri Jul 10 00:59:51 2015 +0900 +++ b/mercurial/scmutil.py Fri Jul 10 00:59:51 2015 +0900 @@ -282,6 +282,12 @@ finally: fp.close() + def basename(self, path): + """return base element of a path (as os.path.basename would do) + + This exists to allow handling of strange encoding if needed.""" + return os.path.basename(path) + def chmod(self, path, mode): return os.chmod(self.join(path), mode)