##// END OF EJS Templates
webcommands: get correct parents when comparing a removed file (issue4962)...
av6 -
r27158:522ffc18 default
parent child Browse files
Show More
@@ -854,6 +854,7 b' def comparison(web, req, tmpl):'
854 854 return [_('(binary file %s, hash: %s)') % (mt, hex(f.filenode()))]
855 855 return f.data().splitlines()
856 856
857 fctx = None
857 858 parent = ctx.p1()
858 859 leftrev = parent.rev()
859 860 leftnode = parent.node()
@@ -869,10 +870,14 b' def comparison(web, req, tmpl):'
869 870 leftlines = filelines(pfctx)
870 871 else:
871 872 rightlines = ()
872 fctx = ctx.parents()[0][path]
873 leftlines = filelines(fctx)
873 pfctx = ctx.parents()[0][path]
874 leftlines = filelines(pfctx)
874 875
875 876 comparison = webutil.compare(tmpl, context, leftlines, rightlines)
877 if fctx is not None:
878 ctx = fctx
879 else:
880 ctx = ctx
876 881 return tmpl('filecomparison',
877 882 file=path,
878 883 node=hex(ctx.node()),
@@ -884,8 +889,8 b' def comparison(web, req, tmpl):'
884 889 author=ctx.user(),
885 890 rename=rename,
886 891 branch=webutil.nodebranchnodefault(ctx),
887 parent=webutil.parents(fctx),
888 child=webutil.children(fctx),
892 parent=webutil.parents(ctx),
893 child=webutil.children(ctx),
889 894 tags=webutil.nodetagsdict(web.repo, ctx.node()),
890 895 bookmarks=webutil.nodebookmarksdict(web.repo, ctx.node()),
891 896 leftrev=leftrev,
@@ -927,7 +927,7 b' comparison removed file'
927 927 </tr>
928 928 <tr>
929 929 <th>parents</th>
930 <td><a href="/file/0cd96de13884/a">0cd96de13884</a> </td>
930 <td><a href="/file/d73db4d812ff/a">d73db4d812ff</a> </td>
931 931 </tr>
932 932 <tr>
933 933 <th>children</th>
General Comments 0
You need to be logged in to leave comments. Login now