[PATCH] windows: fix missing import of util.Abort

Sune Foldager cryo at cyanite.org
Thu Apr 2 10:30:20 CDT 2009


This may fail without demandimport. At least it does in mini-examples I was
playing with. But Doing this instead seems to work:

# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1238686027 -7200
# Node ID d5349bb2adc47e49cbcbc7f233e5e47ad39216d2
# Parent  96501a4abbecfdb795a63e41a4e084aaa1bb699d
windows: fix missing import of util.Abort

diff -r 96501a4abbec -r d5349bb2adc4 mercurial/windows.py
--- a/mercurial/windows.py      Thu Apr 02 16:49:34 2009 +0200
+++ b/mercurial/windows.py      Thu Apr 02 17:27:07 2009 +0200
@@ -10,6 +10,7 @@

 from i18n import _
 import errno, msvcrt, os, osutil, re, sys
+import util
 nulldev = 'NUL:'

 umask = 002
@@ -227,8 +228,8 @@

 def getuser():
     '''return name of current user'''
-    raise Abort(_('user name not available - set USERNAME '
-                  'environment variable'))
+    raise util.Abort(_('user name not available - set USERNAME '
+                       'environment variable'))

 def username(uid=None):
     """Return the name of the user with the given uid.






-----Oprindelig meddelelse-----
Fra: mercurial-devel-bounces at selenic.com
[mailto:mercurial-devel-bounces at selenic.com] På vegne af Sune Foldager
Sendt: 2. april 2009 5:10
Til: Mercurial Devel
Emne: [PATCH] windows: fix missing import of util.Abort

# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1238684957 -7200
# Node ID 5325596c354c344b70f1175175c2736c605721d4
# Parent  96501a4abbecfdb795a63e41a4e084aaa1bb699d
windows: fix missing import of util.Abort

diff -r 96501a4abbec -r 5325596c354c mercurial/windows.py
--- a/mercurial/windows.py	Thu Apr 02 16:49:34 2009 +0200
+++ b/mercurial/windows.py	Thu Apr 02 17:09:17 2009 +0200
@@ -8,6 +8,7 @@
 reference.
 """
 
+from util import Abort
 from i18n import _
 import errno, msvcrt, os, osutil, re, sys
 nulldev = 'NUL:'
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel at selenic.com
http://selenic.com/mailman/listinfo/mercurial-devel




More information about the Mercurial-devel mailing list