Patchwork [1,of,3] trydiff: remove unused variable 'modifiedset'

login
register
mail settings
Submitter Martin von Zweigbergk
Date Feb. 2, 2015, 6:10 a.m.
Message ID <e6401a11a73d8bd5b9de.1422857418@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/7588/
State Accepted
Commit d8330fb8c44dada1738cb08029aaed455d65a4ce
Headers show

Comments

Martin von Zweigbergk - Feb. 2, 2015, 6:10 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1422594755 28800
#      Thu Jan 29 21:12:35 2015 -0800
# Branch stable
# Node ID e6401a11a73d8bd5b9de972959d37eddc719a6dc
# Parent  3667bc21b8773715d9472a3b4e034b77e62c6451
trydiff: remove unused variable 'modifiedset'

We started updating 'modifiedset' in a9853fc172d2 (trydiff: simplify
checking for additions, 2014-12-23) but in the same commit, we removed
the last use of the variable. Clean it up.

Patch

diff -r 3667bc21b877 -r e6401a11a73d mercurial/patch.py
--- a/mercurial/patch.py	Sun Feb 01 20:21:02 2015 -0600
+++ b/mercurial/patch.py	Thu Jan 29 21:12:35 2015 -0800
@@ -1788,13 +1788,12 @@ 
     if opts.git:
         revs = None
 
-    modifiedset, addedset, removedset = set(modified), set(added), set(removed)
-    # Fix up modified and added, since merged-in additions appear as
+    addedset, removedset = set(added), set(removed)
+    # Fix up  added, since merged-in additions appear as
     # modifications during merges
-    for f in modifiedset.copy():
+    for f in modified:
         if f not in ctx1:
             addedset.add(f)
-            modifiedset.remove(f)
     for f in sorted(modified + added + removed):
         to = None
         tn = None