Patchwork [4,of,6] subrepo: use vfs.basename instead of os.path.basename

login
register
mail settings
Submitter Katsunori FUJIWARA
Date July 9, 2015, 4:03 p.m.
Message ID <2de1993548dae3768341.1436457781@juju>
Download mbox | patch
Permalink /patch/9942/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - July 9, 2015, 4:03 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1436457591 -32400
#      Fri Jul 10 00:59:51 2015 +0900
# Node ID 2de1993548dae3768341ae0815684a0b94eff332
# Parent  ceb578e671c08195b268451eb55e4db72f6d23c8
subrepo: use vfs.basename instead of os.path.basename

Patch

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -313,7 +313,7 @@  def _sanitize(ui, vfs, ignore):
             if d.lower() == ignore:
                 del dirs[i]
                 break
-        if os.path.basename(dirname).lower() != '.hg':
+        if vfs.basename(dirname).lower() != '.hg':
             continue
         for f in names:
             if f.lower() == 'hgrc':