- User Since
- Jun 29 2017, 11:25 AM (55 w, 13 h)
Queued with some typo fixes, thanks.
Queued, thanks. We'll probably need selector.close() somewhere.
if pycompat.isposix or pycompat.iswindows: _STARTUP_COST = 0.01
+ # The Windows worker is thread based. If tasks are CPU bound, threads
+ # in the presence of the GIL result in excessive context switching and
+ # this overhead can slow down execution.
+ _DISALLOW_THREAD_UNSAFE = True
Wed, Jul 18
+ def _stoprebase(self):
+ """stop the interrupted rebase"""
+ 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
+ hg.updaterepo(self.repo, p1, overwrite=True)
+)coreconfigitem('ui', 'interactive', default=None, )
diff --git a/hgext/histedit.py b/hgext/histedit.py
- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1111,7 +1111,8 @@ fm.startitem() goal = _getgoal(opts) revs = opts.get('rev', )
- nobackup = opts.get('no_backup') + nobackup = (opts.get('no_backup') or + not ui.configbool('ui', 'historyediting_backup'))
My two cents. It's better to add a flag to enable threading (e.g. threadsafe)
instead of cpuheavy, and make it off by default.
> Maybe we can simply remove the check since we've dropped support for > Python 2.5. No, we're looking to see if the ssl module is importable - if it's not, that means Python was compiled without TLS support (which is an option, even on 3.x and 2.7). I'm just sniffing for this particular attribute to force the import.
@@ -138,7 +138,15 @@oldchldhandler = signal.signal(signal.SIGCHLD, sigchldhandler) ui.flush() parentpid = os.getpid()
+ pipes = for pargs in partition(args, workers):
+ # Every worker gets its own pipe to send results on, so we don't have to
+ # implement atomic writes larger than PIPE_BUF. Each forked process has
+ # its own pipe's descriptors in the local variables, and the parent
+ # process has the full list of pipe descriptors (and it doesn't really
+ # care what order they're in).
+ rfd, wfd = os.pipe()
+ pipes.append((rfd, wfd))
- make sure we use os._exit in all worker code paths. otherwise the
- worker may do some clean-ups which could cause surprises like
- deadlock. see sshpeer.cleanup for example. @@ -175,8 +183,10 @@ finally: os._exit(ret & 255) pids.add(pid)
- fp = os.fdopen(rfd, r'rb', 0) + fps =  + for rfd, wfd in pipes: + os.close(wfd) + fps.append(os.fdopen(rfd, r'rb', 0))
Tue, Jul 17
- sendmail(sender_addr, to + bcc + cc, fp.getvalue()) + alldests = to + bcc + cc + alldests = [pycompat.strurl(d) for d in alldests] + sendmail(sender_addr, alldests, fp.getvalue())
- return email.utils.formataddr((name, addr)) + return pycompat.bytesurl( + email.utils.formataddr((name, addr.decode('ascii'))))
+ """Returns true iff Python has TLS support, false otherwise."""
+ import ssl
+ getattr(ssl, 'HAS_TLS', False)
+ return True
+ except ImportError:
+ return False
I'm not pretty sure, but missing 'rb'?
Maybe BytesGenerator can be used instead?
Mon, Jul 16
Sun, Jul 15
Looks good. Can you add a test?
Queued, thanks. I've updated this to also remove the import of lock.
Sat, Jul 14
You can remove the if confirm: block at all as it's handled at finally:.
Fri, Jul 13
So what's the next step should be ?
How do you feel about treating the current behavior of `hg grep` as a bug?
>> + 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?
Thu, Jul 12
I think it would make sense to defer the behavior change until we test some more. That said, I do want us to plan to make an intentionally breaking change with the out of the box grep experience *without* `tweakdefaults` enabled. My reasoning is more or less this: approximately nobody uses `hg grep` today because its behavior doesn't match what users expect out of the box. I'm willing to call the current behavior a *bug*, and prominently announce that with 4.8 we expect to change the default behavior of `hg grep` to match user expectations. That's in line with the decision outlined in  which is old enough that mpm was part of the decision. I strongly suspect hglib will be the only meaningful breakage, and we can patch hglib to pass the -r 0:tip flag that'll give consistent behavior across all hg versions.
This doesn't feels simpler, would it be possible to simply rename `descendant` into `isancestorrev` without changing the order of the arguments?
- ui.status(_('starting dry-run rebase; repository will not be changed\n')) + confirm = opts.get('confirm') + if confirm: + ui.status(_('starting rebase...\n'))
Wed, Jul 11
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?
What is the right place to register this config option?
Still can't apply. Which revision is this patch based on?
Tue, Jul 10
$ hg up -q null
- $ hg grep -f port
-  + $ hg grep -r tip:0 -f port
This can't be applied, can you rebase?
Mon, Jul 9
def _dryrunrebase(ui, repo, opts): rbsrt = rebaseruntime(repo, ui, inmemory=True, opts=opts)
- ui.status(_('starting dry-run rebase; repository will not be changed\n')) + confirm = opts.get('confirm') + if confirm: + ui.status(_('starting rebase...\n')) + else: + ui.status(_('starting dry-run rebase; repository will not be ' + 'changed\n'))
Looks mostly good. Can you rebase this onto the current tip and update the
Can you add some tests that make both dirtyc1 and dirtyc2 set, and
trigger copy tracing?
Sun, Jul 8
Fri, Jul 6
+ if not opts.get('rev'):
+ opts['allfiles'] = True