Mercurial > hg
comparison tests/test-hgweb-json.t @ 24713:2f43f8cf8219
json: implement {filediff} template
Single letter properties are used to keep payload size down, as diff
representation can be quite large and longer property names can create a
lot of extra work for parsers.
Rename is not yet captured. This can be done in a follow-up.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 10 Apr 2015 22:39:22 -0400 |
parents | 517f3e190a5d |
children | 84859415a4c9 |
comparison
equal
deleted
inserted
replaced
24712:bbf1ae6b6a44 | 24713:2f43f8cf8219 |
---|---|
676 filediff/{revision}/{path} shows changes to a file in a revision | 676 filediff/{revision}/{path} shows changes to a file in a revision |
677 | 677 |
678 $ request json-diff/f8bbb9024b10/foo | 678 $ request json-diff/f8bbb9024b10/foo |
679 200 Script output follows | 679 200 Script output follows |
680 | 680 |
681 "not yet implemented" | 681 { |
682 "author": "test", | |
683 "children": [], | |
684 "date": [ | |
685 0.0, | |
686 0 | |
687 ], | |
688 "desc": "modify foo", | |
689 "diff": [ | |
690 { | |
691 "blockno": 1, | |
692 "lines": [ | |
693 { | |
694 "l": "--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n", | |
695 "n": 1, | |
696 "t": "-" | |
697 }, | |
698 { | |
699 "l": "+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n", | |
700 "n": 2, | |
701 "t": "+" | |
702 }, | |
703 { | |
704 "l": "@@ -1,1 +1,1 @@\n", | |
705 "n": 3, | |
706 "t": "@" | |
707 }, | |
708 { | |
709 "l": "-foo\n", | |
710 "n": 4, | |
711 "t": "-" | |
712 }, | |
713 { | |
714 "l": "+bar\n", | |
715 "n": 5, | |
716 "t": "+" | |
717 } | |
718 ] | |
719 } | |
720 ], | |
721 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8", | |
722 "parents": [ | |
723 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e" | |
724 ], | |
725 "path": "foo" | |
726 } | |
682 | 727 |
683 comparison/{revision}/{path} shows information about before and after for a file | 728 comparison/{revision}/{path} shows information about before and after for a file |
684 | 729 |
685 $ request json-comparison/f8bbb9024b10/foo | 730 $ request json-comparison/f8bbb9024b10/foo |
686 200 Script output follows | 731 200 Script output follows |