[PATCH 5/5]: cleaning the template parent management in hgweb

Goffredo Baroncelli kreijack at libero.it
Sat Jul 2 15:10:07 UTC 2005


Hi,

the template pages contain two entry named #parent1# and #parent2#; this is no good
because with the template system implemented in hgweb both the functions 
can be replaced with only one entry named "#parent#".
The code in hgweb will replace this tag with the appropriate number of parents ( one, two...
or more if and when will be used ).

The first two patch perform this change in two step: 
1) change the code to manage only one entry ( #parent1# )
2) remove any reference to #parent2#, and change both the code and the templates to
   rename #parent1# in #parent2#

the last three patchs are clean-up.

The patch are five

- patch #5
remove the unused function hgweb.parent()


# HG changeset patch
# User ghigo at therra.bhome
# Node ID 4cb5f996900b5cb6da3f2541389e0a064b662916
# Parent  a4967d67465ccf4b10f0c4eff9c6da3595d267ea

hgweb: remove the hgweb.parent( ) function

diff -r a4967d67465c -r 4cb5f996900b mercurial/hgweb.py
--- a/mercurial/hgweb.py        Sat Jul  2 15:05:16 2005
+++ b/mercurial/hgweb.py        Sat Jul  2 15:06:04 2005
@@ -150,10 +150,6 @@
             yield self.t("filedifflink", node = hex(changeset), file = f)
         if len(files) > self.maxfiles:
             yield self.t("fileellipses")
-
-    def parent(self, t1, node=nullid, rev=-1, **args):
-        if node != hex(nullid):
-            yield self.t(t1, node = node, rev = rev, **args)

     def parents(self, t1, nodes=[], rev=None,**args):
         if not rev: rev = lambda x: ""



More information about the Mercurial mailing list