Patchwork [4,of,5] trydiff: use 'not in addedset' for symmetry with 'not in removedset'

login
register
mail settings
Submitter Martin von Zweigbergk
Date Dec. 24, 2014, 12:44 a.m.
Message ID <09218e2b5e5da5349166.1419381854@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/7223/
State Accepted
Commit 377124ba6b1034792fdc8deecf5b1b6f16c1fea1
Headers show

Comments

Martin von Zweigbergk - Dec. 24, 2014, 12:44 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1419380700 28800
#      Tue Dec 23 16:25:00 2014 -0800
# Node ID 09218e2b5e5da534916698fb524567625bff9ec3
# Parent  66f1754efb9b0578b09347c40734fbe37598f6e7
trydiff: use 'not in addedset' for symmetry with 'not in removedset'

With the previous change in place, we can safely use 'addedset'.

Patch

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -1807,7 +1807,7 @@ 
         tn = None
         dodiff = True
         header = []
-        if f in man1:
+        if f not in addedset:
             to = getfilectx(f, ctx1).data()
         if f not in removedset:
             tn = getfilectx(f, ctx2).data()