Mercurial > hg
changeset 34459:d5c5cc767b7e
extdata: ignore ambiguous identifier as well
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 01 Oct 2017 11:56:41 +0100 |
parents | a1b89c8ad32d |
children | 910adadf08e8 |
files | mercurial/scmutil.py tests/test-extdata.t |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/scmutil.py Sun Oct 01 11:13:09 2017 +0100 +++ b/mercurial/scmutil.py Sun Oct 01 11:56:41 2017 +0100 @@ -1059,9 +1059,10 @@ k, v = l.strip(), "" k = encoding.tolocal(k) - if k in repo: - # we ignore data for nodes that don't exist locally + try: data[repo[k].rev()] = encoding.tolocal(v) + except (error.LookupError, error.RepoLookupError): + pass # we ignore data for nodes that don't exist locally finally: src.close()
--- a/tests/test-extdata.t Sun Oct 01 11:13:09 2017 +0100 +++ b/tests/test-extdata.t Sun Oct 01 11:56:41 2017 +0100 @@ -1,6 +1,6 @@ $ hg init repo $ cd repo - $ for n in 0 1 2 3; do + $ for n in 0 1 2 3 4 5 6 7 8 9 10 11; do > echo $n > $n > hg ci -qAm $n > done @@ -22,6 +22,7 @@ > e834 this is buggy :( > 0625 first post > bogusnode gives no error + > a ambiguous node gives no error > EOF $ hg log -qr "extdata(filedata)"