khanchi97 (Sushil khanchi)
User

Projects

User does not belong to any projects.

User Details

User Since
Jan 29 2018, 11:31 AM (28 w, 1 d)

Recent Activity

Fri, Aug 10

khanchi97 updated the diff for D3982: rebase: add test to show --stop moves bookmarks.
Fri, Aug 10, 7:15 AM
khanchi97 updated the diff for D3970: rebase: include --stop option in documentation.
Fri, Aug 10, 7:15 AM
khanchi97 updated the diff for D3969: rebase: raise error for options conflicting with --stop.
Fri, Aug 10, 7:15 AM
khanchi97 updated the diff for D3959: rebase: add --stop option to stop rebase at any point (issue5206).
Fri, Aug 10, 7:15 AM

Tue, Aug 7

khanchi97 added a comment to D3968: amend: support "history-editing-backup" config option.

@yuja Is there any command left which we can consider to add
'history-editing-backup' config option?

Tue, Aug 7, 5:30 PM

Mon, Aug 6

khanchi97 closed D4123: resolve: organize 'if confirm' conditionals.
Mon, Aug 6, 9:13 AM
khanchi97 committed rHG49b51f41fb46: resolve: organize 'if confirm' conditionals.
resolve: organize 'if confirm' conditionals
Mon, Aug 6, 9:13 AM
khanchi97 created D4123: resolve: organize 'if confirm' conditionals.
Mon, Aug 6, 12:36 AM

Sun, Aug 5

khanchi97 closed D4102: resolve: support confirm config option with --unmark flag.
Sun, Aug 5, 10:40 PM
khanchi97 committed rHG755741c39230: resolve: update commands.resolve.confirm help text.
resolve: update commands.resolve.confirm help text
Sun, Aug 5, 10:40 PM
khanchi97 committed rHGf35f6791595f: resolve: support confirm config option with --unmark flag.
resolve: support confirm config option with --unmark flag
Sun, Aug 5, 10:40 PM
khanchi97 closed D4103: resolve: update commands.resolve.confirm help text.
Sun, Aug 5, 10:40 PM

Sat, Aug 4

khanchi97 updated the diff for D4102: resolve: support confirm config option with --unmark flag.
Sat, Aug 4, 2:20 PM
khanchi97 updated the diff for D4103: resolve: update commands.resolve.confirm help text.
Sat, Aug 4, 2:19 PM
khanchi97 added inline comments to D4102: resolve: support confirm config option with --unmark flag.
Sat, Aug 4, 2:18 PM
khanchi97 closed D4101: resolve: support commands.resolve.confirm option with --mark flag.
Sat, Aug 4, 1:39 PM
khanchi97 committed rHGdb03e5cefc82: resolve: support commands.resolve.confirm option with --mark flag.
resolve: support commands.resolve.confirm option with --mark flag
Sat, Aug 4, 1:38 PM
khanchi97 created D4102: resolve: support confirm config option with --unmark flag.
Sat, Aug 4, 3:32 AM
khanchi97 created D4101: resolve: support commands.resolve.confirm option with --mark flag.
Sat, Aug 4, 3:32 AM
khanchi97 created D4103: resolve: update commands.resolve.confirm help text.
Sat, Aug 4, 3:32 AM
khanchi97 added a dependent revision for D4102: resolve: support confirm config option with --unmark flag: D4103: resolve: update commands.resolve.confirm help text.
Sat, Aug 4, 3:32 AM
khanchi97 added a dependent revision for D4101: resolve: support commands.resolve.confirm option with --mark flag: D4102: resolve: support confirm config option with --unmark flag.
Sat, Aug 4, 3:31 AM

Fri, Aug 3

khanchi97 abandoned D2579: WIP: fix unshelve refuses to apply on modified MQ patch (issue4318).
Fri, Aug 3, 5:02 PM
khanchi97 abandoned D3871: rebase: improve output of --confirm option.
Fri, Aug 3, 4:38 PM
khanchi97 abandoned D3828: rebase: add **opts to _prepareabortorcontinue.
Fri, Aug 3, 4:36 PM
khanchi97 closed D3988: resolve: add confirm config option.
Fri, Aug 3, 10:28 AM
khanchi97 committed rHGf8732e33bcbc: resolve: add confirm config option.
resolve: add confirm config option
Fri, Aug 3, 10:27 AM
khanchi97 closed D3968: amend: support "history-editing-backup" config option.
Fri, Aug 3, 9:44 AM
khanchi97 closed D4055: rebase: move "backup" flag to rbsrt.
Fri, Aug 3, 9:44 AM
khanchi97 committed rHG32ece991955c: amend: support "history-editing-backup" config option.
amend: support "history-editing-backup" config option
Fri, Aug 3, 9:44 AM
khanchi97 committed rHG2b728789edfd: rebase: move "backup" flag to rebaseruntime.
rebase: move "backup" flag to rebaseruntime
Fri, Aug 3, 9:44 AM
khanchi97 updated the diff for D3988: resolve: add confirm config option.
Fri, Aug 3, 3:39 AM
khanchi97 updated the diff for D4055: rebase: move "backup" flag to rbsrt.
Fri, Aug 3, 3:35 AM
khanchi97 added inline comments to D4055: rebase: move "backup" flag to rbsrt.
Fri, Aug 3, 3:33 AM

Thu, Aug 2

khanchi97 updated the diff for D3968: amend: support "history-editing-backup" config option.
Thu, Aug 2, 2:59 PM
khanchi97 created D4055: rebase: move "backup" flag to rbsrt.
Thu, Aug 2, 2:42 PM
khanchi97 added a comment to D3887: rebase: support "history-editing-backup" config option.
In D3887#62850, @pulkit wrote:
In D3887#62825, @yuja wrote:

Queued, thanks.

@@ -829,6 +833,8 @@

userrevs = list(repo.revs(opts.get('auto_orphans')))
opts['rev'] = [revsetlang.formatspec('%ld and orphan()', userrevs)]
opts['dest'] = '_destautoorphanrebase(SRC)'

+ backup = ui.configbool('ui', 'history-editing-backup')
+ opts['backup'] = backup

This seems getting ugly. Maybe the option can be carried by rbsrt instead?

self.backupf = ui.configbool('ui', 'history-editing-backup')

I like Yuya's suggestion here. @khanchi97 can you please follow-up?

Thu, Aug 2, 2:04 PM
khanchi97 committed rHG2002c193f2bc: rebase: support "history-editing-backup" config option.
rebase: support "history-editing-backup" config option
Thu, Aug 2, 10:48 AM
khanchi97 closed D3887: rebase: support "history-editing-backup" config option.
Thu, Aug 2, 9:51 AM
khanchi97 committed rHG7de767e15f52: rebase: support "history-editing-backup" config option.
rebase: support "history-editing-backup" config option
Thu, Aug 2, 9:51 AM
khanchi97 updated the diff for D3988: resolve: add confirm config option.
Thu, Aug 2, 4:26 AM

Wed, Aug 1

khanchi97 updated the diff for D3988: resolve: add confirm config option.
Wed, Aug 1, 10:26 AM

Tue, Jul 31

khanchi97 created D3988: resolve: add confirm config option.
Tue, Jul 31, 9:51 AM

Fri, Jul 27

khanchi97 added a comment to D3959: rebase: add --stop option to stop rebase at any point (issue5206).
In D3959#61803, @pulkit wrote:

You also need to take care of bookmark movements. Bookmark from changesets which have successfully rebased should be moved to their successors when we call --stop.

Fri, Jul 27, 5:05 AM
khanchi97 created D3982: rebase: add test to show --stop moves bookmarks.
Fri, Jul 27, 5:05 AM

Tue, Jul 24

khanchi97 updated the diff for D3970: rebase: include --stop option in documentation.
Tue, Jul 24, 2:04 PM
khanchi97 updated the diff for D3969: rebase: raise error for options conflicting with --stop.
Tue, Jul 24, 2:04 PM
khanchi97 updated the diff for D3959: rebase: add --stop option to stop rebase at any point (issue5206).
Tue, Jul 24, 2:04 PM
khanchi97 added a comment to D3959: rebase: add --stop option to stop rebase at any point (issue5206).

@pulkit I will send a follow up which will take care of bookmarks movement. Thanks for review!

Tue, Jul 24, 6:28 AM

Sun, Jul 22

khanchi97 created D3970: rebase: include --stop option in documentation.
Sun, Jul 22, 12:55 PM
khanchi97 created D3969: rebase: raise error for options conflicting with --stop.
Sun, Jul 22, 12:55 PM
khanchi97 added a dependent revision for D3969: rebase: raise error for options conflicting with --stop: D3970: rebase: include --stop option in documentation.
Sun, Jul 22, 12:55 PM
khanchi97 updated the diff for D3959: rebase: add --stop option to stop rebase at any point (issue5206).
Sun, Jul 22, 12:55 PM
khanchi97 added a dependent revision for D3959: rebase: add --stop option to stop rebase at any point (issue5206): D3969: rebase: raise error for options conflicting with --stop.
Sun, Jul 22, 12:55 PM

Sat, Jul 21

khanchi97 added a comment to D3959: rebase: add --stop option to stop rebase at any point (issue5206).
In D3959#61670, @yuja wrote:

+ def _stoprebase(self):
+ """stop the interrupted rebase"""
+ self.restorestatus()
+ if not self.stateobj.exists():
+ raise error.Abort(_("no interrupted rebase found"))
+ allowunstable = obsolete.isenabled(self.repo, obsolete.allowunstableopt)
+ if not (self.keepf or allowunstable):
+ raise error.Abort(_("can't remove original changesets with"
+ " unrebased descendants"),
+ hint=_('either enable evolve extension to allow unstable '
+ 'revisions or use --keep to keep original changesets'))
+
+ # update to the last rebased node if any
+ ctx = self.repo[None]
+ pars = [p.node() for p in ctx.parents()]
+ p1 = pars[0]
+ hg.updaterepo(self.repo, p1, overwrite=True)

Perhaps this differs from what a successful rebase would do. Unlike graft,
hg rebase goes back to the original working directory.

right, will change it.

+ # either mark obsolete or keep rebased revisions
+ repo, ui, opts = self.repo, self.ui, self.opts
+ fm = ui.formatter('rebase', opts)
+ fm.startitem()
+ clearrebased(ui, repo, self.destmap, self.state, self.skipped,
+ collapsedas=None, keepf=self.keepf, fm=fm)
+ clearstatus(self.repo)
+ fm.end()
+ return 0

I doubt if this would work with --collapse. Can you try writing some tests?

What is the expected behaviour in case of --collapse? Should it collapse only those revisions which are rebased, then we may have to ask user to change commit message accordingly.

I'm not pretty sure, but it might be possible to utilize _finishrebase()
to implement --stop, roughly by:

  1. restore status
  2. drop revisions that aren't rebased yet
  3. finish it

yeah, trying to do it in _finishrebase()

+ elif stop:
+ #todo: raise error for conflicting options

Yes!

Sat, Jul 21, 1:31 PM

Fri, Jul 20

khanchi97 added inline comments to D3901: histedit: add history-editing-backup config option.
Fri, Jul 20, 4:13 PM
khanchi97 created D3968: amend: support "history-editing-backup" config option.
Fri, Jul 20, 4:05 PM
khanchi97 added a dependent revision for D3887: rebase: support "history-editing-backup" config option: D3968: amend: support "history-editing-backup" config option.
Fri, Jul 20, 4:04 PM
khanchi97 updated the diff for D3887: rebase: support "history-editing-backup" config option.
Fri, Jul 20, 4:04 PM

Thu, Jul 19

khanchi97 closed D3965: histedit: drop --no-backup option.
Thu, Jul 19, 2:13 PM
khanchi97 committed rHGfaea9b1980d9: histedit: drop --no-backup option.
histedit: drop --no-backup option
Thu, Jul 19, 2:13 PM
khanchi97 created D3965: histedit: drop --no-backup option.
Thu, Jul 19, 1:52 PM
khanchi97 closed D3901: histedit: add history-editing-backup config option.
Thu, Jul 19, 8:29 AM
khanchi97 committed rHGc2586a6e5884: histedit: add history-editing-backup config option.
histedit: add history-editing-backup config option
Thu, Jul 19, 8:28 AM

Wed, Jul 18

khanchi97 added a comment to D3901: histedit: add history-editing-backup config option.

And, should we drop the --no-backup option? @pulkit what do you think?

Yep, we should either have this option everywhere or not have it anywhere. I too think that config option is better suited here. Let's drop it and comment on the bug which needed the flag about the config option.

How do we drop a feature? Do I need to remove all the code related to --no-backup option?

Wed, Jul 18, 4:01 PM
khanchi97 added a comment to D3901: histedit: add history-editing-backup config option.

Because this option has not been part of a release yet. There is no point of releasing a deprecated feature.

Got it. Thanks!

Wed, Jul 18, 3:56 PM
khanchi97 added a comment to D3901: histedit: add history-editing-backup config option.

And, should we drop the --no-backup option?

IIUC,
dropped -> user won't be able to use that option
deprecated -> can use, but this is not preferred option to use
Am I right above?
If yes, why not deprecate then?

Wed, Jul 18, 1:45 PM
khanchi97 updated the diff for D3901: histedit: add history-editing-backup config option.
Wed, Jul 18, 1:29 PM

Tue, Jul 17

khanchi97 created D3959: rebase: add --stop option to stop rebase at any point (issue5206).
Tue, Jul 17, 3:43 PM

Jul 15 2018

khanchi97 closed D3947: rebase: remove unused variable "release" and an extra blank line.
Jul 15 2018, 9:29 AM
khanchi97 closed D3945: rebase: remove unnecessary confirm block.
Jul 15 2018, 9:29 AM
khanchi97 committed rHG8eeed92475d5: rebase: remove unused variable "release" and an extra blank line.
rebase: remove unused variable "release" and an extra blank line
Jul 15 2018, 9:29 AM
khanchi97 committed rHG70448ec995c2: rebase: remove unnecessary confirm block.
rebase: remove unnecessary confirm block
Jul 15 2018, 9:29 AM
khanchi97 created D3947: rebase: remove unused variable "release" and an extra blank line.
Jul 15 2018, 6:20 AM

Jul 14 2018

khanchi97 created D3945: rebase: remove unnecessary confirm block.
Jul 14 2018, 1:32 PM
khanchi97 closed D3944: rebase: in --confirm option just abort if hit a conflict.
Jul 14 2018, 10:19 AM
khanchi97 committed rHGb3d0c97a0820: rebase: in --confirm option just abort if hit a conflict.
rebase: in --confirm option just abort if hit a conflict
Jul 14 2018, 10:19 AM
khanchi97 added inline comments to D3944: rebase: in --confirm option just abort if hit a conflict.
Jul 14 2018, 7:20 AM
khanchi97 updated the diff for D3830: rebase: suppress transaction warns during dry-run.
Jul 14 2018, 2:24 AM
khanchi97 added a comment to D3871: rebase: improve output of --confirm option.

This doesn't apply cleanly, could you rebase it?

Jul 14 2018, 2:07 AM
khanchi97 created D3944: rebase: in --confirm option just abort if hit a conflict.
Jul 14 2018, 2:00 AM

Jul 13 2018

khanchi97 closed D3939: rebase: correct misleading message in --confirm option.
Jul 13 2018, 8:23 AM
khanchi97 closed D3938: rebase: make sure we don't loose the return code in --confirm option.
Jul 13 2018, 8:23 AM
khanchi97 committed rHG35b3f686157a: rebase: correct misleading message in --confirm option.
rebase: correct misleading message in --confirm option
Jul 13 2018, 8:23 AM
khanchi97 committed rHGa50482254b0a: rebase: make sure we don't loose the return code in --confirm option.
rebase: make sure we don't loose the return code in --confirm option
Jul 13 2018, 8:23 AM

Jul 12 2018

khanchi97 added a comment to D3870: rebase: add --confirm option.
except error.InMemoryMergeConflictsError:
    ui.status(_('hit a merge conflict\n'))

+ if confirm:
+ # abort as in-memory merge doesn't support conflict
+ rbsrt._prepareabortorcontinue(isabort=True, backup=False,
+ suppwarns=True)
+ needsabort = False
+ if not ui.promptchoice(_(b'apply changes (yn)?'
+ b'$$ &Yes $$ &No')):

Nit: This isn't actually "apply changes".

Hmm, then what it should be?

Jul 12 2018, 1:31 PM
khanchi97 created D3939: rebase: correct misleading message in --confirm option.
Jul 12 2018, 1:15 PM
khanchi97 added a dependent revision for D3938: rebase: make sure we don't loose the return code in --confirm option: D3939: rebase: correct misleading message in --confirm option.
Jul 12 2018, 1:14 PM
khanchi97 created D3938: rebase: make sure we don't loose the return code in --confirm option.
Jul 12 2018, 1:14 PM
khanchi97 closed D3870: rebase: add --confirm option.
Jul 12 2018, 9:12 AM
khanchi97 committed rHG572dff5c946e: rebase: add --confirm option.
rebase: add --confirm option
Jul 12 2018, 9:11 AM

Jul 11 2018

khanchi97 added inline comments to D3870: rebase: add --confirm option.
Jul 11 2018, 1:24 PM
khanchi97 added inline comments to D3870: rebase: add --confirm option.
Jul 11 2018, 1:20 PM
khanchi97 updated the diff for D3870: rebase: add --confirm option.
Jul 11 2018, 1:17 PM
khanchi97 updated the diff for D3901: histedit: add history-editing-backup config option.
Jul 11 2018, 9:12 AM
khanchi97 added a comment to D3870: rebase: add --confirm option.
In D3870#61079, @yuja wrote:

Still can't apply. Which revision is this patch based on?

Ah, this patch is based on https://phab.mercurial-scm.org/D3830 which is not reviewed. Do I need to rebase this to hg-commited current tip?

with repo.wlock(), repo.lock():
    try:
        overrides = {('rebase', 'singletransaction'): True}
        with ui.configoverride(overrides, 'rebase'):
            _origrebase(ui, repo, opts, rbsrt, inmemory=True,
                        leaveunfinished=True, supptrwarns=True)
    except error.InMemoryMergeConflictsError:
        ui.status(_('hit a merge conflict\n'))

+ if confirm:
+ # abort as in-memory merge doesn't support conflict
+ rbsrt._prepareabortorcontinue(isabort=True, backup=False,
+ suppwarns=True)
+ if not ui.promptchoice(_(b'apply changes (yn)?'
+ b'$$ &Yes $$ &No')):
+ _dorebase(ui, repo, opts, inmemory=False)

    return 1
else:
  • ui.status(_('dry-run rebase completed successfully; run without '
  • '-n/--dry-run to perform this rebase\n')) + if confirm: + ui.status(_('rebase completed successfully\n')) + if not ui.promptchoice(_(b'apply changes (yn)?' + b'$$ &Yes $$ &No')):

If KeyboardInterrupt is raised here for example, abort() wouldn't be called.

okay, can I update this patch or send a follow-up to handle KeyboardInterrupt?

finally:
  • # no need to store backup in case of dryrun
  • rbsrt._prepareabortorcontinue(isabort=True, backup=False,
  • suppwarns=True) + if not confirm: + # no need to store backup in case of dryrun + rbsrt._prepareabortorcontinue(isabort=True, backup=False, + suppwarns=True)
Jul 11 2018, 8:22 AM

Jul 10 2018

khanchi97 added a comment to D3870: rebase: add --confirm option.

@yuja Rebased, removed variable "needsabort/conflict" and moved that code to "except" and "else" clause accordingly.

Jul 10 2018, 10:50 AM
khanchi97 updated the diff for D3870: rebase: add --confirm option.
Jul 10 2018, 10:45 AM
khanchi97 updated the diff for D3871: rebase: improve output of --confirm option.
Jul 10 2018, 10:45 AM
khanchi97 updated the diff for D3830: rebase: suppress transaction warns during dry-run.
Jul 10 2018, 10:45 AM