changeset 3620:5be434785317

localrepo.commit: little cleanups - use a list for new fileids - sort the removed files
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 07 Nov 2006 21:43:15 +0100
parents 638193139ba8
children 7d3d603e7df9
files mercurial/localrepo.py
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Mon Nov 06 22:01:09 2006 -0800
+++ b/mercurial/localrepo.py	Tue Nov 07 21:43:15 2006 +0100
@@ -664,29 +664,28 @@
         tr = self.transaction()
 
         # check in files
-        new = {}
+        new = []
         linkrev = self.changelog.count()
         commit.sort()
         for f in commit:
             self.ui.note(f + "\n")
             try:
-                new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
+                m1[f] = self.filecommit(f, m1, m2, linkrev, tr, changed)
                 m1.set(f, util.is_exec(self.wjoin(f), m1.execf(f)))
+                new.append(f)
             except IOError:
                 self.ui.warn(_("trouble committing %s!\n") % f)
                 raise
 
         # update manifest
-        m1.update(new)
+        remove.sort()
+
         for f in remove:
             if f in m1:
                 del m1[f]
         mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new, remove))
 
         # add changeset
-        new = new.keys()
-        new.sort()
-
         user = user or self.ui.username()
         if not text or force_editor:
             edittext = []