Show More
@@ -471,7 +471,9 b' def generate(ui, dag, displayer, showpar' | |||
|
471 | 471 | if filematcher is not None: |
|
472 | 472 | revmatchfn = filematcher(ctx.rev()) |
|
473 | 473 | displayer.show(ctx, copies=copies, matchfn=revmatchfn) |
|
474 |
lines = displayer.hunk.pop(rev).split('\n') |
|
|
474 | lines = displayer.hunk.pop(rev).split('\n') | |
|
475 | if not lines[-1]: | |
|
476 | del lines[-1] | |
|
475 | 477 | displayer.flush(rev) |
|
476 | 478 | edges = edgefn(type, char, lines, seen, rev, parents) |
|
477 | 479 | for type, char, lines, coldata in edges: |
@@ -2060,4 +2060,30 b' Test --hidden' | |||
|
2060 | 2060 | [] |
|
2061 | 2061 | [] |
|
2062 | 2062 | |
|
2063 | A template without trailing newline should do something sane | |
|
2064 | ||
|
2065 | $ hg glog -r ::2 --template '{rev} {desc}' | |
|
2066 | o 2 mv b dir/b | |
|
2067 | | | |
|
2068 | o 1 copy a b | |
|
2069 | | | |
|
2070 | ||
|
2071 | Extra newlines must be preserved | |
|
2072 | ||
|
2073 | $ hg glog -r ::2 --template '\n{rev} {desc}\n\n' | |
|
2074 | o | |
|
2075 | | 2 mv b dir/b | |
|
2076 | | | |
|
2077 | o | |
|
2078 | | 1 copy a b | |
|
2079 | | | |
|
2080 | ||
|
2081 | The almost-empty template should do something sane too ... | |
|
2082 | ||
|
2083 | $ hg glog -r ::2 --template '\n' | |
|
2084 | o | |
|
2085 | | | |
|
2086 | o | |
|
2087 | | | |
|
2088 | ||
|
2063 | 2089 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now