# HG changeset patch # User mpm@selenic.com # Date 1115511206 28800 # Node ID ed1d3e3ca8e0d2a479af0eba8e006a84486707cc # Parent a8811676c85a29d5ff567b2509737e83e0efcf14 Add improved rev lookup to diff and export diff --git a/hg b/hg --- a/hg +++ b/hg @@ -159,15 +159,14 @@ elif cmd == "status": for f in d: print "R", f elif cmd == "diff": - doptions = {} revs = [] if args: + doptions = {} opts = [('r', 'revision', [], 'revision')] args = fancyopts.fancyopts(args, opts, doptions, 'hg diff [options] [files]') - # revs = [ repo.lookup(x) for x in doptions['revision'] ] - revs = [hg.bin(x) for x in doptions['revision']] + revs = map(lambda x: repo.changelog.lookup(x), doptions['revision']) if len(revs) > 2: print "too many revisions to diff" @@ -176,7 +175,7 @@ elif cmd == "diff": diff(args, *revs) elif cmd == "export": - node = hg.bin(args[0]) + node = repo.changelog.lookup(args[0]) prev = repo.changelog.parents(node)[0] diff(None, prev, node)