diff mercurial/dirstate.py @ 13974:23f2736abce3

move checkfilename from util to scmutil checkfilename is specific to Mercurial, since it contains the knowledege that Mercurial can't track files with \n or \r in the name.
author Adrian Buehlmann <adrian@cadifra.com>
date Thu, 21 Apr 2011 13:18:52 +0200
parents bc32bb0e909f
children 135e244776f0
line wrap: on
line diff
--- a/mercurial/dirstate.py	Thu Apr 21 12:10:03 2011 +0200
+++ b/mercurial/dirstate.py	Thu Apr 21 13:18:52 2011 +0200
@@ -7,7 +7,7 @@
 
 from node import nullid
 from i18n import _
-import util, ignore, osutil, parsers, encoding
+import scmutil, util, ignore, osutil, parsers, encoding
 import struct, os, stat, errno
 import cStringIO
 
@@ -269,7 +269,7 @@
     def _addpath(self, f, check=False):
         oldstate = self[f]
         if check or oldstate == "r":
-            util.checkfilename(f)
+            scmutil.checkfilename(f)
             if f in self._dirs:
                 raise util.Abort(_('directory %r already in dirstate') % f)
             # shadows