changeset 34928:362096cfdb1f stable

terse: split on repo separator instead of os.sep (issue5715) The paths being processed are from scmutil.status, and therefore normalized to '/' separators.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Oct 2017 23:48:38 -0400
parents c2695cbb5fb1
children a74befa25ade
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Thu Oct 26 11:58:55 2017 +0800
+++ b/mercurial/cmdutil.py	Fri Oct 27 23:48:38 2017 -0400
@@ -404,11 +404,6 @@
 
     return commit(ui, repo, recordinwlock, pats, opts)
 
-
-# extracted at module level as it's required each time a file will be added
-# to dirnode class object below
-pathsep = pycompat.ossep
-
 class dirnode(object):
     """
     Represent a directory in user working copy with information required for
@@ -446,8 +441,8 @@
 
         # the filename contains a path separator, it means it's not the direct
         # child of this directory
-        if pathsep in filename:
-            subdir, filep = filename.split(pathsep, 1)
+        if '/' in filename:
+            subdir, filep = filename.split('/', 1)
 
             # does the dirnode object for subdir exists
             if subdir not in self.subdirs: