jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1817638 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/action/Save.java xdocs/changes.xml
Date Sat, 09 Dec 2017 17:36:56 GMT
Author: pmouawad
Date: Sat Dec  9 17:36:56 2017
New Revision: 1817638

URL: http://svn.apache.org/viewvc?rev=1817638&view=rev
Log:
Bug 61842 - Saving with no changes causes a save and duplicate, identical backup file
Bugzilla Id: 61842

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java?rev=1817638&r1=1817637&r2=1817638&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/Save.java Sat Dec  9 17:36:56 2017
@@ -201,13 +201,17 @@ public class Save extends AbstractAction
             }
         }
         
+        ActionRouter.getInstance().doActionNow(new ActionEvent(e.getSource(), e.getID(),
ActionNames.CHECK_DIRTY));
         // backup existing file according to jmeter/user.properties settings
         List<File> expiredBackupFiles = EMPTY_FILE_LIST;
-        File fileToBackup = new File(updateFile);
-        try {
-            expiredBackupFiles = createBackupFile(fileToBackup);
-        } catch (Exception ex) {
-            log.error("Failed to create a backup for {}", fileToBackup, ex); //$NON-NLS-1$
+        if (GuiPackage.getInstance().isDirty()) {
+            File fileToBackup = new File(updateFile);
+            log.debug("Test plan has changed, make backup of {}", fileToBackup);
+            try {
+                expiredBackupFiles = createBackupFile(fileToBackup);
+            } catch (Exception ex) {
+                log.error("Failed to create a backup for {}", fileToBackup, ex); //$NON-NLS-1$
+            }
         }
         
         try {

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1817638&r1=1817637&r2=1817638&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Dec  9 17:36:56 2017
@@ -80,7 +80,7 @@ Summary
     <li><code>tearDown Thread Group</code> will now run on stop and shutdown
of a test by default. If you don't want this behaviour,
     uncheck <code>Run tearDown Thread Groups after shutdown of main threads</code>
on <code>Test Plan</code> element, see <bugzilla>61656</bugzilla></li>
     <li>Properties <code>sampleresult.getbytes.headers_size</code> and
<code>sampleresult.getbytes.body_real_size</code> have been dropped, see <bugzilla>61587</bugzilla></li>
-    <li>JMeter will now save your test plan whenever you run it. This behaviour can
be controlled by property <code>save_automatically_before_run</code></li>
+    <li>JMeter will now save your test plan whenever you run it. This behaviour can
be controlled by property <code>save_automatically_before_run</code>, see <bugzilla>61731</bugzilla></li>
     <li>Workbench element has been dropped, you now directly add <code>Non Test
Element</code> as children of Test Plan. When loading a Test Plan that contains the
element
     JMeter will move the <code>Mirror Server</code>, <code>Property Display</code>
and HTTP(s) <code>Test Script Recorder</code> elements as direct children of Test
Plan. For
     any other element, it will create a <code>Test Fragment</code> element called
<code>Workbench Test Fragment and move the elements in it</code>.</li>
@@ -264,6 +264,7 @@ Summary
     <li><bug>61661</bug>Avoid startup/shutdown problems due to 3<sup>rd</sup>
party Thread Listener plugins throwing RuntimeException</li>
     <li><bug>61625</bug>File Editor used in BeanInfo behaves strangely
under all LAFs with impact on CSVDataSet, JSR223, BSF, Beanshell Element</li>
     <li><bug>61844</bug>Maven pom.xml: Libraries used in testing should
have scope test</li>
+    <li><bug>61842</bug>Saving with no changes causes a save and duplicate,
identical backup file</li>
 </ul>
 
  <!--  =================== Thanks =================== -->



Mime
View raw message