changeset 566:b2c9b36bd639

repo.changes: fix duplicate changes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 repo.changes: fix duplicate changes We need to discard the changed and added lists from dirstate.changes before adding to them when comparing manifests. Otherwise something that changed from rev->parent->working dir will appear twice. Bug spotted by Goffredo Baroncelli <kreijack@libero.it> manifest hash: 64c335e2fe6df6d1ce29d0903f16821c7566768f -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCxcT3ywK+sNU5EO8RAivLAJ4gqbWfMnt+BdyGac/ZGduy2KbNegCgncPV D4ay6Qw9sIodEPjRebvk3GE= =AZd2 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Fri, 01 Jul 2005 14:34:31 -0800
parents 9a80418646dd
children 87f37e61d0db
files mercurial/hg.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Fri Jul 01 14:18:02 2005 -0800
+++ b/mercurial/hg.py	Fri Jul 01 14:34:31 2005 -0800
@@ -686,8 +686,7 @@
         self.dirstate.forget(remove)
 
     def changes(self, node1, node2, files=None):
-        # changed, added, deleted, unknown
-        c, a, d, u, mf2 = [], [], [], [], None
+        mf2, u = None, []
 
         def fcmp(fn, mf):
             t1 = self.wfile(fn).read()
@@ -727,6 +726,9 @@
             change = self.changelog.read(node2)
             mf2 = self.manifest.read(change[0])
 
+        # flush lists from dirstate before comparing manifests
+        c, a = [], []
+
         change = self.changelog.read(node1)
         mf1 = self.manifest.read(change[0]).copy()