Patchwork [2,of,8] vfs: add "isfile()"

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Nov. 12, 2013, 7:31 a.m.
Message ID <5a30251eb8bca1d147d0.1384241511@juju>
Download mbox | patch
Permalink /patch/2925/
State Accepted
Commit 589d6bb5b18dca9ea727dd0df26660c4a6d30b68
Headers show

Comments

Katsunori FUJIWARA - Nov. 12, 2013, 7:31 a.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1384241032 -32400
#      Tue Nov 12 16:23:52 2013 +0900
# Node ID 5a30251eb8bca1d147d00ee32744a578ea8eca43
# Parent  14845c83e5e7113b689b36ba49c931c7b8f4945e
vfs: add "isfile()"

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -251,6 +251,9 @@ 
     def isdir(self, path=None):
         return os.path.isdir(self.join(path))
 
+    def isfile(self, path=None):
+        return os.path.isfile(self.join(path))
+
     def islink(self, path=None):
         return os.path.islink(self.join(path))