Mon, 04 Apr 2022 18:05:33 -0700 crecord: avoid duplicating lines when reverting noeol->eol change
Kyle Lippincott <spectral@google.com> [Mon, 04 Apr 2022 18:05:33 -0700] rev 49034
crecord: avoid duplicating lines when reverting noeol->eol change When reversing a patch that looks like this while using crecord: ``` @@ -301,4 +302,4 @@ zza zzb zzc zzd -zze \ No newline at end of file +zze ``` we would previously reverse the `-zze` line to be an add, encounter the "no newline" line and stop inspecting lines. This caused us to duplicate the line, producing `zzezze` (still without a newline). `break` is the correct action if we know there will be no lines afterwards, as would be the case in an eol -> noeol transition. It is incorrect if there are lines afterward, such as if both sides are missing the newline or if only the lhs is missing the newline. Differential Revision: https://phab.mercurial-scm.org/D12441
Tue, 05 Apr 2022 11:09:57 -0700 crecord: add test demonstrating issue when reverting noeol->eol change
Kyle Lippincott <spectral@google.com> [Tue, 05 Apr 2022 11:09:57 -0700] rev 49033
crecord: add test demonstrating issue when reverting noeol->eol change Differential Revision: https://phab.mercurial-scm.org/D12440
Mon, 28 Mar 2022 10:43:10 -0700 revert: ask user to confirm before tracking new file when interactive
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:10 -0700] rev 49032
revert: ask user to confirm before tracking new file when interactive If interactively reverting from a commit with `hg revert -i -r`, we would unconditionally add files from that commit that are not already tracked in the working copy. We have prompts for adding back files removed in the working copy, but that's specific to such files and does not apply to adding files from another revision. Differential Revision: https://phab.mercurial-scm.org/D12416
Mon, 28 Mar 2022 10:43:06 -0700 revert: use a `continue` to reduce indentation
Martin von Zweigbergk <martinvonz@google.com> [Mon, 28 Mar 2022 10:43:06 -0700] rev 49031
revert: use a `continue` to reduce indentation I'm about to add more code in the block I'm modifying here. Differential Revision: https://phab.mercurial-scm.org/D12415
Fri, 25 Mar 2022 08:33:03 -0700 stringutil: try to avoid running `splitlines()` only to get first line
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Mar 2022 08:33:03 -0700] rev 49030
stringutil: try to avoid running `splitlines()` only to get first line It's wasteful to call `splitlines()` and only get the first line from it. However, Python doesn't seem to provide a built-in way of doing just one split based on the set of bytes used by `splitlines()`. As a workaround, we do an initial split on just LF and then call `splitlines()` on the result. Thanks to Joerg for this suggestion. I didn't bother to also split on CR, so users with old Mac editors (or repos created by such editors) will not get this performance improvement. Differential Revision: https://phab.mercurial-scm.org/D12413
Thu, 24 Mar 2022 22:05:49 -0700 logcmdutil: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:49 -0700] rev 49029
logcmdutil: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12412
Thu, 24 Mar 2022 22:05:36 -0700 filemerge: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:36 -0700] rev 49028
filemerge: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12411
Thu, 24 Mar 2022 22:05:27 -0700 absorb: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:27 -0700] rev 49027
absorb: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12410
Thu, 24 Mar 2022 22:05:13 -0700 extensions: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:05:13 -0700] rev 49026
extensions: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12409
Thu, 24 Mar 2022 22:04:38 -0700 bookmarks: use new function for getting first line of string
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Mar 2022 22:04:38 -0700] rev 49025
bookmarks: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12408
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 tip