changeset 14059:c0e29e10b9ef

merge with mpm
author Martin Geisler <mg@lazybytes.net>
date Sat, 30 Apr 2011 15:30:51 +0200
parents 3233b39d756f (current diff) bcfe78c3d15c (diff)
children aaa9a5989405 3956ea942492
files
diffstat 4 files changed, 14 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Apr 30 13:47:22 2011 +0200
+++ b/mercurial/commands.py	Sat Apr 30 15:30:51 2011 +0200
@@ -351,13 +351,12 @@
             else:
                 ui.write(_("The first bad revision is:\n"))
             displayer.show(repo[nodes[0]])
-            parents = repo[nodes[0]].parents()
             extendnode = extendbisectrange(nodes, good)
             if extendnode is not None:
                 ui.write(_('Not all ancestors of this changeset have been'
                            ' checked.\nUse bisect --extend to continue the '
                            'bisection from\nthe common ancestor, %s.\n')
-                         % short(extendnode.node()))
+                         % extendnode)
         else:
             # multiple possible revisions
             if good:
@@ -459,7 +458,7 @@
             extendnode = extendbisectrange(nodes, good)
             if extendnode is not None:
                 ui.write(_("Extending search to changeset %d:%s\n"
-                         % (extendnode.rev(), short(extendnode.node()))))
+                         % (extendnode.rev(), extendnode)))
                 if noupdate:
                     return
                 cmdutil.bail_if_changed(repo)
--- a/mercurial/hgweb/webcommands.py	Sat Apr 30 13:47:22 2011 +0200
+++ b/mercurial/hgweb/webcommands.py	Sat Apr 30 15:30:51 2011 +0200
@@ -80,7 +80,7 @@
                 path=webutil.up(f),
                 text=lines(),
                 rev=fctx.rev(),
-                node=hex(fctx.node()),
+                node=fctx.hex(),
                 author=fctx.user(),
                 date=fctx.date(),
                 desc=fctx.description(),
@@ -239,7 +239,7 @@
     changenav = webutil.revnavgen(pos, revcount, count, web.repo.changectx)
 
     return tmpl(shortlog and 'shortlog' or 'changelog', changenav=changenav,
-                node=hex(ctx.node()), rev=pos, changesets=count,
+                node=ctx.hex(), rev=pos, changesets=count,
                 entries=lambda **x: changelist(limit=0,**x),
                 latestentry=lambda **x: changelist(limit=1,**x),
                 archives=web.archivelist("tip"), revcount=revcount,
@@ -582,7 +582,7 @@
                 last = fnode
 
             yield {"parity": parity.next(),
-                   "node": hex(f.node()),
+                   "node": f.hex(),
                    "rev": f.rev(),
                    "author": f.user(),
                    "desc": f.description(),
@@ -598,7 +598,7 @@
                 annotate=annotate,
                 path=webutil.up(f),
                 rev=fctx.rev(),
-                node=hex(fctx.node()),
+                node=fctx.hex(),
                 author=fctx.user(),
                 date=fctx.date(),
                 desc=fctx.description(),
@@ -655,7 +655,7 @@
             l.insert(0, {"parity": parity.next(),
                          "filerev": i,
                          "file": f,
-                         "node": hex(iterfctx.node()),
+                         "node": iterfctx.hex(),
                          "author": iterfctx.user(),
                          "date": iterfctx.date(),
                          "rename": webutil.renamelink(iterfctx),
@@ -677,7 +677,7 @@
 
     nodefunc = lambda x: fctx.filectx(fileid=x)
     nav = webutil.revnavgen(end - 1, revcount, count, nodefunc)
-    return tmpl("filelog", file=f, node=hex(fctx.node()), nav=nav,
+    return tmpl("filelog", file=f, node=fctx.hex(), nav=nav,
                 entries=lambda **x: entries(limit=0, **x),
                 latestentry=lambda **x: entries(limit=1, **x),
                 revcount=revcount, morevars=morevars, lessvars=lessvars)
@@ -762,7 +762,7 @@
     for (id, type, ctx, vtx, edges) in tree:
         if type != graphmod.CHANGESET:
             continue
-        node = short(ctx.node())
+        node = str(ctx)
         age = templatefilters.age(ctx.date())
         desc = templatefilters.firstline(ctx.description())
         desc = cgi.escape(templatefilters.nonempty(desc))
@@ -790,8 +790,6 @@
 
     topicname = req.form.get('node', [None])[0]
     if not topicname:
-        topic = []
-
         def topics(**map):
             for entries, summary, _ in helpmod.helptable:
                 entries = sorted(entries, key=len)
--- a/mercurial/hgweb/webutil.py	Sat Apr 30 13:47:22 2011 +0200
+++ b/mercurial/hgweb/webutil.py	Sat Apr 30 15:30:51 2011 +0200
@@ -66,7 +66,7 @@
     if len(siblings) == 1 and siblings[0].rev() == hiderev:
         return
     for s in siblings:
-        d = {'node': hex(s.node()), 'rev': s.rev()}
+        d = {'node': s.hex(), 'rev': s.rev()}
         d['user'] = s.user()
         d['date'] = s.date()
         d['description'] = s.description()
--- a/mercurial/localrepo.py	Sat Apr 30 13:47:22 2011 +0200
+++ b/mercurial/localrepo.py	Sat Apr 30 15:30:51 2011 +0200
@@ -509,15 +509,17 @@
             bheads.extend(newnodes)
             if len(bheads) <= 1:
                 continue
+            bheads = sorted(bheads, key=lambda x: self[x].rev())
             # starting from tip means fewer passes over reachable
             while newnodes:
                 latest = newnodes.pop()
                 if latest not in bheads:
                     continue
-                minbhrev = self[min([self[bh].rev() for bh in bheads])].node()
+                minbhrev = self[bheads[0]].node()
                 reachable = self.changelog.reachable(latest, minbhrev)
                 reachable.remove(latest)
-                bheads = [b for b in bheads if b not in reachable]
+                if reachable:
+                    bheads = [b for b in bheads if b not in reachable]
             partial[branch] = bheads
 
     def lookup(self, key):