1. Henrik Stuart
  2. repoman

Commits

Sune Foldager  committed 9d24d49

separate header more cleanly when merging hgrc

  • Participants
  • Parent commits ca6566e
  • Branches default

Comments (0)

Files changed (1)

File repoman/cmdutil.py

View file
     return data.replace('{GMD}', f.gmd_path)
 
 def update_configurations(ui, f):
-    header = '########### DO NOT EDIT BELOW THIS LINE ###########\n'
+    header = '\n########### DO NOT EDIT BELOW THIS LINE ###########\n'
     footer = '########### DO NOT EDIT ABOVE THIS LINE ###########\n'
 
     modconfig = f.module_configurations
                 origdata = fh.read()
 
         idx1 = origdata.find(header)
+        if idx1 == -1:
+            idx1 = origdata.find(header[1:])
         idx2 = origdata.find(footer)
         if idx1 != -1 and idx2 != -1:
             origdata = origdata[:idx1] + origdata[idx2 + len(footer):]