diff -r 28455872cb0e -r 26c78e6f67b8 hgkw/keyword.py --- a/hgkw/keyword.py Mon Jan 08 02:13:04 2007 +0100 +++ b/hgkw/keyword.py Mon Jan 08 02:51:38 2007 +0100 @@ -32,7 +32,7 @@ ''' from mercurial.node import * -from mercurial.i18n import _ +from mercurial.i18n import gettext as _ from mercurial import context, filelog, revlog, util import os.path, re @@ -161,14 +161,12 @@ new = {} linkrev = self.changelog.count() commit.sort() - is_exec = util.execfunc(self.root, m1.execf) - is_link = util.linkfunc(self.root, m1.linkf) for f in commit: ui.note(f + "\n") try: new[f] = self.filecommit(f, m1, m2, linkrev, tr, changed) - m1.set(f, is_exec(f), is_link(f)) - except OSError: + m1.set(f, util.is_exec(self.wjoin(f), m1.execf(f))) + except IOError: if use_dirstate: ui.warn(_("trouble committing %s!\n") % f) raise @@ -178,13 +176,11 @@ # update manifest m1.update(new) remove.sort() - removed = [] for f in remove: if f in m1: del m1[f] - removed.append(f) - mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new, removed)) + mn = self.manifest.add(m1, tr, linkrev, c1[0], c2[0], (new, remove)) # add changeset new = new.keys() @@ -200,7 +196,7 @@ if p2 != nullid: edittext.append("HG: branch merge") edittext.extend(["HG: changed %s" % f for f in changed]) - edittext.extend(["HG: removed %s" % f for f in removed]) + edittext.extend(["HG: removed %s" % f for f in remove]) if not changed and not remove: edittext.append("HG: no files changed") edittext.append("") @@ -218,7 +214,7 @@ text = '\n'.join(lines) if branchname: extra["branch"] = branchname - n = self.changelog.add(mn, changed + removed, text, tr, p1, p2, + n = self.changelog.add(mn, changed + remove, text, tr, p1, p2, user, date, extra) self.hook('pretxncommit', throw=True, node=hex(n), parent1=xp1, parent2=xp2)