# HG changeset patch # User mpm@selenic.com # Date 1115511206 28800 # Node ID ed1d3e3ca8e0d2a479af0eba8e006a84486707cc # Parent a8811676c85a29d5ff567b2509737e83e0efcf14 Add improved rev lookup to diff and export diff -r a8811676c85a -r ed1d3e3ca8e0 hg --- a/hg Sat May 07 16:12:31 2005 -0800 +++ b/hg Sat May 07 16:13:26 2005 -0800 @@ -159,15 +159,14 @@ 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 @@ 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)