Martin von Zweigbergk <martinvonz@google.com> [Sun, 14 Jul 2019 22:34:36 -0700] rev 4741
py3: filter() now returns a generator, so wrap when we need a list
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Jul 2019 23:19:50 -0700] rev 4740
py3: don't depend on map() iterating over its input
map(some_generator()) in py2 returns a list, while in py3 it returns a
generator, so the passed-in generator won't be called unless the
returned one is.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 16:49:01 -0700] rev 4739
py3: implement __bool__ in addition to __nonzero__
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 14:21:23 -0700] rev 4738
py3: replace iter.next() by next(iter)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 14:16:48 -0700] rev 4737
py3: replace xrange() by range()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 12:19:49 -0700] rev 4736
py3: read sqlite3 data as bytes
The py2 and py3 docs ([1] and [2]) disagree how to get bytes output,
but it seems obvious that this should be "bytes" to be compatible with
both.
[1] https://docs.python.org/2/library/sqlite3.html#sqlite3.Connection.text_factory
[2] https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.text_factory
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 12:11:43 -0700] rev 4735
py3: sqlite3.connect() expects str arguments
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Jul 2019 23:00:11 -0700] rev 4734
cleanup: remove check only needed for hg versions before 4.4
ui.edit() has had the "action" argument since 6e6452bc441d (editor:
use an unambiguous path suffix for editor files, 2017-08-30), which
was first released in hg version 4.4. Since we support only versions
higher than 4.5, we can drop this check.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Jul 2019 08:20:24 -0700] rev 4733
split: remove an unnecessary (and confusingly typed) fallback revision
`opts.get('rev') or '.'` is either a list of strings or just a
string. It happened to work because `'.'[0] == '.'` on Python 2, but
it won't work on Python 3 (for byte strings). The fallback value
wasn't even needed (it was also set just after), so let's just remove
it.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 22:23:32 -0700] rev 4732
evolve: rename variable "children" to "child" where it's clearly singular
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 16:24:13 -0700] rev 4731
evolve: remove some unused variables
Martin von Zweigbergk <martinvonz@google.com> [Thu, 11 Jul 2019 09:38:42 -0700] rev 4730
py3: back out 23323092f0a7
D6623 has now been accepted in Mercurial (commit 83666f011679), so
evolve commit 23323092f0a7 (py3: convert _origdoc to sysstr to match
__doc__, 2019-07-09) is not longer needed.
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 17 Jul 2019 18:06:14 +0200] rev 4729
branching: merge with stable
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 17 Jul 2019 17:58:44 +0200] rev 4728
touch: fix the inconsistent behavior of divergence catching logic (issue6107)
When touching a node, the way we check if it can lead to divergence
is we look at the successors sets of the rev being touched. And if
there is successor revs exists (excluding the case when that successor
set is (A,) for rev A) that means there will be divergence and we warn
the user.
This works fine but there is still a case (which is not covered by looking
at successor sets) which can lead to divergence.
That case is: when there is already a revision exists which is divergent
to the revision being touched. And performing the touch would revive
that "dead" divergence. (Dead because one of the revision is obsolete which
is the one we are touching)
And to see if there is any rev which is divergent to a particular rev
we already have a function which we can use here
i.e. `evolvecmd.divergentsets(repo, ctx_being_touched)`
Changes in test file demonstrate the fixed behaviour.
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 29 Jun 2019 14:28:35 +0530] rev 4727
touch: add test which shows touch can fail to warn about divergence
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 17 Jul 2019 17:58:40 +0200] rev 4726
touch: clarify some inline documentation
Martin von Zweigbergk <martinvonz@google.com> [Mon, 15 Jul 2019 16:53:07 -0700] rev 4725
tests: update output for new branch cache messsages from Mercurial
This makes tests pass again after Mercurial commit c7d236b55a3e (py3:
fix formatting of branchmap log messages with repo.filtername=None,
2019-07-14).
CORE-TEST-OUTPUT-UPDATE: c7d236b55a3e
Anton Shestakov <av6@dwimlabs.net> [Sat, 13 Jul 2019 18:22:34 +0800] rev 4724
metaedit: allow operations on merge commits with some conditions
As with fold (see the previous patch), it's allowed to metaedit a merge commit
or a set of commits including merge commits (with --fold) as long as there are
less than 2 parents of the set not included in the said set.
Anton Shestakov <av6@dwimlabs.net> [Thu, 11 Jul 2019 18:07:03 +0800] rev 4723
fold: allow operations on merge commits with some conditions
It's possible to fold revision chains that include a single merge commit: just
fold everything into the merge commit while saving its other parent (so it
continues being a merge commit). It's also possible to fold revisions that
include multiple merge commits, on the condition that they merge with not more
than 2 external changesets (i.e. a changesets that aren't going to be folded).
Anton Shestakov <av6@dwimlabs.net> [Thu, 11 Jul 2019 17:04:08 +0800] rev 4722
rewind: make sure merge commits include files from p1 and p2
Otherwise rewinding a merge commit makes it lose all changes.
This fix populates `updates` argument of rewriteutil.rewrite() with parent
changesets. That argument is normally used for folding multiple changesets, but
in this case it's simply used to include files from p1 and p2. Usually,
rewrite() works fine using ctx.files(), but that function can return an empty
list when ctx is a merge commit.
Anton Shestakov <av6@dwimlabs.net> [Wed, 10 Jul 2019 18:16:38 +0800] rev 4721
touch: make sure merge commits include files from p1 and p2
Otherwise touching a merge commit makes it lose all changes.
This fix populates `updates` argument of rewriteutil.rewrite() with parent
changesets. That argument is normally used for folding multiple changesets, but
in this case it's simply used to include files from p1 and p2. Usually,
rewrite() works fine using ctx.files(), but that function can return an empty
list when ctx is a merge commit.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 10:56:42 -0700] rev 4720
py3: make `import hgext3rd.evolve` work
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 10:56:42 -0700] rev 4719
py3: use bytes for template keyword registrations
This makes `import hgext3rd.topic` work.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 10:56:42 -0700] rev 4718
py3: convert _origdoc to sysstr to match __doc__
It's currently stored as bytes by core, so we need to convert it to
match Python's expected type for __doc__. This patch can be dropped if
D6623 gets accepted.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 10:56:42 -0700] rev 4717
py3: use bytes for revset predicate registrations
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 10:56:42 -0700] rev 4716
py3: use bytes for wireprotocol command registration
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 10:56:42 -0700] rev 4715
py3: use byte strings for @command registrations
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Jul 2019 11:13:47 -0700] rev 4714
py3: switch from iteritems() to items()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Jul 2019 11:37:29 -0700] rev 4713
py3: make metadata values be byte strings as Mercurial expects
Martin von Zweigbergk <martinvonz@google.com> [Tue, 09 Jul 2019 21:49:37 -0700] rev 4712
tests: update output for shorted prompts from Mercurial
This makes tests pass again after Mercurial commits f802a75da585 (patch: use a
short, fixed-size message for last line of prompt (issue6158), 2019-06-20).
CORE-TEST-OUTPUT-UPDATE: f802a75da585