--- a/mercurial/context.py Wed Oct 11 16:19:11 2006 -0700
+++ b/mercurial/context.py Wed Oct 11 16:20:35 2006 -0700
@@ -367,7 +367,8 @@
man.set(f, util.is_exec(self._repo.wjoin(f), man.execf(f)))
for f in deleted + removed:
- del man[f]
+ if f in man:
+ del man[f]
self._manifest = man
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-manifest-merging Wed Oct 11 16:20:35 2006 -0700
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+echo % init foo-base
+hg init foo-base
+
+echo % create alpha in first repo
+cd foo-base
+echo 'alpha' > alpha
+hg ci -A -m 'add alpha' -d '1 0'
+cd ..
+
+echo % clone foo-base to foo-work
+hg clone foo-base foo-work
+
+echo % create beta in second repo
+cd foo-work
+echo 'beta' > beta
+hg ci -A -m 'add beta' -d '2 0'
+cd ..
+
+echo % create gamma in first repo
+cd foo-base
+echo 'gamma' > gamma
+hg ci -A -m 'add gamma' -d '3 0'
+cd ..
+
+echo % pull into work and merge
+cd foo-work
+hg pull -q
+hg merge
+
+echo % revert to changeset 1 to simulate a failed merge
+rm -fr *
+hg up -C 1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-manifest-merging.out Wed Oct 11 16:20:35 2006 -0700
@@ -0,0 +1,14 @@
+% init foo-base
+% create alpha in first repo
+adding alpha
+% clone foo-base to foo-work
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+% create beta in second repo
+adding beta
+% create gamma in first repo
+adding gamma
+% pull into work and merge
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+% revert to changeset 1 to simulate a failed merge
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved