[PATCH 2 of 3 V2] hgweb: stop issuing ajax requests when there are no more entries in the list

Alexander Plavin alexander at plav.in
Sat Aug 17 17:32:05 CDT 2013


# HG changeset patch
# User Alexander Plavin <alexander at plav.in>
# Date 1376770061 -14400
#      Sun Aug 18 00:07:41 2013 +0400
# Node ID 0d194d5be6416a785f7128d37a5f944af21d999c
# Parent  5b8793da98a62a2c86adbd6d76a8c4608ba9edf6
hgweb: stop issuing ajax requests when there are no more entries in the list

diff -r 5b8793da98a6 -r 0d194d5be641 mercurial/templates/static/mercurial.js
--- a/mercurial/templates/static/mercurial.js	Sat Aug 17 19:48:36 2013 +0400
+++ b/mercurial/templates/static/mercurial.js	Sun Aug 18 00:07:41 2013 +0400
@@ -356,6 +356,10 @@
         if (scrollHeight - (scrollTop + clientHeight) < 50) {
             updateInitiated = true;
 
+            if (!nextHash) {
+                return;
+            }
+
             makeRequest(
                 format(urlFormat, {hash: nextHash}),
                 'GET',


More information about the Mercurial-devel mailing list