Update changes file properly
authorEd Bartosh <eduard.bartosh@intel.com>
Tue, 5 Jun 2012 11:56:01 +0000 (14:56 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Tue, 5 Jun 2012 11:56:01 +0000 (14:56 +0300)
Change-Id: I95cc22467bd73b391d1f94195e6237488c8368d3

gitbuildsys/cmd_changelog.py

index 3899c32..9f15535 100644 (file)
@@ -148,6 +148,10 @@ def do(opts, _args):
     subprocess.call("%s %s" % (EDITOR, temp.name), shell=True)
 
     if temp.is_changed():
+        try:
+            shutil.copy2(temp.name, fn_changes)
+        except (IOError, shutil.Error), excobj:
+            msger.error("Can't update %s: %s" % (fn_changes, str(excobj)))
        msger.info("Change log has been updated.")
     else:
         msger.info("Change log has not been updated")