mercurial/scmutil.py
changeset 24934 5abd0a76bc8f
parent 24755 cd89f4e6faf2
child 25122 755d23a49170
--- a/mercurial/scmutil.py	Sun May 03 12:28:15 2015 -0400
+++ b/mercurial/scmutil.py	Mon Apr 13 18:11:47 2015 -0400
@@ -1011,6 +1011,12 @@
                    " for more information"))
     return requirements
 
+def writerequires(opener, requirements):
+    reqfile = opener("requires", "w")
+    for r in sorted(requirements):
+        reqfile.write("%s\n" % r)
+    reqfile.close()
+
 class filecachesubentry(object):
     def __init__(self, path, stat):
         self.path = path