Wed, 14 Feb 2018 16:06:54 +0530 py3: add b'' to make sure regex pattern are bytes in hgweb/webutil.py
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 16:06:54 +0530] rev 36183
py3: add b'' to make sure regex pattern are bytes in hgweb/webutil.py # skip-blame because we are just adding b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D2260
Wed, 14 Feb 2018 15:58:11 +0530 py3: add b'' prefixes in test-worker.t
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 15:58:11 +0530] rev 36182
py3: add b'' prefixes in test-worker.t # skip-blame because we are just adding b'' Differential Revision: https://phab.mercurial-scm.org/D2258
Wed, 14 Feb 2018 15:46:57 +0530 py3: add b'' prefixes to make printrevset.py work in test-glog.t
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 15:46:57 +0530] rev 36181
py3: add b'' prefixes to make printrevset.py work in test-glog.t # skip-blame because we are just adding b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D2257
Wed, 14 Feb 2018 15:43:03 +0530 py3: slice over bytes to prevent getting ascii values
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 14 Feb 2018 15:43:03 +0530] rev 36180
py3: slice over bytes to prevent getting ascii values Differential Revision: https://phab.mercurial-scm.org/D2256
Wed, 14 Feb 2018 00:18:35 -0500 python3: whitelist another 5 passing tests
Augie Fackler <augie@google.com> [Wed, 14 Feb 2018 00:18:35 -0500] rev 36179
python3: whitelist another 5 passing tests Differential Revision: https://phab.mercurial-scm.org/D2252
Tue, 13 Feb 2018 23:00:01 -0700 py3: introduce and use pycompat.getargspec
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 23:00:01 -0700] rev 36178
py3: introduce and use pycompat.getargspec This is getfullargspec on py3, which means we can't use namedtuple named accessors for all fields (eg keywords from getargspec is varkw from getfullargspec, with the same meaning). Solves some warning issues on Python 3. I didn't clean up httpclient because that's vendored code I think we should probably discard, and I didn't touch the manpage generator for now either. Differential Revision: https://phab.mercurial-scm.org/D2251
Tue, 13 Feb 2018 23:37:58 -0500 merge: coerce nodes to bytes, not str
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 23:37:58 -0500] rev 36177
merge: coerce nodes to bytes, not str Differential Revision: https://phab.mercurial-scm.org/D2250
Tue, 13 Feb 2018 19:12:44 -0500 py3: whitelist more passing tests
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 19:12:44 -0500] rev 36176
py3: whitelist more passing tests I had some good success tonight with histedit tests. test-histedit-fold.t is now low-hanging fruit: it is only failing because the logic for setting environment variables in hook.py is slightly busted. Specifically, hook.py line 142 should be making sure it puts strings in the env dict, not bytes, to avoid b'' goo in environment variables. Differential Revision: https://phab.mercurial-scm.org/D2249
Tue, 13 Feb 2018 18:46:47 -0500 histedit: binascii.unhexlify (aka node.bin) throws new exception type on py3
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:46:47 -0500] rev 36175
histedit: binascii.unhexlify (aka node.bin) throws new exception type on py3 Lucky for us, the exception type exists on 2.7, so we can include it in the except block without any extra work. Differential Revision: https://phab.mercurial-scm.org/D2244
Tue, 13 Feb 2018 13:23:18 -0800 treemanifest: add an optimized __nonzero__()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 13 Feb 2018 13:23:18 -0800] rev 36174
treemanifest: add an optimized __nonzero__() We use bool(manifest) in at least some places: localrepo.py:1730 hgweb/webcommands.py:524 Since the treemanifest class doesn't define __nonzero__() (before this patch), bool(manifest) will instead call __len__(), which can be slow for treemanifests. This patch may make a noticeable difference in the localrepo case above, but that only happens when committing a merge and I haven't timed it. Note that Durham already added a __nonzero__ implementation to manifestdict in b19291e5d506 (manifest: add __nonzero__ method, 2016-11-03). Differential Revision: https://phab.mercurial-scm.org/D2232
Tue, 13 Feb 2018 18:49:06 -0500 tests: port fakemergerecord to python3
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:49:06 -0500] rev 36173
tests: port fakemergerecord to python3 Differential Revision: https://phab.mercurial-scm.org/D2248
Tue, 13 Feb 2018 18:48:47 -0500 tests: add some b-prefixes on local script in test-histedit-arguments
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:48:47 -0500] rev 36172
tests: add some b-prefixes on local script in test-histedit-arguments # skip-blame its just more b prefixes and a file in binary mode Differential Revision: https://phab.mercurial-scm.org/D2247
Tue, 13 Feb 2018 18:47:55 -0500 tests: add bytes prefixes to test-histedit-fold.t's local extension
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:47:55 -0500] rev 36171
tests: add bytes prefixes to test-histedit-fold.t's local extension # skip-blame b prefixes Differential Revision: https://phab.mercurial-scm.org/D2246
Tue, 13 Feb 2018 18:25:05 -0500 histedit: fix silly bug that was unpacking a bytestr before writing it
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:25:05 -0500] rev 36170
histedit: fix silly bug that was unpacking a bytestr before writing it I have this foggy notion that popbuffer() might have returned a list in the past, but it doesn't anymore, and this was breaking on Python 3. As a bonus, it's probably a ton faster on Python 2 now. Differential Revision: https://phab.mercurial-scm.org/D2243
Tue, 13 Feb 2018 18:13:33 -0500 py3: whitelist another 8 passing tests
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:13:33 -0500] rev 36169
py3: whitelist another 8 passing tests Differential Revision: https://phab.mercurial-scm.org/D2242
Tue, 13 Feb 2018 17:25:43 -0500 histedit: modernize write of histedit-last-edit file
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 17:25:43 -0500] rev 36168
histedit: modernize write of histedit-last-edit file Differential Revision: https://phab.mercurial-scm.org/D2241
Tue, 13 Feb 2018 17:25:25 -0500 histedit: convert bool to bytestring manually
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 17:25:25 -0500] rev 36167
histedit: convert bool to bytestring manually Yes, this format has 'True' and 'False' in it. I'm sorry, as it's almost certainly my fault. Differential Revision: https://phab.mercurial-scm.org/D2240
Tue, 13 Feb 2018 13:38:38 -0500 narrowcommands: more byteskwargs cleanup
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 13:38:38 -0500] rev 36166
narrowcommands: more byteskwargs cleanup Differential Revision: https://phab.mercurial-scm.org/D2239
Tue, 13 Feb 2018 13:37:43 -0500 narrowmerge: iterate over a copy of dict items so we can mutate the dict
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 13:37:43 -0500] rev 36165
narrowmerge: iterate over a copy of dict items so we can mutate the dict Differential Revision: https://phab.mercurial-scm.org/D2238
Tue, 13 Feb 2018 18:00:59 -0500 contrib: ban $RANDOM using check-code
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 18:00:59 -0500] rev 36164
contrib: ban $RANDOM using check-code Differential Revision: https://phab.mercurial-scm.org/D2237
Tue, 13 Feb 2018 17:58:40 -0500 tests: remove use of bashism $RANDOM to fix test-narrow.t on non-bash shells
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 17:58:40 -0500] rev 36163
tests: remove use of bashism $RANDOM to fix test-narrow.t on non-bash shells This test passed on our workstations, including on Macs, so we never noticed, but it fails on both the Linux and FreeBSD buildbots. Today I learned about a bash feature, wherein $RANDOM gives a random int every time you read it. check-code rule to follow. Differential Revision: https://phab.mercurial-scm.org/D2236
Tue, 13 Feb 2018 14:39:02 -0500 narrow: fix for getting the username when running http server
Sandu Turcan <idlsoft@gmail.com> [Tue, 13 Feb 2018 14:39:02 -0500] rev 36162
narrow: fix for getting the username when running http server Differential Revision: https://phab.mercurial-scm.org/D2231
Mon, 12 Feb 2018 16:22:31 -0800 tests: remove code to support Mercurial 4.3
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Feb 2018 16:22:31 -0800] rev 36161
tests: remove code to support Mercurial 4.3 Now that narrow lives in core, we don't need the legacy support. Differential Revision: https://phab.mercurial-scm.org/D2202
Mon, 12 Feb 2018 16:21:34 -0800 narrowspec: move module into core
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Feb 2018 16:21:34 -0800] rev 36160
narrowspec: move module into core Having support for parsing the narrow specification in core is necessary for moving many other parts of narrow to core. We do still want to harmonize the narrow spec with the sparse spec. And the format needs to be documented. But this shouldn't hold up the code moving to core. Differential Revision: https://phab.mercurial-scm.org/D2201
Mon, 12 Feb 2018 16:15:34 -0800 hg: move share._getsrcrepo into core
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Feb 2018 16:15:34 -0800] rev 36159
hg: move share._getsrcrepo into core The fact we were calling this from extensions was a sign that it should live in core. We were also able to remove some extra attribute aliases from the share extension. Differential Revision: https://phab.mercurial-scm.org/D2200
Mon, 12 Feb 2018 15:49:15 -0800 tests: glob over line number
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Feb 2018 15:49:15 -0800] rev 36158
tests: glob over line number Differential Revision: https://phab.mercurial-scm.org/D2199
Mon, 12 Feb 2018 15:39:47 -0800 tests: remove references to bundle2-exp config option
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Feb 2018 15:39:47 -0800] rev 36157
tests: remove references to bundle2-exp config option This option was deleted a while ago. We don't even alias it in core. Differential Revision: https://phab.mercurial-scm.org/D2198
Tue, 13 Feb 2018 11:12:36 -0500 py3: whitelist another six passing tests
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 11:12:36 -0500] rev 36156
py3: whitelist another six passing tests Differential Revision: https://phab.mercurial-scm.org/D2230
Tue, 13 Feb 2018 10:54:58 -0500 narrowrepo: filter() is a generator on py3, wrap in list()
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 10:54:58 -0500] rev 36155
narrowrepo: filter() is a generator on py3, wrap in list() Was at the top of Python 3 exceptions. Differential Revision: https://phab.mercurial-scm.org/D2229
Tue, 13 Feb 2018 10:39:31 -0500 narrowcommands: use pycompat.{bytes,str}kwargs
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 10:39:31 -0500] rev 36154
narrowcommands: use pycompat.{bytes,str}kwargs Differential Revision: https://phab.mercurial-scm.org/D2228
Tue, 13 Feb 2018 10:38:02 -0500 debugcommands: mergestate version is an int, use %d on it
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 10:38:02 -0500] rev 36153
debugcommands: mergestate version is an int, use %d on it Differential Revision: https://phab.mercurial-scm.org/D2227
Tue, 13 Feb 2018 10:20:57 -0500 progress: use %d to format ints instead of %s
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 10:20:57 -0500] rev 36152
progress: use %d to format ints instead of %s Due to behavioral changes between '% Ns' and '% Nd' this has some unfortunate extra dancing. I'm not sure of a better way to solve this problem. Differential Revision: https://phab.mercurial-scm.org/D2226
Tue, 13 Feb 2018 08:43:14 -0500 progress: determine padding width portably
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 08:43:14 -0500] rev 36151
progress: determine padding width portably Differential Revision: https://phab.mercurial-scm.org/D2225
Tue, 13 Feb 2018 08:41:42 -0500 branchmap: wrap builtin exception in bytes for logging
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 08:41:42 -0500] rev 36150
branchmap: wrap builtin exception in bytes for logging Differential Revision: https://phab.mercurial-scm.org/D2224
Sat, 23 Dec 2017 15:11:13 +0530 remotenames: add three new revsets related to remotenames
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 23 Dec 2017 15:11:13 +0530] rev 36149
remotenames: add three new revsets related to remotenames This patch adds three new revsets 'remotenames', 'remotebookmarks' and 'remotebranches' which will return changesets which have remotenames, remotebookmarks and remotebranches on them respectively. The remotenames revset exist in hgremotenames extension and is moved from there whereas rest of the two revsets are introduced in this patch. hgremotenames: https://bitbucket.org/seanfarley/hgremotenames Differential Revision: https://phab.mercurial-scm.org/D2002
Tue, 13 Feb 2018 21:52:51 +0900 convert: fix line ending of mapfile and commit.desc file
Yuya Nishihara <yuya@tcha.org> [Tue, 13 Feb 2018 21:52:51 +0900] rev 36148
convert: fix line ending of mapfile and commit.desc file Follows up 42a393ea56d2. CRLF vs LF doesn't really matter as we do strip() or rstrip() on read, but mixing them isn't nice. So let's restore the old behavior. I don't know whether CVS/Root, CVS/Repository, and ~/.cvspass are written in native line ending, so I leave them read as binary files.
Sun, 11 Feb 2018 18:34:22 -0800 py3: port string formatting
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 18:34:22 -0800] rev 36147
py3: port string formatting `skipped` is a set of integer revs here. So cast integers to strings using %d. None doesn't cast to an empty string on Python 3. So use '' explicitly. Differential Revision: https://phab.mercurial-scm.org/D2146
Thu, 25 Jan 2018 21:16:28 -0500 bdiff: write a native version of splitnewlines
Augie Fackler <augie@google.com> [Thu, 25 Jan 2018 21:16:28 -0500] rev 36146
bdiff: write a native version of splitnewlines ./hg perfunidiff mercurial/manifest.py 0 --count 500 --profile before: ! wall 0.309280 comb 0.350000 user 0.290000 sys 0.060000 (best of 32) ./hg perfunidiff mercurial/manifest.py 0 --count 500 --profile after: ! wall 0.241572 comb 0.260000 user 0.240000 sys 0.020000 (best of 39) so it's about 20% faster. I hate Python. I wish we could usefully write this in Rust, but it doesn't look like that's realistic without using the cpython crate, which I'd still like to avoid. Differential Revision: https://phab.mercurial-scm.org/D1973
Mon, 12 Feb 2018 16:09:31 +0100 label: enforce the lack of leading or trailing white space
Boris Feld <boris.feld@octobus.net> [Mon, 12 Feb 2018 16:09:31 +0100] rev 36145
label: enforce the lack of leading or trailing white space In practice, all commands create label are currently striping external white space. Let us enforce this logic at a lower level before starting to rely on it elsewhere.
Tue, 13 Feb 2018 00:05:45 +0100 buildrpm: bump bundled docutils version to 0.14 when building for centos{5,6}
Antonio Muci <a.mux@inwind.it> [Tue, 13 Feb 2018 00:05:45 +0100] rev 36144
buildrpm: bump bundled docutils version to 0.14 when building for centos{5,6} when building rpm packages for centos 5 and 6, we bundle a mercurial-specific version of docutils in /opt/python-hg/lib/python2.7/site-packages/docutils Let's bump the embedded docutils version from 0.12 (released in 2014) to 0.14 (latest as of today)
Mon, 12 Feb 2018 23:59:36 +0100 buildrpm: bump bundled python version to 2.7.14 when building for centos{5,6}
Antonio Muci <a.mux@inwind.it> [Mon, 12 Feb 2018 23:59:36 +0100] rev 36143
buildrpm: bump bundled python version to 2.7.14 when building for centos{5,6} when building rpm packages for centos 5 and 6, we bundle a mercurial-specific version of python 2.7 in /opt/python-hg Let's bump the embedded python version from 2.7.10 (released in 2015) to 2.7.14 (latest as of today)
Sun, 11 Feb 2018 13:25:56 -0500 merge: invoke scmutil.fileprefetchhooks() prior to applying updates
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 13:25:56 -0500] rev 36142
merge: invoke scmutil.fileprefetchhooks() prior to applying updates This moves the file list calculation into core, so other extensions don't need to duplicate it.
Sun, 11 Feb 2018 00:40:27 -0500 revert: drop the remnant of the prefetchfiles hook
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 00:40:27 -0500] rev 36141
revert: drop the remnant of the prefetchfiles hook
Sun, 11 Feb 2018 00:51:22 -0500 cat: migrate to the fileprefetch callback mechanism
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 00:51:22 -0500] rev 36140
cat: migrate to the fileprefetch callback mechanism
Sun, 11 Feb 2018 00:49:43 -0500 archive: migrate to the fileprefetch callback mechanism
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 00:49:43 -0500] rev 36139
archive: migrate to the fileprefetch callback mechanism
Sun, 11 Feb 2018 00:30:15 -0500 lfs: migrate to the fileprefetch callback mechanism
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 00:30:15 -0500] rev 36138
lfs: migrate to the fileprefetch callback mechanism
Sun, 11 Feb 2018 00:23:57 -0500 cmdutil: convert the prefetchfiles() hook to a callback mechanism (API)
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 00:23:57 -0500] rev 36137
cmdutil: convert the prefetchfiles() hook to a callback mechanism (API) Yuya suggested a list of callbacks instead of function wrapping. This means that one extension can't block another from processing the list. .. api:: File prefetching is now handled by registering a callback with scmutil.fileprefetchhooks.
Tue, 13 Feb 2018 00:54:36 -0500 test-narrow: partially stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Feb 2018 00:54:36 -0500] rev 36136
test-narrow: partially stabilize on Windows test-narrow-strip.t is still broken. I don't see any feature condititionals, so it might be an actual problem.
Tue, 13 Feb 2018 00:06:22 -0500 py3: whitelist test-convert-clonebranches.t
Augie Fackler <augie@google.com> [Tue, 13 Feb 2018 00:06:22 -0500] rev 36135
py3: whitelist test-convert-clonebranches.t Differential Revision: https://phab.mercurial-scm.org/D2223
Mon, 12 Feb 2018 23:51:37 -0500 convert: make hg sha1 regex consistently be a bytes
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 23:51:37 -0500] rev 36134
convert: make hg sha1 regex consistently be a bytes Differential Revision: https://phab.mercurial-scm.org/D2222
Mon, 12 Feb 2018 23:51:18 -0500 convcmd: pass encoding name as a sysstr
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 23:51:18 -0500] rev 36133
convcmd: pass encoding name as a sysstr Differential Revision: https://phab.mercurial-scm.org/D2221
Mon, 12 Feb 2018 23:50:58 -0500 convert: open all files in binary mode
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 23:50:58 -0500] rev 36132
convert: open all files in binary mode Differential Revision: https://phab.mercurial-scm.org/D2220
Mon, 12 Feb 2018 22:29:36 -0500 py3: whitelist another 11 passing tests
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 22:29:36 -0500] rev 36131
py3: whitelist another 11 passing tests Differential Revision: https://phab.mercurial-scm.org/D2213
Mon, 12 Feb 2018 20:44:06 -0500 util: convert traceback-related sysstrs to sysbytes in getstackframes
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:44:06 -0500] rev 36130
util: convert traceback-related sysstrs to sysbytes in getstackframes With this change, test-devel-warnings.t passes except for differences in how ProgrammingError is formatted and one mysterious traceback inside of transaction.__del__. Differential Revision: https://phab.mercurial-scm.org/D2212
Mon, 12 Feb 2018 20:43:33 -0500 util: format line number of stack trace using %d
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:43:33 -0500] rev 36129
util: format line number of stack trace using %d Required on Python 3, functional on Python 2. Differential Revision: https://phab.mercurial-scm.org/D2211
Mon, 12 Feb 2018 20:43:05 -0500 util: call warnings.warn() with a sysstr in nouideprecwarn
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:43:05 -0500] rev 36128
util: call warnings.warn() with a sysstr in nouideprecwarn This preserves nouideprecwarn wanting a bytes, which is consistent with the rest of hg. Differential Revision: https://phab.mercurial-scm.org/D2210
Mon, 12 Feb 2018 20:42:28 -0500 ui: convert stack traces to sysbytes before logging
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:42:28 -0500] rev 36127
ui: convert stack traces to sysbytes before logging They're coming back as unicodes, so sysbytes seems like the best we can do. This is like D2171 and D2172, but those fail on Python 2.7.5 (seriously!), so this is my version of the same change. I actually wrote this before reviewing those, then discarded it, then came back to it after finding out 2.7.5 is a silly place. Differential Revision: https://phab.mercurial-scm.org/D2209
Mon, 12 Feb 2018 20:41:47 -0500 ui: use pycompat.bytestr() to get a bytes-repr of config default
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:41:47 -0500] rev 36126
ui: use pycompat.bytestr() to get a bytes-repr of config default We don't know what type we'll get here, so we need something that'll behave like a repr without returning a unicode. Differential Revision: https://phab.mercurial-scm.org/D2208
Mon, 12 Feb 2018 20:39:48 -0500 tests: add tons of b prefixes in test-devel-warnings.t
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 20:39:48 -0500] rev 36125
tests: add tons of b prefixes in test-devel-warnings.t # skip-blame because it's just b prefixes Differential Revision: https://phab.mercurial-scm.org/D2207
Sun, 11 Feb 2018 19:43:43 -0800 py3: convert traceback representation to bytes when logging
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 19:43:43 -0800] rev 36124
py3: convert traceback representation to bytes when logging Python's APIs should return a system string. We want to use bytes for logging. So convert the traceback to bytes before sending it to the logger. Differential Revision: https://phab.mercurial-scm.org/D2176
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip