win32text: rename forbidcrlforcr() function
authorPatrick Mezard <pmezard@gmail.com>
Sat, 05 Apr 2008 19:06:16 +0200
changeset 6483 0a803195bb29
parent 6482 529d7887ecfe
child 6484 ab8038bf5127
win32text: rename forbidcrlforcr() function
hgext/win32text.py
--- a/hgext/win32text.py	Sat Apr 05 19:03:45 2008 +0200
+++ b/hgext/win32text.py	Sat Apr 05 19:06:16 2008 +0200
@@ -96,7 +96,7 @@
     'macencode:': macencode,
     }
 
-def forbidcrlforcr(ui, repo, hooktype, node, newline, **kwargs):
+def forbidnewline(ui, repo, hooktype, node, newline, **kwargs):
     halt = False
     for rev in xrange(repo.changelog.rev(bin(node)), repo.changelog.count()):
         c = repo.changectx(rev)
@@ -131,10 +131,10 @@
     return halt
 
 def forbidcrlf(ui, repo, hooktype, node, **kwargs):
-    return forbidcrlforcr(ui, repo, hooktype, node, '\r\n', **kwargs)
+    return forbidnewline(ui, repo, hooktype, node, '\r\n', **kwargs)
 
 def forbidcr(ui, repo, hooktype, node, **kwargs):
-    return forbidcrlforcr(ui, repo, hooktype, node, '\r', **kwargs)
+    return forbidnewline(ui, repo, hooktype, node, '\r', **kwargs)
 
 def reposetup(ui, repo):
     if not repo.local():