Feed Advanced Search

Sun, May 12

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

Sat, May 11

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

Fri, May 10

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

Switch to comparing sets.

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

Mon, May 6

Kwan created D6347: phabricator: add custom vcr matcher to match request bodies.
Mon, May 6, 2:17 PM
Kwan added a dependent revision for D6302: phabricator: include branch in the phabread output: D6347: phabricator: add custom vcr matcher to match request bodies.
Mon, May 6, 2:17 PM
Kwan closed D6302: phabricator: include branch in the phabread output.
Mon, May 6, 12:22 PM
Kwan closed D6301: phabricator: fallback to reading metadata from diff for phabread.
Mon, May 6, 12:22 PM
Kwan committed rHG231334c1ee96: phabricator: include branch in the phabread output.
phabricator: include branch in the phabread output
Mon, May 6, 12:22 PM
Kwan committed rHGa4f7dceb07bf: phabricator: fallback to reading metadata from diff for phabread.
phabricator: fallback to reading metadata from diff for phabread
Mon, May 6, 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
Mon, May 6, 12:22 PM
Kwan closed D6298: phabricator: include commit (node) and parent in the local:commits metadata.
Mon, May 6, 12:22 PM

Thu, Apr 25

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

Mon, Apr 22

Kwan closed D6295: phabricator: use templatefilters.json in writediffproperties.
Mon, Apr 22, 2:24 PM
Kwan closed D6296: phabricator: set local:commits time metadata as an int, not a string.
Mon, Apr 22, 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
Mon, Apr 22, 2:24 PM
Kwan committed rHG289d82a070e9: phabricator: use templatefilters.json in writediffproperties.
phabricator: use templatefilters.json in writediffproperties
Mon, Apr 22, 2:24 PM
Kwan added inline comments to D6301: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 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?

Mon, Apr 22, 2:03 PM
Kwan updated the diff for D6302: phabricator: include branch in the phabread output.
Mon, Apr 22, 1:57 PM
Kwan updated the diff for D6301: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 1:57 PM
Kwan abandoned D6304: phabricator: include branch in the phabread output.
Mon, Apr 22, 1:54 PM
Kwan abandoned D6303: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 1:54 PM
Kwan created D6303: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 1:53 PM
Kwan created D6304: phabricator: include branch in the phabread output.
Mon, Apr 22, 1:53 PM
Kwan added a dependent revision for D6303: phabricator: fallback to reading metadata from diff for phabread: D6304: phabricator: include branch in the phabread output.
Mon, Apr 22, 1:53 PM
Kwan created D6302: phabricator: include branch in the phabread output.
Mon, Apr 22, 1:31 PM
Kwan updated the diff for D6301: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 1:31 PM
Kwan added a dependent revision for D6301: phabricator: fallback to reading metadata from diff for phabread: D6302: phabricator: include branch in the phabread output.
Mon, Apr 22, 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.
Mon, Apr 22, 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.
Mon, Apr 22, 1:31 PM
Kwan created D6301: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 11:53 AM
Kwan added a dependent revision for D6300: phabricator: read more metadata from local:commits: D6301: phabricator: fallback to reading metadata from diff for phabread.
Mon, Apr 22, 11:53 AM
Kwan created D6300: phabricator: read more metadata from local:commits.
Mon, Apr 22, 11:53 AM
Kwan created D6299: phabricator: don't assume the existence of properties of local:commits.
Mon, Apr 22, 11:52 AM
Kwan added a dependent revision for D6298: phabricator: include commit (node) and parent in the local:commits metadata: D6299: phabricator: don't assume the existence of properties of local:commits.
Mon, Apr 22, 11:52 AM
Kwan created D6298: phabricator: include commit (node) and parent in the local:commits metadata.
Mon, Apr 22, 11:52 AM
Kwan created D6297: phabricator: include branch in the diffproperty metadata.
Mon, Apr 22, 11:52 AM
Kwan added a dependent revision for D6296: phabricator: set local:commits time metadata as an int, not a string: D6297: phabricator: include branch in the diffproperty metadata.
Mon, Apr 22, 11:52 AM
Kwan created D6296: phabricator: set local:commits time metadata as an int, not a string.
Mon, Apr 22, 11:52 AM
Kwan added a dependent revision for D6295: phabricator: use templatefilters.json in writediffproperties: D6296: phabricator: set local:commits time metadata as an int, not a string.
Mon, Apr 22, 11:52 AM
Kwan created D6295: phabricator: use templatefilters.json in writediffproperties.
Mon, Apr 22, 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
Kwan closed D6102: py3: use fsencode for the vcr recording paths and strings for the custom_patches arguments.
Mar 9 2019, 8:50 PM
Kwan committed rHG2bad8f92cebf: py3: use fsencode for vcr recording paths and strings for custom_patches args.
py3: use fsencode for vcr recording paths and strings for custom_patches args
Mar 9 2019, 8:50 PM
Kwan committed rHGc340a8ac7ef3: phabricator: convert conduit response JSON unicode to bytes inside callconduit.
phabricator: convert conduit response JSON unicode to bytes inside callconduit
Mar 9 2019, 8:50 PM
Kwan added a comment to D6082: phabricator: add a `--branch` flag to `hg phabsend`.
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.

Mar 9 2019, 11:48 AM

Mar 8 2019

Kwan created D6114: py3: add test-phabricator.py to python3-whitelist.
Mar 8 2019, 10:01 PM
Kwan created D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit.
Mar 8 2019, 10:01 PM
Kwan added a dependent revision for D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit: D6114: py3: add test-phabricator.py to python3-whitelist.
Mar 8 2019, 10:01 PM
Kwan added a dependent revision for D6112: py3: use % instead of .format() on a bytestring: D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit.
Mar 8 2019, 10:01 PM
Kwan created D6112: py3: use % instead of .format() on a bytestring.
Mar 8 2019, 10:01 PM
Kwan added a dependent revision for D6111: py3: use r'' for group name arguments to MatchObjects in phabricator.py: D6112: py3: use % instead of .format() on a bytestring.
Mar 8 2019, 10:01 PM
Kwan created D6111: py3: use r'' for group name arguments to MatchObjects in phabricator.py.
Mar 8 2019, 10:01 PM
Kwan created D6110: py3: use %d instead of %s when formatting an int into a byte string.
Mar 8 2019, 10:01 PM
Kwan created D6109: py3: only pass unicode to json.dumps in writediffproperties.
Mar 8 2019, 10:01 PM
Kwan added a dependent revision for D6109: py3: only pass unicode to json.dumps in writediffproperties: D6110: py3: use %d instead of %s when formatting an int into a byte string.
Mar 8 2019, 10:01 PM
Kwan added a dependent revision for D6108: py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py: D6109: py3: only pass unicode to json.dumps in writediffproperties.
Mar 8 2019, 10:01 PM
Kwan created D6108: py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py.
Mar 8 2019, 10:01 PM
Kwan created D6107: py3: use pycompat.byteskwargs on opts in phabricator.py.
Mar 8 2019, 10:01 PM