##// END OF EJS Templates
Add improved rev lookup to diff and export
mpm@selenic.com -
r38:ed1d3e3c default
parent child Browse files
Show More
@@ -159,15 +159,14 b' elif cmd == "status":'
159 159 for f in d: print "R", f
160 160
161 161 elif cmd == "diff":
162 doptions = {}
163 162 revs = []
164 163
165 164 if args:
165 doptions = {}
166 166 opts = [('r', 'revision', [], 'revision')]
167 167 args = fancyopts.fancyopts(args, opts, doptions,
168 168 'hg diff [options] [files]')
169 # revs = [ repo.lookup(x) for x in doptions['revision'] ]
170 revs = [hg.bin(x) for x in doptions['revision']]
169 revs = map(lambda x: repo.changelog.lookup(x), doptions['revision'])
171 170
172 171 if len(revs) > 2:
173 172 print "too many revisions to diff"
@@ -176,7 +175,7 b' elif cmd == "diff":'
176 175 diff(args, *revs)
177 176
178 177 elif cmd == "export":
179 node = hg.bin(args[0])
178 node = repo.changelog.lookup(args[0])
180 179 prev = repo.changelog.parents(node)[0]
181 180 diff(None, prev, node)
182 181
General Comments 0
You need to be logged in to leave comments. Login now