comparison tests/test-hgweb-json.t @ 24714:84859415a4c9

json: implement {comparison} template Similar to {filediff}, we abbreviate some property names to cut down on string bloat.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 10 Apr 2015 22:26:53 -0400
parents 2f43f8cf8219
children 1439bacf0ec7
comparison
equal deleted inserted replaced
24713:2f43f8cf8219 24714:84859415a4c9
728 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
729 729
730 $ request json-comparison/f8bbb9024b10/foo 730 $ request json-comparison/f8bbb9024b10/foo
731 200 Script output follows 731 200 Script output follows
732 732
733 "not yet implemented" 733 {
734 "author": "test",
735 "children": [],
736 "comparison": [
737 {
738 "lines": [
739 {
740 "ll": "foo",
741 "ln": 1,
742 "rl": "bar",
743 "rn": 1,
744 "t": "replace"
745 }
746 ]
747 }
748 ],
749 "date": [
750 0.0,
751 0
752 ],
753 "desc": "modify foo",
754 "leftnode": "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e",
755 "node": "f8bbb9024b10f93cdbb8d940337398291d40dea8",
756 "parents": [
757 "06e557f3edf66faa1ccaba5dd8c203c21cc79f1e"
758 ],
759 "path": "foo",
760 "rightnode": "f8bbb9024b10f93cdbb8d940337398291d40dea8"
761 }
734 762
735 annotate/{revision}/{path} shows annotations for each line 763 annotate/{revision}/{path} shows annotations for each line
736 764
737 $ request json-annotate/f8bbb9024b10/foo 765 $ request json-annotate/f8bbb9024b10/foo
738 200 Script output follows 766 200 Script output follows