##// END OF EJS Templates
hggettext: ensure correct Mercurial is imported
Martin Geisler -
r8626:1fc1c77d default
parent child Browse files
Show More
@@ -20,8 +20,7 b' Use xgettext like normal to extract stri'
20 join the message cataloges to get the final catalog.
20 join the message cataloges to get the final catalog.
21 """
21 """
22
22
23 from mercurial import demandimport; demandimport.enable()
23 import os, sys, inspect
24 import sys, inspect
25
24
26
25
27 def escape(s):
26 def escape(s):
@@ -114,5 +113,11 b' def docstrings(path):'
114
113
115
114
116 if __name__ == "__main__":
115 if __name__ == "__main__":
116 # It is very important that we import the Mercurial modules from
117 # the source tree where hggettext is executed. Otherwise we might
118 # accidentally import and extract strings from a Mercurial
119 # installation mentioned in PYTHONPATH.
120 sys.path.insert(0, os.getcwd())
121 from mercurial import demandimport; demandimport.enable()
117 for path in sys.argv[1:]:
122 for path in sys.argv[1:]:
118 docstrings(path)
123 docstrings(path)
General Comments 0
You need to be logged in to leave comments. Login now