Mercurial > evolve
changeset 6018:01154958e0cf
branching: merge stable into default
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 13 Aug 2021 20:25:11 +0200 |
parents | 3a3341e44a0e (current diff) ae0ef35c2dd9 (diff) |
children | 6f6b6218b6fe |
files | CHANGELOG hgext3rd/evolve/compat.py hgext3rd/evolve/metadata.py hgext3rd/evolve/rewriteutil.py hgext3rd/topic/__init__.py tests/test-fold.t |
diffstat | 8 files changed, 97 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Thu Jul 01 15:47:45 2021 +0300 +++ b/.hgtags Fri Aug 13 20:25:11 2021 +0200 @@ -95,3 +95,4 @@ c0ed8e57463875414d1c06f0428d550c4480d289 10.3.0 93dc3cb6884259f91d739a1cfe993a01820c729c 10.3.1 30c8d8e6a7f4056c46a868b47ee949d3bdb48c4c 10.3.2 +cca465bf6a6a103449aa58deecdffba8e546f7c6 10.3.3
--- a/CHANGELOG Thu Jul 01 15:47:45 2021 +0300 +++ b/CHANGELOG Fri Aug 13 20:25:11 2021 +0200 @@ -13,13 +13,19 @@ * evolve: remove experimental.obshashrange.lru-size docs, that config option didn't do anything for a long time -10.3.3 - in progress +10.3.3 -- 2021-08-13 -------------------- + * evolve: compatibility with Mercurial 5.9 + * fold: make sure to save commit messages in last-message.txt, also affects + metaedit (issue6549) + * touch: fix `hg touch` on merge commits + topic (0.22.3) * topic: correctly update from public commits with a (now hidden) topic when hg update is called without any revision (issue6553) + * topic: fix the help text to show how to disable publishing 10.3.2 -- 2021-05-28
--- a/debian/changelog Thu Jul 01 15:47:45 2021 +0300 +++ b/debian/changelog Fri Aug 13 20:25:11 2021 +0200 @@ -1,3 +1,9 @@ +mercurial-evolve (10.3.3-1) UNRELEASED; urgency=medium + + * new upstream release + + -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Fri, 13 Aug 2021 19:27:29 +0200 + mercurial-evolve (10.3.2-1) unstable; urgency=medium * new upstream release
--- a/hgext3rd/evolve/compat.py Thu Jul 01 15:47:45 2021 +0300 +++ b/hgext3rd/evolve/compat.py Fri Aug 13 20:25:11 2021 +0200 @@ -533,3 +533,48 @@ if src not in newctx or dst in newctx or ds[dst] != b'a': src = None ds.copy(src, dst) + +# hg <= 4.9 (e1ceefab9bca) +code = context.overlayworkingctx._markdirty.__code__ +if 'copied' not in code.co_varnames[:code.co_argcount]: + def fixedmarkcopied(self, path, origin): + self._markdirty(path, exists=True, date=self.filedate(path), + flags=self.flags(path), copied=origin) + + context.overlayworkingctx.markcopied = fixedmarkcopied + +# what we're actually targeting here is e079e001d536 +# hg <= 5.0 (dc3fdd1b5af4) +try: + from mercurial import state as statemod + markdirtyfixed = util.safehasattr(statemod, '_statecheck') +except (AttributeError, ImportError): + markdirtyfixed = False +if not markdirtyfixed: + def fixedmarkdirty( + self, + path, + exists, + data=None, + date=None, + flags='', + copied=None, + ): + # data not provided, let's see if we already have some; if not, let's + # grab it from our underlying context, so that we always have data if + # the file is marked as existing. + if exists and data is None: + oldentry = self._cache.get(path) or {} + data = oldentry.get('data') + if data is None: + data = self._wrappedctx[path].data() + + self._cache[path] = { + 'exists': exists, + 'data': data, + 'date': date, + 'flags': flags, + 'copied': copied, + } + + context.overlayworkingctx._markdirty = fixedmarkdirty
--- a/hgext3rd/evolve/metadata.py Thu Jul 01 15:47:45 2021 +0300 +++ b/hgext3rd/evolve/metadata.py Fri Aug 13 20:25:11 2021 +0200 @@ -6,6 +6,6 @@ # GNU General Public License version 2 or any later version. __version__ = b'10.4.0.dev' -testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7' +testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9' minimumhgversion = b'4.6' buglink = b'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/rewriteutil.py Thu Jul 01 15:47:45 2021 +0300 +++ b/hgext3rd/evolve/rewriteutil.py Fri Aug 13 20:25:11 2021 +0200 @@ -265,13 +265,15 @@ for pctx in head.parents(): for dst, src in copies.pathcopies(pctx, head).items(): wctx[dst].markcopied(src) + editor = None + if commitopts.get(b'edit'): + editor = cmdutil.commitforceeditor new = wctx.tomemctx(text=message, parents=newbases, date=date, extra=extra, - user=user) - if commitopts.get(b'edit'): - new._text = cmdutil.commitforceeditor(repo, new, []) + user=user, + editor=editor) revcount = len(repo) newid = repo.commitctx(new) created = len(repo) != revcount
--- a/hgext3rd/topic/__init__.py Thu Jul 01 15:47:45 2021 +0300 +++ b/hgext3rd/topic/__init__.py Fri Aug 13 20:25:11 2021 +0200 @@ -233,7 +233,7 @@ __version__ = b'0.23.0.dev' -testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8' +testedwith = b'4.6.2 4.7 4.8 4.9 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9' minimumhgversion = b'4.6' buglink = b'https://bz.mercurial-scm.org/'
--- a/tests/test-fold.t Thu Jul 01 15:47:45 2021 +0300 +++ b/tests/test-fold.t Fri Aug 13 20:25:11 2021 +0200 @@ -442,3 +442,34 @@ 2 changesets folded $ cd .. + +Saving the last user-edited message in last-message.txt +https://bz.mercurial-scm.org/show_bug.cgi?id=6549 + + $ hg init issue6549 + $ cd issue6549 + + $ echo A > foo + $ hg ci -qAm A + $ echo B > foo + $ hg ci -m B + + $ cat > editor.sh << 'EOF' + > echo 'Big commit message that was crafted with care.' > "$1" + > echo '' >> "$1" + > echo 'It would be a shame if something happened to it.' >> "$1" + > EOF + $ HGEDITOR="sh ./editor.sh" hg fold --exact --rev 'all()' + 2 changesets folded + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + + $ hg glog + @ 2: Big commit message that was crafted with care. + + It would be a shame if something happened to it. + $ cat .hg/last-message.txt + Big commit message that was crafted with care. + + It would be a shame if something happened to it. + + $ cd ..