localrepo.commit: little cleanups
- use a list for new fileids
- sort the removed files
--- 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 = []