# HG changeset patch # User Matt Mackall # Date 2012-05-20 19:40:36 # Node ID d0b9ebba41e9a1733294d5fa1b497ada5eda93c8 # Parent d94c470c3deb53c65fa2d26513aa7a98b186240b # Parent 0a730d3c5aaefae00239b8472703c884192f31b7 merge with stable diff --git a/mercurial/osutil.c b/mercurial/osutil.c --- a/mercurial/osutil.c +++ b/mercurial/osutil.c @@ -331,6 +331,9 @@ static PyObject *_listdir(char *path, in err = lstat(fullpath, &st); #endif if (err == -1) { + /* race with file deletion? */ + if (errno == ENOENT) + continue; strncpy(fullpath + pathlen + 1, ent->d_name, PATH_MAX - pathlen); fullpath[PATH_MAX] = 0; diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -867,6 +867,10 @@ def present(repo, subset, x): """``present(set)`` An empty set, if any revision in set isn't found; otherwise, all revisions in set. + + If any of specified revisions is not present in the local repository, + the query is normally aborted. But this predicate allows the query + to continue even in such cases. """ try: return getset(repo, subset, x)