[PATCH 6 of 7] strip: introduce a soft strip option

Boris FELD boris.feld at octobus.net
Wed Jan 23 09:11:39 EST 2019


On 04/01/2019 03:50, Boris FELD wrote:
> On 03/01/2019 16:23, Pulkit Goyal wrote:
>>
>>
>> On Thu, Jan 3, 2019 at 4:14 AM Boris Feld <boris.feld at octobus.net
>> <mailto:boris.feld at octobus.net>> wrote:
>>
>>     # HG changeset patch
>>     # User Boris Feld <boris.feld at octobus.net
>>     <mailto:boris.feld at octobus.net>>
>>     # Date 1539697680 -7200
>>     #      Tue Oct 16 15:48:00 2018 +0200
>>     # Node ID a82909c0da7cc07ea1a46690ffc08e45ebc14af6
>>     # Parent  65488c7d2e933cdb2ab1c36b3887a8a67a24fc60
>>     # EXP-Topic archived-phase-UX
>>     # Available At https://bitbucket.org/octobus/mercurial-devel/
>>     #              hg pull
>>     https://bitbucket.org/octobus/mercurial-devel/ -r a82909c0da7c
>>     strip: introduce a soft strip option
>>
>>     This is the first user-accessible way to use the archived phase
>>     introduced in
>>     4.8. This implements a feature implemented during the Stockholm
>>     sprint. The
>>     archived phase behave as stripping, changesets are no longer
>>     accessible, but
>>     pulling/unbundling them will make then reappear. The only notable
>>     difference
>>     is that unlike hard stripping, soft stripping does not affect
>>     obsmarkers.
>>
>>     Adding flag to strip is a good way to provide access to the
>>     feature without
>>     taking a too big risk on the final UI we want.
>>
>>     The next changeset will make use of the archived phase for
>>     history rewriting
>>     command. However, having a way to manually trigger the feature
>>     first seemed
>>     better.
>>
>>     Using the archived phase is faster and less traumatic for the
>>     repository.
>>
>>     diff --git a/hgext/strip.py b/hgext/strip.py
>>     --- a/hgext/strip.py
>>     +++ b/hgext/strip.py
>>     @@ -76,7 +76,8 @@ def _findupdatetarget(repo, nodes):
>>
>>          return unode
>>
>>     -def strip(ui, repo, revs, update=True, backup=True, force=None,
>>     bookmarks=None):
>>     +def strip(ui, repo, revs, update=True, backup=True, force=None,
>>     bookmarks=None,
>>     +          soft=False):
>>          with repo.wlock(), repo.lock():
>>
>>              if update:
>>     @@ -85,7 +86,10 @@ def strip(ui, repo, revs, update=True, b
>>                  hg.clean(repo, urev)
>>                  repo.dirstate.write(repo.currenttransaction())
>>
>>     -        repair.strip(ui, repo, revs, backup)
>>     +        if soft:
>>     +            repair.softstrip(ui, repo, revs, backup)
>>     +        else:
>>     +            repair.strip(ui, repo, revs, backup)
>>
>>              repomarks = repo._bookmarks
>>              if bookmarks:
>>     @@ -110,7 +114,10 @@ def strip(ui, repo, revs, update=True, b
>>                ('k', 'keep', None, _("do not modify working directory
>>     during "
>>                                      "strip")),
>>                ('B', 'bookmark', [], _("remove revs only reachable
>>     from given"
>>     -                                  " bookmark"), _('BOOKMARK'))],
>>     +                                  " bookmark"), _('BOOKMARK')),
>>     +          ('', 'soft', [],
>>
>>
>> Do we plan to accept arguments with `--soft`? If not, the default
>> value should be None.
> Good catch, not sure how it ends up with []. Will fix in V2. 

Somehow, the V2 never made it to the list but the series is ready. I
just sent them in the list.

Do we want to put them on 4.9 or 5.0?

>>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190123/7328c68d/attachment.html>


More information about the Mercurial-devel mailing list