yuja (Yuya Nishihara)
User

Projects

User Details

User Since
Jun 29 2017, 11:25 AM (55 w, 13 h)

Recent Activity

Yesterday

yuja committed rHGc08ea1e219c0: worker: call selector.close() to release polling resources.
worker: call selector.close() to release polling resources
Thu, Jul 19, 2:13 PM
yuja added a comment to D3901: histedit: add history-editing-backup config option.

Queued with some typo fixes, thanks.

Thu, Jul 19, 8:23 AM
yuja added a comment to D3960: worker: use one pipe per posix worker and select() in parent process.

Queued, thanks. We'll probably need selector.close() somewhere.

Thu, Jul 19, 8:15 AM
yuja added a comment to D3962: worker: ability to disable thread unsafe tasks.
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

Thu, Jul 19, 8:15 AM

Wed, Jul 18

yuja added a comment to D3959: rebase: add --stop option to stop rebase at any point (issue5206).

+ 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)

Wed, Jul 18, 9:01 AM
yuja updated subscribers of D3901: histedit: add history-editing-backup config option.

+coreconfigitem('ui', 'historyediting_backup',
+ default=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'))
Wed, Jul 18, 8:34 AM
yuja added a comment to D3963: merge: mark file gets as not thread safe.

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.

Wed, Jul 18, 8:07 AM
yuja added a comment to D3955: mail: modernize check for Python-with-TLS.
>   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.
Wed, Jul 18, 7:48 AM
yuja added a comment to D3960: worker: use one pipe per posix worker and select() in parent process.

@@ -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))

    1. make sure we use os._exit in all worker code paths. otherwise the
    2. worker may do some clean-ups which could cause surprises like
    3. deadlock. see sshpeer.cleanup for example. @@ -175,8 +183,10 @@ finally: os._exit(ret & 255) pids.add(pid)
  • os.close(wfd)
  • fp = os.fdopen(rfd, r'rb', 0) + fps = [] + for rfd, wfd in pipes: + os.close(wfd) + fps.append(os.fdopen(rfd, r'rb', 0))
Wed, Jul 18, 7:37 AM

Tue, Jul 17

yuja added a comment to D3957: patchbomb: python 3 really wants those email addresses in unicode.
  • 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())
Tue, Jul 17, 9:25 AM
yuja added a comment to D3954: mail: cope with Py3 unicode antics on email addresses.
  • return email.utils.formataddr((name, addr)) + return pycompat.bytesurl( + email.utils.formataddr((name, addr.decode('ascii'))))
Tue, Jul 17, 9:25 AM
yuja added a comment to D3955: mail: modernize check for Python-with-TLS.

+def _pyhastls():
+ """Returns true iff Python has TLS support, false otherwise."""
+ try:
+ import ssl
+ getattr(ssl, 'HAS_TLS', False)
+ return True
+ except ImportError:
+ return False

Tue, Jul 17, 9:25 AM
yuja added a comment to D3956: mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile.

I'm not pretty sure, but missing 'rb'?

Tue, Jul 17, 9:25 AM
yuja added a comment to D3951: patchbomb: work around email module really wanting to write unicode data.

Maybe BytesGenerator can be used instead?

Tue, Jul 17, 9:25 AM

Mon, Jul 16

yuja committed rHGff1182d166a2: obsolete: explode if metadata contains invalid UTF-8 sequence (API).
obsolete: explode if metadata contains invalid UTF-8 sequence (API)
Mon, Jul 16, 1:32 PM
yuja committed rHG6b5ca1d0aa1e: obsolete: store user name and note in UTF-8 (issue5754) (BC).
obsolete: store user name and note in UTF-8 (issue5754) (BC)
Mon, Jul 16, 1:32 PM
yuja committed rHGe4b270a32ba8: revset: special case commonancestors(none()) to be empty set.
revset: special case commonancestors(none()) to be empty set
Mon, Jul 16, 1:32 PM
yuja committed rHG83d965803325: obsolete: clarify users in markerusers() never contain None.
obsolete: clarify users in markerusers() never contain None
Mon, Jul 16, 1:32 PM
yuja committed rHG607e2a2501e6: revset: clarify heads() order doesn't matter while computing common ancestors.
revset: clarify heads() order doesn't matter while computing common ancestors
Mon, Jul 16, 1:32 PM
yuja committed rHGb93dc48e74ad: hghave: require clang-format >= 6 due to output change.
hghave: require clang-format >= 6 due to output change
Mon, Jul 16, 1:32 PM
yuja committed rHG992e108212a9: cext: reformat with clang-format 6.0.
cext: reformat with clang-format 6.0
Mon, Jul 16, 1:32 PM
yuja committed rHGf016eac2a466: py3: use bytes() to byte-stringify Abort message in handleremotechangegroup().
py3: use bytes() to byte-stringify Abort message in handleremotechangegroup()
Mon, Jul 16, 1:32 PM
yuja committed rHGcfdf7bfb0ac0: py3: don't str() to byte-stringify object in test-bundle2-remote-changegroup.t.
py3: don't str() to byte-stringify object in test-bundle2-remote-changegroup.t
Mon, Jul 16, 1:32 PM
yuja committed rHG72c086b1af12: py3: byte-stringify literals in extension in test-bundle2-remote-changegroup.t.
py3: byte-stringify literals in extension in test-bundle2-remote-changegroup.t
Mon, Jul 16, 1:32 PM
yuja committed rHG6437e89b64d5: py3: open file in binary mode in test-bundle2-remote-changegroup.t.
py3: open file in binary mode in test-bundle2-remote-changegroup.t
Mon, Jul 16, 1:32 PM
yuja committed rHG3700564c63fe: fileset: remove fullmatchctx class.
fileset: remove fullmatchctx class
Mon, Jul 16, 2:39 AM
yuja committed rHG370ff3e34160: fileset: remove subset and unused filtering functions from matchctx.
fileset: remove subset and unused filtering functions from matchctx
Mon, Jul 16, 2:39 AM
yuja committed rHGff5b6fca1082: fileset: rewrite predicates to return matcher not closed to subset (API) (BC).
fileset: rewrite predicates to return matcher not closed to subset (API) (BC)
Mon, Jul 16, 2:39 AM
yuja committed rHG5d9749c598f0: fileset: remove callexisting flag and mctx.existing() (API).
fileset: remove callexisting flag and mctx.existing() (API)
Mon, Jul 16, 2:39 AM
yuja committed rHG1500cbe22d53: fileset: parse argument of size() by predicate function.
fileset: parse argument of size() by predicate function
Mon, Jul 16, 2:39 AM
yuja committed rHG2570dca0f21c: highlight: use matcher API to test if file should be pygmentized.
highlight: use matcher API to test if file should be pygmentized
Mon, Jul 16, 2:39 AM
yuja committed rHG131aae58a316: fileset: add "tracked()" to explicitly select files in the revision.
fileset: add "tracked()" to explicitly select files in the revision
Mon, Jul 16, 2:39 AM
yuja committed rHG80466fd85ac9: fileset: rewrite andset() to not use mctx.narrow().
fileset: rewrite andset() to not use mctx.narrow()
Mon, Jul 16, 2:39 AM
yuja committed rHG07b551a4df44: fileset: add helpers to make predicatematcher and nevermatcher.
fileset: add helpers to make predicatematcher and nevermatcher
Mon, Jul 16, 2:39 AM
yuja committed rHGddd2165438cd: phases: micro-optimize newheads() to not create context objects.
phases: micro-optimize newheads() to not create context objects
Mon, Jul 16, 2:05 AM
yuja committed rHG88efb7d6bcb6: phases: remove excessive optimization from newheads() (issue5939).
phases: remove excessive optimization from newheads() (issue5939)
Mon, Jul 16, 2:05 AM

Sun, Jul 15

yuja added a comment to D3946: obsolete: resolved ValueError for var containing 2 ':' chars(issue-5783).

Looks good. Can you add a test?

Sun, Jul 15, 9:27 AM
yuja added a comment to D3947: rebase: remove unused variable "release" and an extra blank line.

Queued, thanks. I've updated this to also remove the import of lock.

Sun, Jul 15, 9:27 AM

Sat, Jul 14

yuja added a comment to D3944: rebase: in --confirm option just abort if hit a conflict.

You can remove the if confirm: block at all as it's handled at finally:.

Sat, Jul 14, 10:14 AM

Fri, Jul 13

yuja updated subscribers of D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.

So what's the next step should be ?

Fri, Jul 13, 9:53 PM
yuja added a comment to D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.
How do you feel about treating the current behavior of `hg grep` as a bug?
Fri, Jul 13, 8:43 AM
yuja added a comment to D3870: rebase: add --confirm option.
>> +            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?
Fri, Jul 13, 8:29 AM

Thu, Jul 12

yuja added a comment to D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.
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[0] 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 [1] 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.
Thu, Jul 12, 9:30 AM
yuja added a comment to D3929: revlog: replace descendant(b, a) by isdescendantrev(a, b) (API).
This doesn't feels simpler, would it be possible to simply rename `descendant` into `isancestorrev` without changing the order of the arguments?
Thu, Jul 12, 9:22 AM
yuja added a comment to D3870: rebase: add --confirm option.
  • ui.status(_('starting dry-run rebase; repository will not be changed\n')) + confirm = opts.get('confirm') + if confirm: + ui.status(_('starting rebase...\n'))
Thu, Jul 12, 9:14 AM

Wed, Jul 11

yuja closed D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.
Wed, Jul 11, 2:13 PM
yuja closed D3920: grep: hide cryptic revision number by default.
Wed, Jul 11, 2:12 PM
yuja closed D3915: grep: rename --allfiles to --all-files.
Wed, Jul 11, 2:12 PM
yuja committed rHGaabc01da9834: grep: hide cryptic revision number by default.
grep: hide cryptic revision number by default
Wed, Jul 11, 2:12 PM
yuja closed D3918: grep: add config knob to enable/disable the default wdir search.
Wed, Jul 11, 2:12 PM
yuja committed rHGbfcd5c7cbf9a: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.
grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults
Wed, Jul 11, 2:11 PM
yuja closed D3917: grep: search working directory files by default if --all-files is specified.
Wed, Jul 11, 2:11 PM
yuja committed rHG5e4027db52f4: grep: add config knob to enable/disable the default wdir search.
grep: add config knob to enable/disable the default wdir search
Wed, Jul 11, 2:11 PM
yuja closed D3916: grep: reject --diff --all-files.
Wed, Jul 11, 2:11 PM
yuja committed rHGeba69ddd4e52: grep: search working directory files by default if --all-files is specified.
grep: search working directory files by default if --all-files is specified
Wed, Jul 11, 2:11 PM
yuja committed rHG0d0f8bd692c4: grep: reject --diff --all-files.
grep: reject --diff --all-files
Wed, Jul 11, 2:11 PM
yuja committed rHGffd08ec22955: grep: rename --allfiles to --all-files.
grep: rename --allfiles to --all-files
Wed, Jul 11, 2:11 PM
yuja added a reviewer for D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults: sangeet259.
Wed, Jul 11, 10:18 AM
yuja created D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.
Wed, Jul 11, 10:17 AM
yuja created D3920: grep: hide cryptic revision number by default.
Wed, Jul 11, 10:17 AM
yuja created D3918: grep: add config knob to enable/disable the default wdir search.
Wed, Jul 11, 10:16 AM
yuja created D3915: grep: rename --allfiles to --all-files.
Wed, Jul 11, 10:16 AM
yuja added a dependent revision for D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults: D3920: grep: hide cryptic revision number by default.
Wed, Jul 11, 10:16 AM
yuja created D3917: grep: search working directory files by default if --all-files is specified.
Wed, Jul 11, 10:16 AM
yuja created D3916: grep: reject --diff --all-files.
Wed, Jul 11, 10:16 AM
yuja added a dependent revision for D3918: grep: add config knob to enable/disable the default wdir search: D3919: grep: restore pre-9ef10437bb88 behavior, enable wdir search by tweakdefaults.
Wed, Jul 11, 10:16 AM
yuja added a dependent revision for D3917: grep: search working directory files by default if --all-files is specified: D3918: grep: add config knob to enable/disable the default wdir search.
Wed, Jul 11, 10:15 AM
yuja added a dependent revision for D3916: grep: reject --diff --all-files: D3917: grep: search working directory files by default if --all-files is specified.
Wed, Jul 11, 10:15 AM
yuja added a dependent revision for D3915: grep: rename --allfiles to --all-files: D3916: grep: reject --diff --all-files.
Wed, Jul 11, 10:15 AM
yuja added a comment to D3870: rebase: add --confirm option.
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?
Wed, Jul 11, 9:46 AM
yuja added a comment to D3901: histedit: add history-editing-backup config option.

What is the right place to register this config option?

Wed, Jul 11, 7:27 AM
yuja added a comment to D3870: rebase: add --confirm option.

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

Wed, Jul 11, 7:16 AM

Tue, Jul 10

yuja added a comment to D3826: grep: change default behaviour of grep.
$ hg up -q null
  • $ hg grep -f port
  • [1] + $ hg grep -r tip:0 -f port
Tue, Jul 10, 9:36 AM
yuja added a comment to D3870: rebase: add --confirm option.

This can't be applied, can you rebase?

Tue, Jul 10, 9:18 AM

Mon, Jul 9

yuja committed rHG443029011990: encoding: alias cp65001 to utf-8 on Windows.
encoding: alias cp65001 to utf-8 on Windows
Mon, Jul 9, 10:20 AM
yuja committed rHG5cbcbe51d38d: fileset: pass in badfn to inner matchers.
fileset: pass in badfn to inner matchers
Mon, Jul 9, 10:20 AM
yuja committed rHG760cc5dc01e8: fileset: restrict getfileset() to not return a computed set (API).
fileset: restrict getfileset() to not return a computed set (API)
Mon, Jul 9, 10:20 AM
yuja committed rHG0ba4cf3f088f: match: add prefixdirmatcher to adapt subrepo matcher back.
match: add prefixdirmatcher to adapt subrepo matcher back
Mon, Jul 9, 10:20 AM
yuja committed rHG3d8ef60569d8: fileset: make debugfileset filter repository files.
fileset: make debugfileset filter repository files
Mon, Jul 9, 10:20 AM
yuja committed rHGd474b3b44d4f: bundle2: use ProgrammingError to report bad use of addparam().
bundle2: use ProgrammingError to report bad use of addparam()
Mon, Jul 9, 10:12 AM
yuja committed rHG980aee54fd70: py3: byte-stringify literals in extension in test-bundle2-format.t.
py3: byte-stringify literals in extension in test-bundle2-format.t
Mon, Jul 9, 10:12 AM
yuja committed rHGfe81af15675a: py3: drop b'' while formatting BundleUnknownFeatureError message.
py3: drop b'' while formatting BundleUnknownFeatureError message
Mon, Jul 9, 10:12 AM
yuja committed rHG85c74c5a1590: py3: drop b'' while formatting ResponseError.
py3: drop b'' while formatting ResponseError
Mon, Jul 9, 10:12 AM
yuja committed rHG15622e72307d: py3: suppress write() result and close file in test-bookmarks-pushpull.t.
py3: suppress write() result and close file in test-bookmarks-pushpull.t
Mon, Jul 9, 10:12 AM
yuja committed rHG2834ac06d5a9: py3: fix revnums in bookmark discovery to be consumable more than once.
py3: fix revnums in bookmark discovery to be consumable more than once
Mon, Jul 9, 10:12 AM
yuja committed rHG4df549d0f1fd: py3: byte-stringify literals in extension in test-bundle2-exchange.t.
py3: byte-stringify literals in extension in test-bundle2-exchange.t
Mon, Jul 9, 10:12 AM
yuja added a comment to D3870: rebase: add --confirm option.
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'))
Mon, Jul 9, 9:15 AM
yuja added a comment to D3826: grep: change default behaviour of grep.

Looks mostly good. Can you rebase this onto the current tip and update the
help?

Mon, Jul 9, 8:23 AM
yuja added a comment to D3896: copies: handle case when both merge cset are not descendant of merge base.

Can you add some tests that make both dirtyc1 and dirtyc2 set, and
trigger copy tracing?

Mon, Jul 9, 8:23 AM

Sun, Jul 8

yuja committed rHGf9805627af1f: fileset: sort debugfileset output.
fileset: sort debugfileset output
Sun, Jul 8, 7:16 PM
yuja committed rHGd046bf37f1ba: fileset: move helper functions to top.
fileset: move helper functions to top
Sun, Jul 8, 7:16 PM
yuja committed rHGafef1e362d65: py3: fix bundle heads to be consumable more than once.
py3: fix bundle heads to be consumable more than once
Sun, Jul 8, 9:13 AM
yuja committed rHG1fad808f2a6b: py3: byte-stringify literals in hook script in test-bundle.t.
py3: byte-stringify literals in hook script in test-bundle.t
Sun, Jul 8, 9:13 AM
yuja committed rHGf8b46245b26a: py3: make 'None in lazyancestors' not crash.
py3: make 'None in lazyancestors' not crash
Sun, Jul 8, 9:13 AM
yuja committed rHGb263133eeb5a: py3: convert server-string to unicode to make http library happy.
py3: convert server-string to unicode to make http library happy
Sun, Jul 8, 9:13 AM
yuja committed rHGe46c3b6a47b5: py3: fix dumbhttp.py to convert --daemon-postexec arguments back to bytes.
py3: fix dumbhttp.py to convert --daemon-postexec arguments back to bytes
Sun, Jul 8, 9:13 AM
yuja committed rHG21be76e07148: py3: use bytes.endswith() instead of bytes[n].
py3: use bytes.endswith() instead of bytes[n]
Sun, Jul 8, 9:13 AM
yuja committed rHGbe441eb65f09: diff: graduate word-diff option from experimental.
diff: graduate word-diff option from experimental
Sun, Jul 8, 9:13 AM

Fri, Jul 6

yuja added a comment to D3826: grep: change default behaviour of grep.

+ if not opts.get('rev'):
+ opts.get('rev').append("wdir()")
+ opts['allfiles'] = True

Fri, Jul 6, 11:02 PM
yuja added a comment to D3887: rebase: add --no-backup option.
@yuja @pulkit Definitely, adding a config option is better than any other alternative. Can I start to work on this? (I mean adding config option which will work for all history editing commands)
Fri, Jul 6, 10:51 PM