Wed, 29 Mar 2017 20:05:18 -0700 minirst: remove "admonition" from _admonitions
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 20:05:18 -0700] rev 31713
minirst: remove "admonition" from _admonitions The "admonition" rst primitive is split into "specific" admonitions ("attention," "caution," etc) and the "generic" admonition ("admonition"). For more, see http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions The _admonitions set and keys of the _admonitiontitles dict overlap exactly except _admonitions has an "admonition" entry. Nowhere in Mercurial is the "admonition" admonition directive used. Even if it were, it doesn't have a title, so it wouldn't be rendered correctly. So, let's remove "admonition" from the set of recognized admonition directives.
Wed, 29 Mar 2017 19:59:47 -0700 minirst: reindent _admonitiontitles
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 19:59:47 -0700] rev 31712
minirst: reindent _admonitiontitles I don't like the verical indent. While I was here, I cleaned up some whitespace and added a trailing comma on the last element.
Tue, 28 Mar 2017 06:23:28 +0200 tags: extract filenode filtering into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:23:28 +0200] rev 31711
tags: extract filenode filtering into its own function We'll also need to reuse this logic so we extract it into its own function. We document some of the logic in the process.
Tue, 28 Mar 2017 06:08:12 +0200 tags: extract tags computation from fnodes into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:08:12 +0200] rev 31710
tags: extract tags computation from fnodes into its own function I'm about to introduce code that needs to perform such computation on "arbitrary" nodes. The logic is extracted into its own function for reuse.
Tue, 28 Mar 2017 07:41:23 +0200 tags: only return 'alltags' in 'findglobaltags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:41:23 +0200] rev 31709
tags: only return 'alltags' in 'findglobaltags' This is minor update along the way. We simplify the 'findglobaltags' function to only return the tags. Since no existing data is reused, we know that all tags returned are global and we can let the caller get that information if it cares about it.
Tue, 28 Mar 2017 07:39:10 +0200 tags: make argument 'tagtype' optional in '_updatetags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:39:10 +0200] rev 31708
tags: make argument 'tagtype' optional in '_updatetags' This is the next step from the previous changesets, we are now ready to use this function in a simpler way.
Tue, 28 Mar 2017 07:38:10 +0200 tags: reorder argument of '_updatetags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:38:10 +0200] rev 31707
tags: reorder argument of '_updatetags' We move all arguments related to tagtype to the end, together. This will allow us to make these arguments optional and reuse of this logic for callers that do not care about the tag types.
Tue, 28 Mar 2017 06:13:49 +0200 tags: do not feed dictionaries to 'findglobaltags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:13:49 +0200] rev 31706
tags: do not feed dictionaries to 'findglobaltags' The code asserts that these dictionary are empty. So we can be more explicit and have the function return the dictionaries directly.
Tue, 28 Mar 2017 06:01:31 +0200 tags: extract fnode retrieval into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:01:31 +0200] rev 31705
tags: extract fnode retrieval into its own function My main goal here is to be able to reuse this logic easily. As a side effect this important logic is now insulated and the code is clearer.
Wed, 29 Mar 2017 12:07:07 +0200 hgweb: fix diff hunks filtering by line range in webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 12:07:07 +0200] rev 31704
hgweb: fix diff hunks filtering by line range in webutil.diffs() The previous clause for filter out a diff hunk was too restrictive. We need to consider the following cases (assuming linerange=(lb, ub) and the @s2,l2 hunkrange): <-(s2)--------(s2+l2)-> <-(lb)---(ub)-> <-(lb)---(ub)-> <-(lb)---(ub)-> previously on the first and last situations were considered. In test-hgweb-filelog.t, add a couple of lines at the beginning of file "b" so that the line range we will follow does not start at the beginning of file. This covers the change in aforementioned diff hunk filter clause.
Sat, 25 Mar 2017 11:30:08 +0100 summary: display obsolete state of parents
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 11:30:08 +0100] rev 31703
summary: display obsolete state of parents Extend the "parent: " lines in summary to display "(obsolete)" when the parent is obsolete.
Sat, 25 Mar 2017 10:40:29 +0100 templates: add "changeset.obsolete" label in command line style
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 10:40:29 +0100] rev 31702
templates: add "changeset.obsolete" label in command line style Following respective change in cmdutil.changeset_printer.
Tue, 28 Mar 2017 22:38:45 +0200 templates: shorten definition of changeset labels in command-line style
Denis Laxalde <denis@laxalde.org> [Tue, 28 Mar 2017 22:38:45 +0200] rev 31701
templates: shorten definition of changeset labels in command-line style We'll add more labels and the line is already quite long, so let's define a variable to hold all evolution "troubles" labels.
Tue, 28 Mar 2017 22:36:22 +0200 templates: use separate() to build changeset labels in command-line style
Denis Laxalde <denis@laxalde.org> [Tue, 28 Mar 2017 22:36:22 +0200] rev 31700
templates: use separate() to build changeset labels in command-line style
Sat, 25 Mar 2017 10:34:11 +0100 templatekw: add an "obsolete" keyword
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 10:34:11 +0100] rev 31699
templatekw: add an "obsolete" keyword Definition is the same as the one in evolve extension.
Sat, 25 Mar 2017 09:39:07 +0100 cmdutil: add a "changeset.obsolete" label in changeset_printer
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 09:39:07 +0100] rev 31698
cmdutil: add a "changeset.obsolete" label in changeset_printer Until now there were no label to highlight obsolete changesets in log output, only evolution troubles (unstable, bumped, divergent) are supported. We add a "changeset.obsolete" label on changeset entries produced by changeset_printer so that obsolete changesets can be highlighted in log output. This is useful because, unless using a graph log where obsolete changesets have a 'x' marker, there's no way to identify obsolete changesets. And even in graph mode, when working directory's parent is obsolete, we get a '@' marker and we do not see it as obsolete.
Tue, 28 Mar 2017 14:40:13 -0700 fileset: perform membership test against set for status queries
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Mar 2017 14:40:13 -0700] rev 31697
fileset: perform membership test against set for status queries Previously, fileset functions operating on status items performed membership tests against a list of items. When there are thousands of items having a specific status, that test can be extremely slow. Changing the membership test to a set makes this operation substantially faster. On the mozilla-central repo: $ hg files -r d14cac631ecc 'set:added()' before: 28.120s after: 0.860s $ hg status --change d14cac631ecc --added 0.690s
Tue, 28 Mar 2017 10:21:38 -0700 worker: flush ui buffers before running the worker
David Soria Parra <davidsp@fb.com> [Tue, 28 Mar 2017 10:21:38 -0700] rev 31696
worker: flush ui buffers before running the worker a91c6275 introduces flushing ui buffers after a worker finished. If the ui was not flushed before the worker was started, fork will copy the existing buffers to the worker. This causes messages issued before the worker started to be written to the terminal for each worker. We are now flushing the ui before we start a worker and add an appropriate test which will fail before this patch.
Tue, 28 Mar 2017 08:40:12 -0700 chgserver: do not copy configs set by environment variables
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 08:40:12 -0700] rev 31695
chgserver: do not copy configs set by environment variables Config set by environment variables have a source like "$ENVNAME". They should not be copied because they will be recalculated by rcutil.rccomponents.
Tue, 28 Mar 2017 07:57:56 -0700 rcutil: extract duplicated logic to a lambda
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 07:57:56 -0700] rev 31694
rcutil: extract duplicated logic to a lambda This simplifies the code a bit.
Tue, 28 Mar 2017 07:55:32 -0700 rcutil: unindent a block
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 07:55:32 -0700] rev 31693
rcutil: unindent a block Since global _rccomponents is gone, the code could be simplified.
Tue, 28 Mar 2017 07:54:00 -0700 rcutil: do not cache rccomponents
Jun Wu <quark@fb.com> [Tue, 28 Mar 2017 07:54:00 -0700] rev 31692
rcutil: do not cache rccomponents The function is only called once except for "hg debugconfig", where it is called twice. So there is no need to cache it. Caching it will cause issues with chgserver. Instead of dropping the cache in chgserver, it seems cleaner to just avoid the cache.
Sat, 25 Mar 2017 19:17:11 -0400 ui: rerun color.setup() once the pager has spawned to honor 'color.pagermode'
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 19:17:11 -0400] rev 31691
ui: rerun color.setup() once the pager has spawned to honor 'color.pagermode' Otherwise, ui.pageractive is False when color is setup in dispatch.py (without --pager=on), and this config option is ignored.
Sat, 25 Mar 2017 21:12:00 -0400 ui: defer setting pager related properties until the pager has spawned
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 21:12:00 -0400] rev 31690
ui: defer setting pager related properties until the pager has spawned When --pager=on is given, dispatch.py spawns a pager before setting up color. If the pager failed to launch, ui.pageractive was left set to True, so color configured itself based on 'color.pagermode'. A typical MSYS setting would be 'color.mode=auto, color.pagermode=ansi'. In the failure case, this would print a warning, disable the pager, and then print the raw ANSI codes to the terminal. Care needs to be taken, because it appears that leaving ui.pageractive=True was the only thing that prevented an attempt at running the pager again from inside the command. This results in a double warning message, so pager is simply disabled on failure. The ui config settings didn't need to be moved to fix this, but it seemed like the right thing to do for consistency.
Sat, 25 Mar 2017 13:50:17 -0400 color: stop mutating the default effects map
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Mar 2017 13:50:17 -0400] rev 31689
color: stop mutating the default effects map A future change will make color.setup() callable a second time when the pager is spawned, in order to honor the 'color.pagermode' setting. The problem was that when 'color.mode=auto' was resolved to 'win32' in the first pass, the default ANSI effects were overwritten, making it impossible to honor 'pagermode=ansi'. Also, the two separate maps didn't have the same keys. The symmetric difference is 'dim' and 'italic' (from ANSI), and 'bold_background' (from win32). Thus, the update left entries that didn't belong for the current mode. This bled through `hg debugcolor`, where the unsupported ANSI keys were listed in 'win32' mode. As an added bonus, this now correctly enables color with MSYS `less` for a command like this, where pager is forced on: $ hg log --config color.pagermode=ansi --pager=yes --color=auto Previously, the output was corrupted. The raw output, as seen through the ANSI blind `more.com` was: <-[-1;6mchangeset: 34840:3580d1197af9<-[-1m ... which MSYS `less -FRX` rendered as: 1;6mchangeset: 34840:3580d1197af91m ... (The two '<-' instances were actually an arrow character that TortoiseHg warned couldn't be encoded, and notepad++ translated to a single '?'.) Returning an empty map for 'ui._colormode == None' seems better that defaulting to '_effects' (since some keys are mode dependent), and is better than None, which blows up `hg debugcolor --color=never`.
Sun, 26 Mar 2017 21:43:47 -0700 pager: do not read from environment variable
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:43:47 -0700] rev 31688
pager: do not read from environment variable $PAGER is converted to the pager.pager config item. So it's no longer necessary to read $PAGER in ui.pager().
Sun, 26 Mar 2017 21:41:42 -0700 ui: simplify geteditor
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:41:42 -0700] rev 31687
ui: simplify geteditor Now $EDITOR and $VISUAL will affect ui.editor directly. So it's no longer necessary to test them in ui.geteditor.
Sun, 26 Mar 2017 21:40:22 -0700 debugconfig: list environment variables in debug output
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:40:22 -0700] rev 31686
debugconfig: list environment variables in debug output Since we print "read config from" for config files, printing environment variables will make it more consistent.
Sun, 26 Mar 2017 21:33:37 -0700 rcutil: let environ override system configs (BC)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:33:37 -0700] rev 31685
rcutil: let environ override system configs (BC) This is BC because system configs won't be able to override $EDITOR, $PAGER. The new behavior is arguably more rational.
Sun, 26 Mar 2017 21:27:02 -0700 rcutil: add a method to convert environment variables to config items
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:27:02 -0700] rev 31684
rcutil: add a method to convert environment variables to config items Handling config and environ priorities has been messy. Partially because we don't have config layers - you either get all configs (sys + user), or none. Ideally, environ like $EDITOR, $PAGER should be able to override the system configs "ui.editor", "pager.pager". This patch provides the ability to convert them into config items, so they can be inserted into the middle config layer between system rc and user rc.
Sun, 26 Mar 2017 21:04:29 -0700 rcutil: let rccomponents return different types of configs (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 21:04:29 -0700] rev 31683
rcutil: let rccomponents return different types of configs (API) The next patches will convert environ to raw config items, and insert the config items between systemrcpath and userrcpath. This patch teaches rccomponents to return the type information so the caller could distinguish between "path" and raw config "items".
Sun, 26 Mar 2017 20:48:00 -0700 rcutil: rename rcpath to rccomponents (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:48:00 -0700] rev 31682
rcutil: rename rcpath to rccomponents (API)
Sun, 26 Mar 2017 20:46:05 -0700 rcutil: extract rc directory listing logic
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:46:05 -0700] rev 31681
rcutil: extract rc directory listing logic The logic of listing a ".rc" directory is duplicated in two functions, extract it to a single function to make the code cleaner.
Sun, 26 Mar 2017 20:21:32 -0700 rcutil: split osrcpath to return default.d paths (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:21:32 -0700] rev 31680
rcutil: split osrcpath to return default.d paths (API) After this change, there are 3 rcpath functions: - defaultrcpath - systemrcpath - userrcpath This will allow us to insert another config layer in the middle.
Sun, 26 Mar 2017 20:18:42 -0700 rcutil: move scmutil.*rcpath to rcutil (API)
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 20:18:42 -0700] rev 31679
rcutil: move scmutil.*rcpath to rcutil (API) As discussed at [1], the logic around "actual config"s seem to be non-trivial enough that it's worth a new module. This patch creates the module and move "scmutil.*rcpath" functions there as the first step. More methods will be moved to the module in the future. The module is different from config.py because the latter only cares about data structure and parsing, and does not care about special case, or system config paths, or environment variables. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095503.html
Sat, 25 Mar 2017 17:25:23 +0900 statfs: make getfstype() raise OSError
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:25:23 +0900] rev 31678
statfs: make getfstype() raise OSError It's better for getfstype() function to not suppress an error. Callers can handle it as necessary. Now "hg debugfsinfo" will report OSError.
Sat, 25 Mar 2017 17:24:11 +0900 statfs: rename pygetfstype to getfstype
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:24:11 +0900] rev 31677
statfs: rename pygetfstype to getfstype There's no ambiguity now.
Sat, 25 Mar 2017 17:23:21 +0900 statfs: refactor inner function as a mapping from statfs to string
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:23:21 +0900] rev 31676
statfs: refactor inner function as a mapping from statfs to string The major difference between BSD and Linux is how to get a fstype string. Let's split the longest part of getfstype() as a pure function.
Sat, 25 Mar 2017 17:13:12 +0900 statfs: simplify handling of return value
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 17:13:12 +0900] rev 31675
statfs: simplify handling of return value Py_BuildValue() can translate NULL pointer to None.
Sat, 25 Mar 2017 18:22:27 +0900 hghave: use util.getfstype
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Mar 2017 18:22:27 +0900] rev 31674
hghave: use util.getfstype
Sun, 26 Mar 2017 19:57:17 -0700 runtests: change local IP glob pattern from "127.0.0.1" to "$LOCALIP"
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 19:57:17 -0700] rev 31673
runtests: change local IP glob pattern from "127.0.0.1" to "$LOCALIP" This is similar to what 348b2b9da703 does. Since 636cf3f7620d has changed "127.0.0.1" to "$LOCALIP". The glob pattern needs update accordingly. It is expected to fix tests running in some BSD jails.
Mon, 27 Mar 2017 16:00:47 +0200 tags: deprecated 'repo.tag'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 16:00:47 +0200] rev 31672
tags: deprecated 'repo.tag' All user are gone. We can now celebrate the removal of some extra line from the 'localrepo' class.
Mon, 27 Mar 2017 18:08:05 +0200 drawdag: use 'tagsmod.tag' instead of 'repo.tag'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 18:08:05 +0200] rev 31671
drawdag: use 'tagsmod.tag' instead of 'repo.tag' The former is about to be deprecated.
Mon, 27 Mar 2017 16:00:34 +0200 tags: use the 'tag' function from the 'tags' module in the 'tag' command
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 16:00:34 +0200] rev 31670
tags: use the 'tag' function from the 'tags' module in the 'tag' command There is No need to go through the 'repo' object method anymore.
Mon, 27 Mar 2017 15:58:31 +0200 tags: move 'repo.tag' in the 'tags' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 15:58:31 +0200] rev 31669
tags: move 'repo.tag' in the 'tags' module Similar logic, pretty much nobody use this method (that creates a tag) so we move it into the 'tags' module were it belong.
Mon, 27 Mar 2017 15:55:07 +0200 tags: move '_tags' from 'repo' to 'tags' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 27 Mar 2017 15:55:07 +0200] rev 31668
tags: move '_tags' from 'repo' to 'tags' module As far as I understand, that function do not needs to be on the local repository class, so we extract it in the 'tags' module were it will be nice and comfortable. We keep the '_' in the name since its only user will follow in the next changeset.
Mon, 13 Mar 2017 15:17:20 +0100 hgweb: filter diff hunks when 'linerange' and 'patch' are specified in filelog
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 15:17:20 +0100] rev 31667
hgweb: filter diff hunks when 'linerange' and 'patch' are specified in filelog
Mon, 13 Mar 2017 15:15:49 +0100 hgweb: add a 'linerange' parameter to webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 15:15:49 +0100] rev 31666
hgweb: add a 'linerange' parameter to webutil.diffs() This is used to filter out hunks based on their range (with respect to 'node2' for patch.diffhunks() call, i.e. 'ctx' for webutil.diffs()). This is the simplest way to filter diff hunks, here done on server side. Later on, it might be interesting to perform this filtering on client side and expose a "toggle" action to alternate between full and filtered diff.
Thu, 19 Jan 2017 17:41:00 +0100 hgweb: handle a "linerange" request parameter in filelog command
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 19 Jan 2017 17:41:00 +0100] rev 31665
hgweb: handle a "linerange" request parameter in filelog command We now handle a "linerange" URL query parameter to filter filelog using a logic similar to followlines() revset. The URL syntax is: log/<rev>/<file>?linerange=<fromline>:<toline> As a result, filelog entries only consists of revision changing specified line range. The linerange information is propagated to "more"/"less" navigation links but not to numeric navigation links as this would apparently require a dedicated "revnav" class. Only update the "paper" template in this patch.
Sun, 26 Mar 2017 16:51:19 -0700 shelve: add logic to preserve active bookmarks
Kostia Balytskyi <ikostia@fb.com> [Sun, 26 Mar 2017 16:51:19 -0700] rev 31664
shelve: add logic to preserve active bookmarks This adds an explicit active-bookmark-handling logic to shelve. Traditional shelve handles it by transaction aborts, but it is a bit ugly and having an explicit functionality seems better.
Sun, 26 Mar 2017 12:26:35 -0700 metadataonlyctx: speed up sanity check
Jun Wu <quark@fb.com> [Sun, 26 Mar 2017 12:26:35 -0700] rev 31663
metadataonlyctx: speed up sanity check Previously the sanity check will construct manifestctx for both p1 and p2. But it only needs the "manifest node" information, which could be read from changelog directly.
Fri, 24 Feb 2017 18:39:08 +0100 revset: factor out linerange processing into a utility function
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 24 Feb 2017 18:39:08 +0100] rev 31662
revset: factor out linerange processing into a utility function Similar processing will be done in hgweb.webutil in forthcoming changeset.
Mon, 13 Mar 2017 10:41:13 +0100 hgweb: add a "patch" query parameter to filelog command
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 10:41:13 +0100] rev 31661
hgweb: add a "patch" query parameter to filelog command Add support for a "patch" query parameter in filelog web command similar to --patch option of `hg log` to display the diff of each changeset in the table of revisions. The diff text is displayed in a dedicated row of the table that follows the existing one for each entry and spans over all columns. Only update "paper" template in this patch.
Mon, 13 Mar 2017 10:40:19 +0100 hgweb: handle "parity" internally in webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 13 Mar 2017 10:40:19 +0100] rev 31660
hgweb: handle "parity" internally in webutil.diffs() There's apparently no reason to have the "parity" of diff blocks that webutil.diffs() generates coming from outside the function. So have it internally managed. We thus now pass a "web" object to webutil.diffs() to get access to both "repo" and "stripecount" attribute.
Mon, 27 Mar 2017 09:44:36 +0900 largefiles: add lfile argument to updatestandin() for efficiency (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:36 +0900] rev 31659
largefiles: add lfile argument to updatestandin() for efficiency (API) Before this patch, updatestandin() takes "standin" argument, and applies splitstandin() on it to pick out a path to largefile (aka "lfile" or so) from standin. But in fact, all callers already knows "lfile". In addition to it, many callers knows both "standin" and "lfile". Therefore, making updatestandin() take only one of "standin" or "lfile" is inefficient.
Mon, 27 Mar 2017 09:44:36 +0900 largefiles: use strip() instead of slicing to get rid of EOL of standin
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:36 +0900] rev 31658
largefiles: use strip() instead of slicing to get rid of EOL of standin This slicing prevents from replacing SHA-1 by another (= longer hash value) in the future.
Mon, 27 Mar 2017 09:44:36 +0900 largefiles: rename local variable appropriately
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:36 +0900] rev 31657
largefiles: rename local variable appropriately repo['.'] is called not as "working context" but as "parent context". In this code path, hash value of current content of file should be compared against hash value recorded in "parent context". Therefore, "wctx" may cause misunderstanding in this case.
Mon, 27 Mar 2017 09:44:35 +0900 largefiles: avoid redundant loop to eliminate None from list
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:35 +0900] rev 31656
largefiles: avoid redundant loop to eliminate None from list Before this patch, this code path contains two loops for m._files: one for replacement with standin, and another for elimination of None, which comes from previous replacement ("standin in wctx or lfdirstate[f] == 'r'" case in tostandin()). These two loops can be unified into simple one "for" loop.
Mon, 27 Mar 2017 09:44:35 +0900 largefiles: avoid meaningless changectx looking up
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:35 +0900] rev 31655
largefiles: avoid meaningless changectx looking up Logically, "repo[ctx.node()]" should be equal to "ctx". In addition to it, this redundant code path is repeated "len(match.m_files)" times.
Mon, 27 Mar 2017 09:44:35 +0900 largefiles: avoid redundant changectx looking up at each repetitions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 27 Mar 2017 09:44:35 +0900] rev 31654
largefiles: avoid redundant changectx looking up at each repetitions These code paths look up changectx at each repetitions, even though the changectx key isn't changed while loop.
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip