diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -27,6 +27,9 @@ class sortdict(dict): def update(self, src): for k in src: self[k] = src[k] + def clear(self): + dict.clear(self) + self._list = [] def items(self): return [(k, self[k]) for k in self._list] def __delitem__(self, key): diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1378,7 +1378,7 @@ def _externalpatch(ui, repo, patcher, pa cwd = repo.getcwd() if cwd: cfiles = [util.pathto(repo.root, cwd, f) - for f in cfile] + for f in cfiles] scmutil.addremove(repo, cfiles, similarity=similarity) code = fp.close() if code: