Mercurial > hg
changeset 13660:a56c1b2bff18
Updating hgext.extdiff to use revsets
author | David Wolever <david@wolever.net> |
---|---|
date | Tue, 15 Mar 2011 17:50:02 -0400 |
parents | a73f38d8bbdb |
children | ee349e228835 |
files | hgext/extdiff.py tests/test-extdiff.t |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/extdiff.py Wed Mar 16 16:07:06 2011 +0100 +++ b/hgext/extdiff.py Tue Mar 15 17:50:02 2011 -0400 @@ -121,7 +121,7 @@ msg = _('cannot specify --rev and --change at the same time') raise util.Abort(msg) elif change: - node2 = repo.lookup(change) + node2 = cmdutil.revsingle(repo, change, None).node() node1a, node1b = repo.changelog.parents(node2) else: node1a, node2 = cmdutil.revpair(repo, revs)
--- a/tests/test-extdiff.t Wed Mar 16 16:07:06 2011 +0100 +++ b/tests/test-extdiff.t Tue Mar 15 17:50:02 2011 -0400 @@ -168,3 +168,12 @@ diffing this a.8a5febb7f867/a a.34eed99112ab/a [1] +Test with revsets: + + $ hg extdif -p echo -c "rev(1)" + a.8a5febb7f867/a a.34eed99112ab/a + [1] + + $ hg extdif -p echo -r "0::1" + a.8a5febb7f867/a a.34eed99112ab/a + [1]