##// END OF EJS Templates
grep: fix hash(linestate) to not include linenum...
Yuya Nishihara -
r45999:e47385ef default
parent child Browse files
Show More
@@ -3400,7 +3400,7 b' def grep(ui, repo, pattern, *pats, **opt'
3400 self.colend = colend
3400 self.colend = colend
3401
3401
3402 def __hash__(self):
3402 def __hash__(self):
3403 return hash((self.linenum, self.line))
3403 return hash(self.line)
3404
3404
3405 def __eq__(self, other):
3405 def __eq__(self, other):
3406 return self.line == other.line
3406 return self.line == other.line
@@ -321,14 +321,61 b' simple JSON without matching lines'
321 }
321 }
322 ]
322 ]
323
323
324 diff of each revision for reference
325
326 $ hg log -p -T'== rev: {rev} ==\n'
327 == rev: 4 ==
328 diff -r 95040cfd017d -r 914fa752cdea port
329 --- a/port Thu Jan 01 00:00:03 1970 +0000
330 +++ b/port Thu Jan 01 00:00:04 1970 +0000
331 @@ -1,4 +1,3 @@
332 export
333 vaportight
334 import/export
335 -import/export
336
337 == rev: 3 ==
338 diff -r 3b325e3481a1 -r 95040cfd017d port
339 --- a/port Thu Jan 01 00:00:02 1970 +0000
340 +++ b/port Thu Jan 01 00:00:03 1970 +0000
341 @@ -1,3 +1,4 @@
342 export
343 vaportight
344 import/export
345 +import/export
346
347 == rev: 2 ==
348 diff -r 8b20f75c1585 -r 3b325e3481a1 port
349 --- a/port Thu Jan 01 00:00:01 1970 +0000
350 +++ b/port Thu Jan 01 00:00:02 1970 +0000
351 @@ -1,2 +1,3 @@
352 -import
353 export
354 +vaportight
355 +import/export
356
357 == rev: 1 ==
358 diff -r f31323c92170 -r 8b20f75c1585 port
359 --- a/port Thu Jan 01 00:00:00 1970 +0000
360 +++ b/port Thu Jan 01 00:00:01 1970 +0000
361 @@ -1,1 +1,2 @@
362 import
363 +export
364
365 == rev: 0 ==
366 diff -r 000000000000 -r f31323c92170 port
367 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
368 +++ b/port Thu Jan 01 00:00:00 1970 +0000
369 @@ -0,0 +1,1 @@
370 +import
371
372
324 all
373 all
325
374
326 $ hg grep --traceback --all -nu port port
375 $ hg grep --traceback --all -nu port port
327 port:4:4:-:spam:import/export
376 port:4:4:-:spam:import/export
328 port:3:4:+:eggs:import/export
377 port:3:4:+:eggs:import/export
329 port:2:1:-:spam:import
378 port:2:1:-:spam:import
330 port:2:2:-:spam:export
331 port:2:1:+:spam:export
332 port:2:2:+:spam:vaportight
379 port:2:2:+:spam:vaportight
333 port:2:3:+:spam:import/export
380 port:2:3:+:spam:import/export
334 port:1:2:+:eggs:export
381 port:1:2:+:eggs:export
@@ -369,26 +416,6 b' all JSON'
369 "user": "spam"
416 "user": "spam"
370 },
417 },
371 {
418 {
372 "change": "-",
373 "date": [2, 0],
374 "lineno": 2,
375 "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
376 "path": "port",
377 "rev": 2,
378 "texts": [{"matched": false, "text": "ex"}, {"matched": true, "text": "port"}],
379 "user": "spam"
380 },
381 {
382 "change": "+",
383 "date": [2, 0],
384 "lineno": 1,
385 "node": "3b325e3481a1f07435d81dfdbfa434d9a0245b47",
386 "path": "port",
387 "rev": 2,
388 "texts": [{"matched": false, "text": "ex"}, {"matched": true, "text": "port"}],
389 "user": "spam"
390 },
391 {
392 "change": "+",
419 "change": "+",
393 "date": [2, 0],
420 "date": [2, 0],
394 "lineno": 2,
421 "lineno": 2,
@@ -460,8 +487,6 b' follow'
460 port:4:4:-:spam:import/export
487 port:4:4:-:spam:import/export
461 port:3:4:+:eggs:import/export
488 port:3:4:+:eggs:import/export
462 port:2:1:-:spam:import
489 port:2:1:-:spam:import
463 port:2:2:-:spam:export
464 port:2:1:+:spam:export
465 port:2:2:+:spam:vaportight
490 port:2:2:+:spam:vaportight
466 port:2:3:+:spam:import/export
491 port:2:3:+:spam:import/export
467 port:1:2:+:eggs:export
492 port:1:2:+:eggs:export
General Comments 0
You need to be logged in to leave comments. Login now