# HG changeset patch # User Kevin Bullock # Date 1493760912 18000 # Node ID bb96d4a497432722623ae60d9bc734a1e360179e # Parent 2384a6546927fab9805e45bb4300e21a49de579f# Parent 1527b3890674c2c590ccfcbd94b324f6d5ac277a merge with i18n diff -r 1527b3890674 -r bb96d4a49743 .hgignore --- a/.hgignore Mon May 01 07:23:29 2017 +0900 +++ b/.hgignore Tue May 02 16:35:12 2017 -0500 @@ -62,6 +62,9 @@ mercurial/osutil.py mercurial/parsers.py +# Generated wheels +wheelhouse/ + syntax: regexp ^\.pc/ ^\.(pydev)?project diff -r 1527b3890674 -r bb96d4a49743 Makefile --- a/Makefile Mon May 01 07:23:29 2017 +0900 +++ b/Makefile Tue May 02 16:35:12 2017 -0500 @@ -270,6 +270,14 @@ mkdir -p packages/centos7 contrib/dockerrpm centos7 +linux-wheels: linux-wheels-x86_64 linux-wheels-i686 + +linux-wheels-x86_64: + docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_x86_64 /src/contrib/build-linux-wheels.sh + +linux-wheels-i686: + docker run -e "HGTEST_JOBS=$(shell nproc)" --rm -ti -v `pwd`:/src quay.io/pypa/manylinux1_i686 linux32 /src/contrib/build-linux-wheels.sh + .PHONY: help all local build doc cleanbutpackages clean install install-bin \ install-doc install-home install-home-bin install-home-doc \ dist dist-notests check tests check-code update-pot \ @@ -278,4 +286,5 @@ docker-ubuntu-xenial docker-ubuntu-xenial-ppa \ docker-ubuntu-yakkety docker-ubuntu-yakkety-ppa \ fedora20 docker-fedora20 fedora21 docker-fedora21 \ - centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 + centos5 docker-centos5 centos6 docker-centos6 centos7 docker-centos7 \ + linux-wheels diff -r 1527b3890674 -r bb96d4a49743 contrib/build-linux-wheels.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/build-linux-wheels.sh Tue May 02 16:35:12 2017 -0500 @@ -0,0 +1,34 @@ +#!/bin/bash +# This file is directly inspired by +# https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh +set -e -x + +PYTHON_TARGETS=$(ls -d /opt/python/cp2*/bin) + +# Create an user for the tests +useradd hgbuilder + +# Bypass uid/gid problems +cp -R /src /io && chown -R hgbuilder:hgbuilder /io + +# Compile wheels for Python 2.X +for PYBIN in $PYTHON_TARGETS; do + "${PYBIN}/pip" wheel /io/ -w wheelhouse/ +done + +# Bundle external shared libraries into the wheels with +# auditwheel (https://github.com/pypa/auditwheel) repair. +# It also fix the ABI tag on the wheel making it pip installable. +for whl in wheelhouse/*.whl; do + auditwheel repair "$whl" -w /src/wheelhouse/ +done + +# Install packages and run the tests for all Python versions +cd /io/tests/ + +for PYBIN in $PYTHON_TARGETS; do + # Install mercurial wheel as root + "${PYBIN}/pip" install mercurial --no-index -f /src/wheelhouse + # But run tests as hgbuilder user (non-root) + su hgbuilder -c "\"${PYBIN}/python\" /io/tests/run-tests.py --with-hg=\"${PYBIN}/hg\" --blacklist=/io/contrib/linux-wheel-centos5-blacklist" +done diff -r 1527b3890674 -r bb96d4a49743 contrib/debian/default-tools.rc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/debian/default-tools.rc Tue May 02 16:35:12 2017 -0500 @@ -0,0 +1,5 @@ +[ui] +editor = sensible-editor + +[pager] +pager = sensible-pager diff -r 1527b3890674 -r bb96d4a49743 contrib/linux-wheel-centos5-blacklist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/contrib/linux-wheel-centos5-blacklist Tue May 02 16:35:12 2017 -0500 @@ -0,0 +1,3 @@ +test-convert-git.t +test-subrepo-git.t +test-patchbomb-tls.t diff -r 1527b3890674 -r bb96d4a49743 hgext/rebase.py --- a/hgext/rebase.py Mon May 01 07:23:29 2017 +0900 +++ b/hgext/rebase.py Tue May 02 16:35:12 2017 -0500 @@ -665,10 +665,10 @@ Configuration Options: You can make rebase require a destination if you set the following config - option: + option:: [commands] - rebase.requiredest = False + rebase.requiredest = True Return Values: diff -r 1527b3890674 -r bb96d4a49743 mercurial/color.py --- a/mercurial/color.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/color.py Tue May 02 16:35:12 2017 -0500 @@ -193,7 +193,15 @@ return 'debug' auto = (config == 'auto') - always = not auto and util.parsebool(config) + always = False + if not auto and util.parsebool(config): + # We want the config to behave like a boolean, "on" is actually auto, + # but "always" value is treated as a special case to reduce confusion. + if ui.configsource('ui', 'color') == '--color' or config == 'always': + always = True + else: + auto = True + if not always and not auto: return None diff -r 1527b3890674 -r bb96d4a49743 mercurial/commands.py --- a/mercurial/commands.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/commands.py Tue May 02 16:35:12 2017 -0500 @@ -3334,6 +3334,8 @@ 'o' is a changeset, '@' is a working directory parent, 'x' is obsolete, and '+' represents a fork where the changeset from the lines below is a parent of the 'o' merge on the same line. + Paths in the DAG are represented with '|', '/' and so forth. ':' in place + of a '|' indicates one or more revisions in a path are omitted. .. note:: diff -r 1527b3890674 -r bb96d4a49743 mercurial/context.py --- a/mercurial/context.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/context.py Tue May 02 16:35:12 2017 -0500 @@ -1192,6 +1192,9 @@ `fromline`-`toline` range. """ diffopts = patch.diffopts(fctx._repo.ui) + introrev = fctx.introrev() + if fctx.rev() != introrev: + fctx = fctx.filectx(fctx.filenode(), changeid=introrev) visit = {(fctx.linkrev(), fctx.filenode()): (fctx, (fromline, toline))} while visit: c, linerange2 = visit.pop(max(visit)) @@ -1211,6 +1214,10 @@ # introduced in this revision; no need to go futher in this # branch. continue + # Set _descendantrev with 'c' (a known descendant) so that, when + # _adjustlinkrev is called for 'p', it receives this descendant + # (as srcrev) instead possibly topmost introrev. + p._descendantrev = c.rev() visit[p.linkrev(), p.filenode()] = p, linerange1 if inrange: yield c, linerange2 diff -r 1527b3890674 -r bb96d4a49743 mercurial/discovery.py --- a/mercurial/discovery.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/discovery.py Tue May 02 16:35:12 2017 -0500 @@ -511,7 +511,7 @@ for m in markers: nexts = m[1] # successors if not nexts: # this is a prune marker - nexts = m[5] # parents + nexts = m[5] or () # parents for n in nexts: if n not in seen: seen.add(n) diff -r 1527b3890674 -r bb96d4a49743 mercurial/help.py --- a/mercurial/help.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/help.py Tue May 02 16:35:12 2017 -0500 @@ -203,7 +203,8 @@ def internalshelp(ui): """Generate the index for the "internals" topic.""" - lines = [] + lines = ['To access a subtopic, use "hg help internals.{subtopic-name}"\n', + '\n'] for names, header, doc in internalstable: lines.append(' :%s: %s\n' % (names[0], header)) diff -r 1527b3890674 -r bb96d4a49743 mercurial/help/color.txt --- a/mercurial/help/color.txt Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/help/color.txt Tue May 02 16:35:12 2017 -0500 @@ -1,14 +1,21 @@ -Mercurial can colorizes output from several commands. +Mercurial colorizes output from several commands. For example, the diff command shows additions in green and deletions in red, while the status command shows modified files in magenta. Many other commands have analogous colors. It is possible to customize these colors. -To enable color use:: +To enable color (default) whenever possible use:: [ui] - color = auto + color = yes + +To disable color use:: + + [ui] + color = no + +See :hg:`help config.ui.color` for details. Mode ==== @@ -119,7 +126,7 @@ Custom colors ============= -Because there are only eight standard colors, this module allows you +Because there are only eight standard colors, Mercurial allows you to define color names for other color slots which might be available for your terminal type, assuming terminfo mode. For instance:: diff -r 1527b3890674 -r bb96d4a49743 mercurial/help/config.txt --- a/mercurial/help/config.txt Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/help/config.txt Tue May 02 16:35:12 2017 -0500 @@ -414,16 +414,15 @@ ``mode`` String: control the method used to output color. One of ``auto``, ``ansi``, - ``win32``, ``terminfo`` or ``debug``. In auto mode the color extension will + ``win32``, ``terminfo`` or ``debug``. In auto mode, Mercurial will use ANSI mode by default (or win32 mode on Windows) if it detects a terminal. Any invalid value will disable color. ``pagermode`` - String: optinal override of ``color.mode`` used with pager (from the pager - extensions). + String: optinal override of ``color.mode`` used with pager. On some systems, terminfo mode may cause problems when using - color with the pager extension and less -R. less with the -R option + color with ``less -R`` as a pager program. less with the -R option will only display ECMA-48 color codes, and terminfo mode may sometimes emit codes that less doesn't understand. You can work around this by either using ansi mode (or auto mode), or by using less -r (which will @@ -431,19 +430,18 @@ codes). On some systems (such as MSYS in Windows), the terminal may support - a different color mode than the pager (activated via the "pager" - extension). + a different color mode than the pager program. ``commands`` ------------ ``status.relative`` - Make paths in ``hg status`` output relative to the current directory. + Make paths in :hg:`status` output relative to the current directory. (default: False) ``update.requiredest`` - Require that the user pass a destination when running ``hg update``. - For example, ``hg update .::`` will be allowed, but a plain ``hg update`` + Require that the user pass a destination when running :hg:`update`. + For example, :hg:`update .::` will be allowed, but a plain :hg:`update` will be disallowed. (default: False) @@ -1363,6 +1361,27 @@ the executable name of the tool. (default: None) +``pager`` +--------- + +Setting used to control when to paginate and with what external tool. See +:hg:`help pager` for details. + +``pager`` + Define the external tool used as pager. + + If no pager is set, Mercurial uses the environment variable $PAGER. + If neither pager.pager, nor $PAGER is set, a default pager will be + used, typically `less` on Unix and `more` on Windows. Example:: + + [pager] + pager = less -FRX + +``ignore`` + List of commands to disable the pager for. Example:: + + [pager] + ignore = version, help, update ``patch`` --------- @@ -1862,11 +1881,9 @@ By default, the first bundle advertised by the server is used. ``color`` - String: when to use to colorize output. possible value are auto, always, - never, or debug (default: auto). 'auto' will use color whenever it seems - possible. See :hg:`help color` for details. - - (in addition a boolean can be used in place always/never) + When to colorize output. Possible value are Boolean ("yes" or "no"), or + "debug", or "always". (default: "yes"). "yes" will use color whenever it + seems possible. See :hg:`help color` for details. ``commitsubrepos`` Whether to commit modified subrepositories when committing the @@ -1943,6 +1960,10 @@ The path to a directory used to store generated .orig files. If the path is not a directory, one will be created. +``paginate`` + Control the pagination of command output (default: True). See :hg:`help pager` + for details. + ``patch`` An optional external tool that ``hg import`` and some extensions will use for applying patches. By default Mercurial uses an diff -r 1527b3890674 -r bb96d4a49743 mercurial/help/pager.txt --- a/mercurial/help/pager.txt Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/help/pager.txt Tue May 02 16:35:12 2017 -0500 @@ -6,9 +6,9 @@ [pager] pager = less -FRX -If no pager is set, the pager extensions uses the environment variable +If no pager is set, Mercurial uses the environment variable $PAGER. If neither pager.pager, nor $PAGER is set, a default pager -will be used, typically `more`. +will be used, typically `less` on Unix and `more` on Windows. You can disable the pager for certain commands by adding them to the pager.ignore list:: @@ -20,16 +20,16 @@ to specify them in your user configuration file. To control whether the pager is used at all for an individual command, -you can use --pager=:: +you can use --pager=: - use as needed: `auto`. - require the pager: `yes` or `on`. - suppress the pager: `no` or `off` (any unrecognized value - will also work). + will also work). To globally turn off all attempts to use a pager, set:: - [pager] - enable = false + [ui] + paginate = never which will prevent the pager from running. diff -r 1527b3890674 -r bb96d4a49743 mercurial/help/revisions.txt --- a/mercurial/help/revisions.txt Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/help/revisions.txt Tue May 02 16:35:12 2017 -0500 @@ -109,10 +109,10 @@ [revsetalias] issue(a1) = grep(r'\bissue[ :]?' ## a1 ## r'\b|\bbug\(' ## a1 ## r'\)') - ``issue(1234)`` is equivalent to - ``grep(r'\bissue[ :]?1234\b|\bbug\(1234\)')`` - in this case. This matches against all of "issue 1234", "issue:1234", - "issue1234" and "bug(1234)". + ``issue(1234)`` is equivalent to + ``grep(r'\bissue[ :]?1234\b|\bbug\(1234\)')`` + in this case. This matches against all of "issue 1234", "issue:1234", + "issue1234" and "bug(1234)". There is a single postfix operator: @@ -132,9 +132,8 @@ insensitive match on a case-sensitive predicate, use a regular expression, prefixed with ``(?i)``. - For example:: - - ``tag(r're:(?i)release')`` matches "release" or "RELEASE" or "Release", etc +For example, ``tag(r're:(?i)release')`` matches "release" or "RELEASE" +or "Release", etc Predicates ========== diff -r 1527b3890674 -r bb96d4a49743 mercurial/hgweb/webcommands.py --- a/mercurial/hgweb/webcommands.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/hgweb/webcommands.py Tue May 02 16:35:12 2017 -0500 @@ -131,6 +131,7 @@ f = fctx.path() text = fctx.data() parity = paritygen(web.stripecount) + ishead = fctx.filerev() in fctx.filelog().headrevs() if util.binary(text): mt = mimetypes.guess_type(f)[0] or 'application/octet-stream' @@ -150,6 +151,7 @@ symrev=webutil.symrevorshortnode(req, fctx), rename=webutil.renamelink(fctx), permissions=fctx.manifest().flags(f), + ishead=int(ishead), **webutil.commonentry(web.repo, fctx)) @webcommand('file') diff -r 1527b3890674 -r bb96d4a49743 mercurial/httppeer.py --- a/mercurial/httppeer.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/httppeer.py Tue May 02 16:35:12 2017 -0500 @@ -80,7 +80,7 @@ except httplib.HTTPException as e: raise error.PeerTransportError( _('HTTP request error (%s)') % e, - hint=_('this may be an intermittent failure; ' + hint=_('this may be an intermittent network failure; ' 'if the error persists, consider contacting the ' 'network or server operator')) diff -r 1527b3890674 -r bb96d4a49743 mercurial/lock.py --- a/mercurial/lock.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/lock.py Tue May 02 16:35:12 2017 -0500 @@ -131,6 +131,9 @@ except (OSError, IOError) as why: if why.errno == errno.EEXIST: locker = self._readlock() + if locker is None: + continue + # special case where a parent process holds the lock -- this # is different from the pid being different because we do # want the unlock and postrelease functions to be called, @@ -148,6 +151,12 @@ raise error.LockUnavailable(why.errno, why.strerror, why.filename, self.desc) + if not self.held: + # use empty locker to mean "busy for frequent lock/unlock + # by many processes" + raise error.LockHeld(errno.EAGAIN, + self.vfs.join(self.f), self.desc, "") + def _readlock(self): """read lock and return its value diff -r 1527b3890674 -r bb96d4a49743 mercurial/patch.py --- a/mercurial/patch.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/patch.py Tue May 02 16:35:12 2017 -0500 @@ -992,6 +992,38 @@ 'record': _("record this change to '%s'?"), 'revert': _("revert this change to '%s'?"), }[operation], + 'help': { + 'discard': _('[Ynesfdaq?]' + '$$ &Yes, discard this change' + '$$ &No, skip this change' + '$$ &Edit this change manually' + '$$ &Skip remaining changes to this file' + '$$ Discard remaining changes to this &file' + '$$ &Done, skip remaining changes and files' + '$$ Discard &all changes to all remaining files' + '$$ &Quit, discarding no changes' + '$$ &? (display help)'), + 'record': _('[Ynesfdaq?]' + '$$ &Yes, record this change' + '$$ &No, skip this change' + '$$ &Edit this change manually' + '$$ &Skip remaining changes to this file' + '$$ Record remaining changes to this &file' + '$$ &Done, skip remaining changes and files' + '$$ Record &all changes to all remaining files' + '$$ &Quit, recording no changes' + '$$ &? (display help)'), + 'revert': _('[Ynesfdaq?]' + '$$ &Yes, revert this change' + '$$ &No, skip this change' + '$$ &Edit this change manually' + '$$ &Skip remaining changes to this file' + '$$ Revert remaining changes to this &file' + '$$ &Done, skip remaining changes and files' + '$$ Revert &all changes to all remaining files' + '$$ &Quit, reverting no changes' + '$$ &? (display help)') + }[operation] } def prompt(skipfile, skipall, query, chunk): @@ -1010,16 +1042,7 @@ if skipfile is not None: return skipfile, skipfile, skipall, newpatches while True: - resps = _('[Ynesfdaq?]' - '$$ &Yes, record this change' - '$$ &No, skip this change' - '$$ &Edit this change manually' - '$$ &Skip remaining changes to this file' - '$$ Record remaining changes to this &file' - '$$ &Done, skip remaining changes and files' - '$$ Record &all changes to all remaining files' - '$$ &Quit, recording no changes' - '$$ &? (display help)') + resps = messages['help'] r = ui.promptchoice("%s %s" % (query, resps)) ui.write("\n") if r == 8: # ? diff -r 1527b3890674 -r bb96d4a49743 mercurial/rcutil.py --- a/mercurial/rcutil.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/rcutil.py Tue May 02 16:35:12 2017 -0500 @@ -21,6 +21,7 @@ else: from . import scmposix as scmplatform +fallbackpager = scmplatform.fallbackpager systemrcpath = scmplatform.systemrcpath userrcpath = scmplatform.userrcpath diff -r 1527b3890674 -r bb96d4a49743 mercurial/revset.py --- a/mercurial/revset.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/revset.py Tue May 02 16:35:12 2017 -0500 @@ -926,6 +926,7 @@ revs = getset(repo, fullreposet(repo), args['startrev']) if len(revs) != 1: raise error.ParseError( + # i18n: "followlines" is a keyword _("followlines expects exactly one revision")) rev = revs.last() @@ -936,9 +937,11 @@ m = matchmod.match(repo.root, repo.getcwd(), [pat], ctx=repo[rev]) files = [f for f in repo[rev] if m(f)] if len(files) != 1: + # i18n: "followlines" is a keyword raise error.ParseError(_("followlines expects exactly one file")) fname = files[0] + # i18n: "followlines" is a keyword lr = getrange(args['lines'][0], _("followlines expects a line range")) fromline, toline = [getinteger(a, _("line range bounds must be integers")) for a in lr] @@ -948,7 +951,8 @@ descend = False if 'descend' in args: descend = getboolean(args['descend'], - _("'descend' argument must be a boolean")) + # i18n: "descend" is a keyword + _("descend argument must be a boolean")) if descend: rs = generatorset( (c.rev() for c, _linerange diff -r 1527b3890674 -r bb96d4a49743 mercurial/scmposix.py --- a/mercurial/scmposix.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/scmposix.py Tue May 02 16:35:12 2017 -0500 @@ -12,6 +12,12 @@ pycompat, ) +# BSD 'more' escapes ANSI color sequences by default. This can be disabled by +# $MORE variable, but there's no compatible option with Linux 'more'. Given +# OS X is widely used and most modern Unix systems would have 'less', setting +# 'less' as the default seems reasonable. +fallbackpager = 'less' + def _rcfiles(path): rcs = [os.path.join(path, 'hgrc')] rcdir = os.path.join(path, 'hgrc.d') diff -r 1527b3890674 -r bb96d4a49743 mercurial/scmutil.py --- a/mercurial/scmutil.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/scmutil.py Tue May 02 16:35:12 2017 -0500 @@ -151,10 +151,12 @@ # Mercurial-specific first, followed by built-in and library exceptions except error.LockHeld as inst: if inst.errno == errno.ETIMEDOUT: - reason = _('timed out waiting for lock held by %s') % inst.locker + reason = _('timed out waiting for lock held by %r') % inst.locker else: - reason = _('lock held by %s') % inst.locker + reason = _('lock held by %r') % inst.locker ui.warn(_("abort: %s: %s\n") % (inst.desc or inst.filename, reason)) + if not inst.locker: + ui.warn(_("(lock might be very busy)\n")) except error.LockUnavailable as inst: ui.warn(_("abort: could not lock %s: %s\n") % (inst.desc or inst.filename, inst.strerror)) diff -r 1527b3890674 -r bb96d4a49743 mercurial/scmwindows.py --- a/mercurial/scmwindows.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/scmwindows.py Tue May 02 16:35:12 2017 -0500 @@ -16,6 +16,9 @@ except ImportError: import winreg +# MS-DOS 'more' is the only pager available by default on Windows. +fallbackpager = 'more' + def systemrcpath(): '''return default os-specific hgrc search path''' rcpath = [] diff -r 1527b3890674 -r bb96d4a49743 mercurial/sshpeer.py --- a/mercurial/sshpeer.py Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/sshpeer.py Tue May 02 16:35:12 2017 -0500 @@ -91,7 +91,15 @@ return self._call('write', data) def read(self, size): - return self._call('read', size) + r = self._call('read', size) + if size != 0 and not r: + # We've observed a condition that indicates the + # stdout closed unexpectedly. Check stderr one + # more time and snag anything that's there before + # letting anyone know the main part of the pipe + # closed prematurely. + _forwardoutput(self._ui, self._side) + return r def readline(self): return self._call('readline') diff -r 1527b3890674 -r bb96d4a49743 mercurial/templates/gitweb/filerevision.tmpl --- a/mercurial/templates/gitweb/filerevision.tmpl Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/templates/gitweb/filerevision.tmpl Tue May 02 16:35:12 2017 -0500 @@ -64,7 +64,7 @@
-
{text%fileline}
+
{text%fileline}
diff -r 1527b3890674 -r bb96d4a49743 mercurial/templates/paper/filerevision.tmpl --- a/mercurial/templates/paper/filerevision.tmpl Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/templates/paper/filerevision.tmpl Tue May 02 16:35:12 2017 -0500 @@ -71,7 +71,7 @@
line wrap: on
line source
-
{text%fileline}
+
{text%fileline}
diff -r 1527b3890674 -r bb96d4a49743 mercurial/templates/static/followlines.js --- a/mercurial/templates/static/followlines.js Mon May 01 07:23:29 2017 +0900 +++ b/mercurial/templates/static/followlines.js Tue May 02 16:35:12 2017 -0500 @@ -17,6 +17,8 @@ return; } + var isHead = parseInt(sourcelines.dataset.ishead || "0"); + // tooltip to invite on lines selection var tooltip = document.createElement('div'); tooltip.id = 'followlines-tooltip'; @@ -153,7 +155,7 @@ // append the
element to last line of the // selection block - var divAndButton = followlinesBox(targetUri, startId, endId); + var divAndButton = followlinesBox(targetUri, startId, endId, isHead); var div = divAndButton[0], button = divAndButton[1]; inviteElement.appendChild(div); @@ -186,7 +188,7 @@ sourcelines.addEventListener('click', lineSelectStart); //** return a
and inner cancel