Page MenuHomePhabricator

Kwan (Ian Moody)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 2 2019, 11:21 AM (19 w, 6 d)

Recent Activity

Yesterday

Kwan committed rHG7629eb87e7f2: phabricator: demonstrate broken phabread on string local:commit times.
phabricator: demonstrate broken phabread on string local:commit times
Thu, Jul 18, 9:40 AM
Kwan committed rHGc17e6a3e7356: phabricator: handle local:commits time being string or int.
phabricator: handle local:commits time being string or int
Thu, Jul 18, 9:40 AM

Wed, Jul 17

Kwan closed D6650: phabricator: handle local:commits time being string or int.
Wed, Jul 17, 7:07 PM
Kwan committed rHGc9be100eb7b6: phabricator: handle local:commits time being string or int.
phabricator: handle local:commits time being string or int
Wed, Jul 17, 7:07 PM
Kwan closed D6649: phabricator: demonstrate broken phabread on string local:commit times.
Wed, Jul 17, 7:07 PM
Kwan committed rHG29e80d957813: phabricator: demonstrate broken phabread on string local:commit times.
phabricator: demonstrate broken phabread on string local:commit times
Wed, Jul 17, 7:07 PM

Tue, Jul 16

Kwan added inline comments to D6650: phabricator: handle local:commits time being string or int.
Tue, Jul 16, 2:35 PM
Kwan created D6650: phabricator: handle local:commits time being string or int.

I'm not sure if the test is actually needed, so feel free to drop it/ask me to.

Tue, Jul 16, 2:23 PM
Kwan created D6649: phabricator: demonstrate broken phabread on string local:commit times.
Tue, Jul 16, 2:19 PM

Sun, Jun 23

Kwan added a comment to D6553: shelve: move shelve extension to core.

You should probably run hg mv -A hgext/shelve.py mercurial/shelve.py and amend and re-send to preserve history.

Sun, Jun 23, 7:11 AM

Jun 12 2019

Kwan closed D6514: phabricator: use parents.set to always set dependencies.
Jun 12 2019, 12:54 PM
Kwan committed rHGc19d259fd6ad: phabricator: use parents.set to always set dependencies.
phabricator: use parents.set to always set dependencies
Jun 12 2019, 12:54 PM
Kwan closed D6512: phabricator: add --blocker argument to phabsend to specify blocking reviewers.
Jun 12 2019, 12:44 PM
Kwan closed D6513: phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings.
Jun 12 2019, 12:44 PM
Kwan committed rHGf33d3ee110da: phabricator: add --blocker argument to phabsend to specify blocking reviewers.
phabricator: add --blocker argument to phabsend to specify blocking reviewers
Jun 12 2019, 12:44 PM
Kwan committed rHGd3c81439e2ee: phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings.
phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings
Jun 12 2019, 12:44 PM
Kwan created D6514: phabricator: use parents.set to always set dependencies.

Is it worth adding a test using histedit, or is the use in existing tests enough?

Jun 12 2019, 12:44 PM

Jun 11 2019

Kwan created D6513: phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings.
Jun 11 2019, 2:56 PM
Kwan retitled D6512: phabricator: add --blocker argument to phabsend to specify blocking reviewers from phabricator: add a --blocker argument to phabsend to specify blocking reviewers to phabricator: add --blocker argument to phabsend to specify blocking reviewers.
Jun 11 2019, 2:55 PM
Kwan created D6512: phabricator: add --blocker argument to phabsend to specify blocking reviewers.
Jun 11 2019, 2:28 PM

Jun 8 2019

Kwan closed D6496: phabricator: add commenting to phabsend for new/updated Diffs.
Jun 8 2019, 12:21 PM
Kwan committed rHG29528c4235a1: phabricator: add commenting to phabsend for new/updated Diffs.
phabricator: add commenting to phabsend for new/updated Diffs
Jun 8 2019, 12:21 PM

Jun 7 2019

Kwan updated the diff for D6496: phabricator: add commenting to phabsend for new/updated Diffs.

Doctor repo name in the recordings that I'd missed before

Jun 7 2019, 5:25 PM
Kwan created D6496: phabricator: add commenting to phabsend for new/updated Diffs.

While the .t test can't directly show this, now that we have a VCR matcher for the body we can test the output. In action: https://phabricator-dev.allizom.org/D1253

Jun 7 2019, 5:18 PM

May 12 2019

Kwan added inline comments to D5299: phabricator: fallback reading arcanist config files.
May 12 2019, 7:04 AM

May 11 2019

Kwan added inline comments to D5299: phabricator: fallback reading arcanist config files.
May 11 2019, 1:56 PM

May 10 2019

Kwan closed D6347: phabricator: add custom vcr matcher to match request bodies.
May 10 2019, 12:01 PM
Kwan committed rHGaf13e2088f77: phabricator: add custom vcr matcher to match request bodies.
phabricator: add custom vcr matcher to match request bodies
May 10 2019, 12:01 PM
Kwan updated the diff for D6347: phabricator: add custom vcr matcher to match request bodies.

Switch to comparing sets.

May 10 2019, 11:51 AM
Kwan added inline comments to D6347: phabricator: add custom vcr matcher to match request bodies.
May 10 2019, 11:49 AM

May 6 2019

Kwan created D6347: phabricator: add custom vcr matcher to match request bodies.
May 6 2019, 2:17 PM
Kwan closed D6302: phabricator: include branch in the phabread output.
May 6 2019, 12:22 PM
Kwan closed D6301: phabricator: fallback to reading metadata from diff for phabread.
May 6 2019, 12:22 PM
Kwan committed rHG231334c1ee96: phabricator: include branch in the phabread output.
phabricator: include branch in the phabread output
May 6 2019, 12:22 PM
Kwan committed rHGa4f7dceb07bf: phabricator: fallback to reading metadata from diff for phabread.
phabricator: fallback to reading metadata from diff for phabread
May 6 2019, 12:22 PM
Kwan committed rHG9421d7e12888: phabricator: include commit (node) and parent in the local:commits metadata.
phabricator: include commit (node) and parent in the local:commits metadata
May 6 2019, 12:22 PM
Kwan closed D6298: phabricator: include commit (node) and parent in the local:commits metadata.
May 6 2019, 12:22 PM

Apr 25 2019

Kwan closed D6300: phabricator: read more metadata from local:commits.
Apr 25 2019, 2:07 PM
Kwan committed rHGc4d96f4761d3: phabricator: read more metadata from local:commits.
phabricator: read more metadata from local:commits
Apr 25 2019, 2:07 PM
Kwan closed D6297: phabricator: include branch in the diffproperty metadata.
Apr 25 2019, 2:07 PM
Kwan closed D6299: phabricator: don't assume the existence of properties of local:commits.
Apr 25 2019, 2:07 PM
Kwan committed rHG6dd454e5b123: phabricator: don't assume the existence of properties of local:commits.
phabricator: don't assume the existence of properties of local:commits
Apr 25 2019, 2:07 PM
Kwan committed rHGd49ab47be8a6: phabricator: include branch in the diffproperty metadata.
phabricator: include branch in the diffproperty metadata
Apr 25 2019, 2:07 PM
Kwan added inline comments to D6298: phabricator: include commit (node) and parent in the local:commits metadata.
Apr 25 2019, 12:54 PM

Apr 22 2019

Kwan closed D6295: phabricator: use templatefilters.json in writediffproperties.
Apr 22 2019, 2:24 PM
Kwan closed D6296: phabricator: set local:commits time metadata as an int, not a string.
Apr 22 2019, 2:24 PM
Kwan committed rHGc0e30c9ee5ba: phabricator: set local:commits time metadata as an int, not a string.
phabricator: set local:commits time metadata as an int, not a string
Apr 22 2019, 2:24 PM
Kwan committed rHG289d82a070e9: phabricator: use templatefilters.json in writediffproperties.
phabricator: use templatefilters.json in writediffproperties
Apr 22 2019, 2:24 PM
Kwan added inline comments to D6301: phabricator: fallback to reading metadata from diff for phabread.
Apr 22 2019, 2:08 PM
Kwan added a comment to D6297: phabricator: include branch in the diffproperty metadata.
In D6297#91618, @pulkit wrote:

wow, does it work?

Apr 22 2019, 2:03 PM
Kwan updated the diff for D6302: phabricator: include branch in the phabread output.
Apr 22 2019, 1:57 PM
Kwan updated the diff for D6301: phabricator: fallback to reading metadata from diff for phabread.
Apr 22 2019, 1:57 PM
Kwan abandoned D6304: phabricator: include branch in the phabread output.
Apr 22 2019, 1:54 PM
Kwan abandoned D6303: phabricator: fallback to reading metadata from diff for phabread.
Apr 22 2019, 1:54 PM
Kwan created D6303: phabricator: fallback to reading metadata from diff for phabread.
Apr 22 2019, 1:53 PM
Kwan created D6304: phabricator: include branch in the phabread output.
Apr 22 2019, 1:53 PM
Kwan created D6302: phabricator: include branch in the phabread output.
Apr 22 2019, 1:31 PM
Kwan updated the diff for D6301: phabricator: fallback to reading metadata from diff for phabread.
Apr 22 2019, 1:31 PM
Kwan retitled D6296: phabricator: set local:commits time metadata as an int, not a string from phabricator: set local:commits time metadata as an int, not a string, same as arcanist does to phabricator: set local:commits time metadata as an int, not a string.
Apr 22 2019, 1:31 PM
Kwan retitled D6295: phabricator: use templatefilters.json in writediffproperties from phabricator: use templatefilters.json instead of json.dumps in writediffproperties to phabricator: use templatefilters.json in writediffproperties.
Apr 22 2019, 1:31 PM
Kwan created D6301: phabricator: fallback to reading metadata from diff for phabread.
Apr 22 2019, 11:53 AM
Kwan created D6300: phabricator: read more metadata from local:commits.
Apr 22 2019, 11:53 AM
Kwan created D6299: phabricator: don't assume the existence of properties of local:commits.
Apr 22 2019, 11:52 AM
Kwan created D6298: phabricator: include commit (node) and parent in the local:commits metadata.
Apr 22 2019, 11:52 AM
Kwan created D6297: phabricator: include branch in the diffproperty metadata.
Apr 22 2019, 11:52 AM
Kwan created D6296: phabricator: set local:commits time metadata as an int, not a string.
Apr 22 2019, 11:52 AM
Kwan created D6295: phabricator: use templatefilters.json in writediffproperties.
Apr 22 2019, 11:45 AM

Apr 19 2019

Kwan added inline comments to D5299: phabricator: fallback reading arcanist config files.
Apr 19 2019, 4:08 AM

Mar 19 2019

Kwan added a comment to D6082: phabricator: add a `--branch` flag to `hg phabsend`.
In D6082#89656, @pulkit wrote:
In D6082#88981, @Kwan wrote:
In D6082#88851, @pulkit wrote:

@mharbison72 thanks for tips on adding test. Will add tests in next iteration.
I found that Differentials do have a branch field, maybe we can use that? https://secure.phabricator.com/source/phabricator/browse/master/src/applications/differential/customfield/DifferentialBranchField.php

Seems worth a shot. I don’t know anything about it, but presumably this would be rendered specially in the web UI, like the test plan, etc. That sounds better than as a follow up comment. It also seems natural enough that maybe it can be done unconditionally, instead of needing the argument.

Yeah, it shows in the Diff Detail pane, like here. Unfortunately I think it can be only set when using the creatediff endpoint, which is what I had to change my fork to do (though I could be wrong, the conduit docs are too sparse to be sure).

Last night I tried different endpoints and looks like creatediff is the only one which can be used to set the branch. I have asked on their discourse https://discourse.phabricator-community.org/t/conduit-api-to-set-branch-of-a-differential/2521.
Talking about creatediff, can it be used instead of createrawdiff? It it's possible can you paste the changes you did your fork, maybe we need the exact same changes.

Mar 19 2019, 8:22 AM

Mar 16 2019

Kwan closed D6114: py3: add test-phabricator.py to python3-whitelist.
Mar 16 2019, 9:39 PM
Kwan committed rHG7c86caee3323: py3: add test-phabricator.py to python3-whitelist.
py3: add test-phabricator.py to python3-whitelist
Mar 16 2019, 9:39 PM
Kwan committed rHG51ba9fbcca52: py3: use pycompat.byteskwargs on opts in phabricator.py.
py3: use pycompat.byteskwargs on opts in phabricator.py
Mar 16 2019, 9:39 PM
Kwan closed D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit.
Mar 16 2019, 9:39 PM
Kwan committed rHG99e00e5c4746: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit.
py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit
Mar 16 2019, 9:39 PM
Kwan closed D6107: py3: use pycompat.byteskwargs on opts in phabricator.py.
Mar 16 2019, 9:39 PM
Kwan updated the diff for D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit.

Make compatible with Py3.5, separate comments about json functions so they are more readable.

Mar 16 2019, 7:54 AM
Kwan updated the diff for D6107: py3: use pycompat.byteskwargs on opts in phabricator.py.

Switch to using pycompat.byteskwargs.

Mar 16 2019, 7:52 AM

Mar 15 2019

Kwan closed D6103: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile.
Mar 15 2019, 10:40 PM
Kwan committed rHGe7b84ffb06d9: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring.
py3: use pycompat.iterbytestr to convert memoryview slice to bytestring
Mar 15 2019, 10:40 PM

Mar 14 2019

Kwan added a comment to D6103: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile.
In D6103#88988, @yuja wrote:

Queued most of the patches in this series, thanks.

-        symbol = b''.join(itertools.takewhile(lambda ch: ch not in special,
-                                              view[pos:]))
+        symbol = b''.join(pycompat.iterbytestr(itertools.takewhile(
+            lambda ch: ch not in special,
+            view[pos:]

It's probably better to apply iterbytestr() to view[pos:] so ch is
always a byte string.

Mar 14 2019, 11:41 AM
Kwan updated the diff for D6103: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile.
Mar 14 2019, 11:40 AM
Kwan added a comment to D6107: py3: use pycompat.byteskwargs on opts in phabricator.py.
In D6107#88990, @yuja wrote:

pycompat.byteskwargs() can be used instead.

Mar 14 2019, 11:40 AM
Kwan added a comment to D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit.
In D6113#88992, @yuja wrote:
-    params = json.loads(ui.fin.read())
-    result = callconduit(repo, name, params)
-    s = json.dumps(result, sort_keys=True, indent=2, separators=(b',', b': '))
-    ui.write(b'%s\n' % s)
+    # json.(load|dump)s only returns/accepts unicode strings
+    params = pycompat.rapply(lambda x:
+        encoding.unitolocal(x) if isinstance(x, pycompat.unicode) else x,
+        json.loads(ui.fin.read())
+    )

Perhaps, the input data has to be converted to unicode. IIRC old Python 3
versions don't accept bytes.

Ah, yeah you're right, it only started accepting bytes in 3.6.

In D6113#88992, @yuja wrote:
+    result = pycompat.rapply(lambda x:
+        encoding.unifromlocal(x) if isinstance(x, bytes) else x,
+        callconduit(repo, name, params)
+    )
+    s = json.dumps(result, sort_keys=True, indent=2, separators=(u',', u': '))
+    ui.write(b'%s\n' % encoding.unitolocal(s))

Maybe we can use templatefilters.json() to dump internal (i.e. no unicode)
dict.

Ah, we can indeed (thanks for the pointer), with one caveat: the formatting.
The existing output is nicely formatted for human readability, with each entry on a new line and indented appropriately. templatefilters.json() isn't capable of that.
Do we mind losing that? It's also tested for in test-phabricator.t. Compare before:

{
  "cursor": {
    "after": null,
    "before": null,
    "limit": 100,
    "order": null
  },
  "data": [],
  "maps": {},
  "query": {
    "queryKey": null
  }
}

After:

{"cursor": {"after": null, "before": null, "limit": 100, "order": null}, "data": [], "maps": {}, "query": {"queryKey": null}}
Mar 14 2019, 11:18 AM

Mar 9 2019

Kwan committed rHG16d050678047: py3: use r'' for group name arguments to MatchObjects in phabricator.py.
py3: use r'' for group name arguments to MatchObjects in phabricator.py
Mar 9 2019, 8:50 PM
Kwan committed rHG634b56b54e7c: py3: use %d instead of %s when formatting an int into a byte string.
py3: use %d instead of %s when formatting an int into a byte string
Mar 9 2019, 8:50 PM
Kwan committed rHG2b21c7fbb3a1: py3: use % instead of .format() on a bytestring.
py3: use % instead of .format() on a bytestring
Mar 9 2019, 8:50 PM
Kwan closed D6112: py3: use % instead of .format() on a bytestring.
Mar 9 2019, 8:50 PM
Kwan closed D6110: py3: use %d instead of %s when formatting an int into a byte string.
Mar 9 2019, 8:50 PM
Kwan closed D6111: py3: use r'' for group name arguments to MatchObjects in phabricator.py.
Mar 9 2019, 8:50 PM
Kwan closed D6044: phabricator: convert conduit response JSON unicode to bytes inside callconduit.
Mar 9 2019, 8:50 PM
Kwan committed rHG8fd19a7b4ed6: py3: only pass unicode to json.dumps in writediffproperties.
py3: only pass unicode to json.dumps in writediffproperties
Mar 9 2019, 8:50 PM
Kwan committed rHGa98dabdb5a7b: py3: convert URL to str before passing it to request.
py3: convert URL to str before passing it to request
Mar 9 2019, 8:50 PM
Kwan committed rHG59bae59b7498: py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py.
py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py
Mar 9 2019, 8:50 PM
Kwan closed D6109: py3: only pass unicode to json.dumps in writediffproperties.
Mar 9 2019, 8:50 PM
Kwan closed D6108: py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py.
Mar 9 2019, 8:50 PM
Kwan closed D6106: py3: convert URL to str before passing it to request.
Mar 9 2019, 8:50 PM
Kwan closed D6105: py3: convert indexes into bytes when enumerating lists in urlencodenested.
Mar 9 2019, 8:50 PM
Kwan closed D6104: py3: don't try and format a bare dict into a byte string in callconduit.
Mar 9 2019, 8:50 PM
Kwan committed rHG47125193bad0: py3: convert indexes into bytes when enumerating lists in urlencodenested.
py3: convert indexes into bytes when enumerating lists in urlencodenested
Mar 9 2019, 8:50 PM
Kwan committed rHG9a8c7c17d816: py3: don't try and format a bare dict into a byte string in callconduit.
py3: don't try and format a bare dict into a byte string in callconduit
Mar 9 2019, 8:50 PM