# HG changeset patch # User Pierre-Yves David # Date 1611677669 -3600 # Node ID 7daa679347986b50a4974ea0cf7630d36a0a2657 # Parent a119432bafc19ed12407fce3d64a8bef5adf6020# Parent 0257716d1f225fa1a901065d2d809aaa437feb01 branching: merge with stable diff -r a119432bafc1 -r 7daa67934798 CHANGELOG --- a/CHANGELOG Fri Jan 22 05:37:43 2021 +0100 +++ b/CHANGELOG Tue Jan 26 17:14:29 2021 +0100 @@ -5,7 +5,7 @@ --------------------- * evolve: remove spurious "working directory is now at ..." messages - * evolve: improve resolution of some case of parent divergence + * evolve: various documentation improvements topic: @@ -15,7 +15,7 @@ -------------------- * strip: remove experimental.prunestrip option - + * evolve: improve resolution of some case of parent divergence * performance: speed up various operations using an in-memory cache for topic 10.1.0 -- 2020-10-31 diff -r a119432bafc1 -r 7daa67934798 docs/from-mq.rst --- a/docs/from-mq.rst Fri Jan 22 05:37:43 2021 +0100 +++ b/docs/from-mq.rst Tue Jan 26 17:14:29 2021 +0100 @@ -15,15 +15,16 @@ qnew ``commit`` qrefresh ``amend`` qrefresh --exclude ``uncommit`` -qpop ``update`` or ``gdown`` -qpush ``update`` or ``gup`` sometimes ``evolve`` +qpop ``update`` or ``previous`` +qpush ``update`` or ``next`` sometimes ``evolve`` or ``pick`` qrm ``prune`` qfold ``fold`` -qdiff ``odiff`` +qdiff ``pdiff`` qrecord ``record`` +qimport ``import`` qfinish -- -qimport -- +qcommit -- ============================== ============================================ @@ -35,11 +36,14 @@ All your work in progress is now in real changesets all the time. -You can use the standard log command to display them. You can use the -phase revset to display unfinished work only, and use templates to have -the same kind of compact that the output of qseries has. +You can use the standard ``log`` command to display them. You can use the +``draft()`` (or ``secret()``) revset to display unfinished work only, and +use templates to have the same kind of compact that the output of +``qseries`` has. -This will result in something like:: +This will result in something like + +.. code-block:: ini [alias] wip = log -r 'not public()' --template='{rev}:{node|short} {desc|firstline}\n' @@ -49,31 +53,37 @@ With evolve you handle standard changesets without an additional overlay. -Standard changeset are created using hg commit as usual:: +Standard changeset are created using ``hg commit`` as usual + +.. code-block:: console $ hg commit If you want to keep the "WIP is not pushed" behavior, you want to -set your changeset in the secret phase using the phase command. +set your changeset in the secret phase using the ``phase`` command. Note that you only need it for the first commit you want to be secret. Later commits will inherit their parent's phase. If you always want your new commit to be in the secret phase, your should -consider updating your configuration: +consider updating your configuration + +.. code-block:: ini [phases] - new-commit=secret + new-commit = secret hg qref ``````` A new command from evolution will allow you to rewrite the changeset you are -currently on. Just call: +currently on. Just call + +.. code-block:: console $ hg amend -This command takes the same options as commit, plus the switch '-e' (--edit) +This command takes the same options as ``commit``, plus the switch ``-e`` (``--edit``) to edit the commit message in an editor. @@ -92,7 +102,9 @@ hg qref --exclude ````````````````` -To remove changes from your current commit use:: +To remove changes from your current commit use + +.. code-block:: console $ hg uncommit not-ready.txt @@ -100,70 +112,97 @@ hg qpop ``````` -The following command emulates the behavior of hg qpop: +To emulate the behavior of ``qpop`` use + +.. code-block:: console - $ hg gdown + $ hg previous -If you need to go back to an arbitrary commit you can use: +If you need to go back to an arbitrary commit you can use + +.. code-block:: console $ hg update -.. note:: gdown and update allow movement with working directory +.. note:: previous and update allow movement with working directory changes applied, and gracefully merge them. +.. note:: Previous versions of the documentation recommended + the deprecated gdown command + hg qpush ```````` +The following command emulates the behavior of ``hg qpush`` + +.. code-block:: console + + $ hg next + When you rewrite changesets, descendants of rewritten changesets are marked as "orphan". You need to rewrite them on top of the new version of their ancestor. -The evolution extension adds a command to rewrite "orphan" -changesets::: +The evolution extension adds a command to rewrite "orphan" changesets + +.. code-block:: console $ hg evolve -You can also decide to do it manually using:: +You can also reorder a changeset using - $ hg grab +.. code-block:: console + + $ hg pick OLD_VERSION -or:: +or + +.. code-block:: console - $ hg rebase -r -d . + $ hg rebase -r REVSET_FOR_OLD_VERSION -d . -note: using graft allows you to pick the changeset you want next as the --move -option of qpush do. +note: using ``pick`` allows you to choose the changeset you want next as the ``--move`` +option of ``qpush`` does. hg qrm `````` -evolution introduce a new command to mark a changeset as "not wanted anymore".:: +evolution introduces a new command to mark a changeset as "not wanted anymore". - $ hg prune +.. code-block:: console + + $ hg prune REVSET hg qfold ```````` +The following command emulates the behavior of ``qfold`` -:: +.. code-block:: console - $ hg fold first::last + $ hg fold FIRST::LAST hg qdiff ```````` -``pdiff`` is an alias for `hg diff -r .^` It works like qdiff, but outside MQ. - +``pdiff`` is an alias for ``hg diff -r .^`` It works like ``qdiff``, but outside MQ. -hg qfinish and hg qimport -````````````````````````` +hg qimport +`````````` + +To import a new patch, use + +.. code-block:: console -These are not necessary anymore. If you want to control the -mutability of changesets, see the phase feature. + $ hg import NEW_CHANGES.patch +hg qfinish +`````````` +This is not necessary anymore. If you want to control the +mutability of changesets, see the ``phase`` feature. hg qcommit `````````` diff -r a119432bafc1 -r 7daa67934798 docs/index.rst --- a/docs/index.rst Fri Jan 22 05:37:43 2021 +0100 +++ b/docs/index.rst Tue Jan 26 17:14:29 2021 +0100 @@ -49,7 +49,6 @@ .. toctree:: :maxdepth: 2 - index user-guide sharing concepts diff -r a119432bafc1 -r 7daa67934798 hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Fri Jan 22 05:37:43 2021 +0100 +++ b/hgext3rd/evolve/obsdiscovery.py Tue Jan 26 17:14:29 2021 +0100 @@ -449,7 +449,7 @@ self._data.pop(r, None) except (sqlite3.DatabaseError, sqlite3.OperationalError) as exc: repo.ui.log(b'evoext-cache', - b'error while updating obshashrange cache: %s' + b'error while updating obshashrange cache: %s\n' % forcebytestr(exc)) del self._updating return @@ -562,9 +562,9 @@ del self._con self._new.clear() repo.ui.log(b'evoext-cache', - b'error while saving new data: %s' + b'error while saving new data: %s\n' % forcebytestr(exc)) - repo.ui.debug(b'evoext-cache: error while saving new data: %s' + repo.ui.debug(b'evoext-cache: error while saving new data: %s\n' % forcebytestr(exc)) def _trysave(self, repo): @@ -576,7 +576,7 @@ con = self._db() if con is None: repo.ui.log(b'evoext-cache', b'unable to write obshashrange cache' - b' - cannot create database') + b' - cannot create database\n') return with con: for req in _sqliteschema: diff -r a119432bafc1 -r 7daa67934798 hgext3rd/evolve/obsexchange.py --- a/hgext3rd/evolve/obsexchange.py Fri Jan 22 05:37:43 2021 +0100 +++ b/hgext3rd/evolve/obsexchange.py Tue Jan 26 17:14:29 2021 +0100 @@ -59,7 +59,7 @@ | | Falling back to a less efficient fetching method. | -| More efficient fetching method is possible and will be used in the future. +| More efficient fetching method is possible and will be used in the future.\n """ @eh.wrapfunction(exchange, '_pullbundle2extraprepare') diff -r a119432bafc1 -r 7daa67934798 hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Fri Jan 22 05:37:43 2021 +0100 +++ b/hgext3rd/evolve/stablerangecache.py Tue Jan 26 17:14:29 2021 +0100 @@ -295,8 +295,8 @@ if r'_con' in vars(self): del self._con self._unsavedsubranges.clear() - repo.ui.log(b'evoext-cache', b'error while saving new data: %s' % forcebytestr(exc)) - repo.ui.debug(b'evoext-cache: error while saving new data: %s' % forcebytestr(exc)) + repo.ui.log(b'evoext-cache', b'error while saving new data: %s\n' % forcebytestr(exc)) + repo.ui.debug(b'evoext-cache: error while saving new data: %s\n' % forcebytestr(exc)) def _trysave(self, repo): repo = repo.unfiltered() diff -r a119432bafc1 -r 7daa67934798 hgext3rd/evolve/state.py --- a/hgext3rd/evolve/state.py Fri Jan 22 05:37:43 2021 +0100 +++ b/hgext3rd/evolve/state.py Tue Jan 26 17:14:29 2021 +0100 @@ -111,7 +111,7 @@ try: versionblob = f.read(4) if len(versionblob) < 4: - repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)' + repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)\n' % len(versionblob)) return None version = struct.unpack(b'>I', versionblob)[0] @@ -137,7 +137,7 @@ if rtype == b'C': state[b'current'] = rdata elif rtype.lower(): - repo.ui.debug(b'ignore evolve state record type %s' % rtype) + repo.ui.debug(b'ignore evolve state record type %s\n' % rtype) else: raise error.Abort(_(b"unknown evolvestate field type '%s'") % rtype, hint=_(b'upgrade your evolve')) diff -r a119432bafc1 -r 7daa67934798 hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Fri Jan 22 05:37:43 2021 +0100 +++ b/hgext3rd/topic/__init__.py Tue Jan 26 17:14:29 2021 +0100 @@ -1034,7 +1034,7 @@ return ui.status(_(b'changed topic to "%s" on %d revisions\n') % (bmark, rewrote)) - ui.debug(b'removing bookmark "%s" from "%d"' % (bmark, old)) + ui.debug(b'removing bookmark "%s" from "%d"\n' % (bmark, old)) bookmarks.delete(repo, tr, [bmark]) def _changecurrenttopic(repo, newtopic):