diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1127,7 +1127,7 @@ class localrepository(object): text = fctx.data() flog = self.file(fname) fparent1 = manifest1.get(fname, nullid) - fparent2 = fparent2o = manifest2.get(fname, nullid) + fparent2 = manifest2.get(fname, nullid) meta = {} copy = fctx.renamed() @@ -1193,9 +1193,8 @@ class localrepository(object): if fparent2 != nullid or flog.cmp(fparent1, text) or meta: changelist.append(fname) return flog.add(text, meta, tr, linkrev, fparent1, fparent2) - # are just the flags changed during merge? - if fparent1 != fparent2o and manifest1.flags(fname) != fctx.flags(): + elif fname in manifest1 and manifest1.flags(fname) != fctx.flags(): changelist.append(fname) return fparent1 diff --git a/tests/test-changelog-exec.t b/tests/test-changelog-exec.t --- a/tests/test-changelog-exec.t +++ b/tests/test-changelog-exec.t @@ -32,17 +32,19 @@ manifest of p1: $ hg merge 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) + $ chmod +x foo $ hg ci -m 'merge' -this should not mention bar: +this should not mention bar but should mention foo: $ hg tip -v - changeset: 3:ef2fc9b4a51b + changeset: 3:c53d17ff3380 tag: tip parent: 2:ed1b79f46b9a parent: 1:d394a8db219b user: test date: Thu Jan 01 00:00:00 1970 +0000 + files: foo description: merge