D6044: phabricator: convert conduit response JSON unicode to bytes inside callconduit

2019-03-02 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously the byte conversion was happening piecemeal in callers, and in the case of createdifferentialrevision not at all, leading to UnicodeEncodeErrors when

D6044: phabricator: convert conduit response JSON unicode to bytes inside callconduit

2019-03-02 Thread Kwan (Ian Moody)
Kwan added a comment. Apologies for the lack of a test, but I can't seem to write one that works. Either the test harness isn't capable of tests with unicode in them, or I don't know how to represent it in the test files in such a way that works. REPOSITORY rHG Mercurial REVISION DETAIL

D6054: create alpha for phabricator test €

2019-03-02 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14304. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6054?vs=14303=14304 REVISION DETAIL https://phab.mercurial-scm.org/D6054 AFFECTED FILES alpha CHANGE DETAILS diff --git a/alpha b/alpha new file mode 100644

D6054: create alpha for phabricator test €

2019-03-02 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6054 AFFECTED FILES alpha CHANGE DETAILS diff --git a/alpha b/alpha new file mode 100644 --- /dev/null

D6055: create beta for phabricator test

2019-03-02 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6055 AFFECTED FILES beta CHANGE DETAILS diff --git a/beta b/beta new file mode 100644 --- /dev/null +++

D6044: phabricator: convert conduit response JSON unicode to bytes inside callconduit

2019-03-02 Thread Kwan (Ian Moody)
Kwan added a comment. Okay, making progress on the test now, just need to figure out how to update the vcr files cleanly. Slightly complicated by the fact that there was a small error in the original creation of the phabsend-update-alpha-create-beta.json recording. It must have been made

D6044: phabricator: convert conduit response JSON unicode to bytes inside callconduit

2019-03-04 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/D6044#88262, @yuja wrote: > > - parsed = json.loads(body) +parsed = pycompat.rapply(lambda x: encoding.unitolocal(x) + if isinstance(x, unicode) else x, json.loads(body)) > >

D6075: [RFC] transplant: append log to commit message before running filter

2019-03-06 Thread Kwan (Ian Moody)
Kwan abandoned this revision. Kwan added a comment. Urgh, never mind, just realised I missed the existence of HGREVISION in the documentation. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6075 To: Kwan, #hg-reviewers Cc: mercurial-devel

D6075: [RFC] transplant: append log to commit message before running filter

2019-03-05 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Currently if a user wants to alter the "(transplanted from )" line in the commit message, for instance by prepending a repo URL to the hash, they have to do so

D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit

2019-03-16 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14523. Kwan added a comment. Make compatible with Py3.5, separate comments about json functions so they are more readable. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6113?vs=14426=14523 REVISION DETAIL

D6107: py3: use pycompat.byteskwargs on opts in phabricator.py

2019-03-16 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14522. Kwan retitled this revision from "py3: use r'' instead of b'' in opts.get() in phabricator.py" to "py3: use pycompat.byteskwargs on opts in phabricator.py". Kwan added a comment. Switch to using pycompat.byteskwargs. REPOSITORY rHG Mercurial

D6114: py3: add test-phabricator.py to python3-whitelist

2019-03-16 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG7c86caee3323: py3: add test-phabricator.py to python3-whitelist (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit

2019-03-16 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG99e00e5c4746: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6107: py3: use pycompat.byteskwargs on opts in phabricator.py

2019-03-16 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG51ba9fbcca52: py3: use pycompat.byteskwargs on opts in phabricator.py (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6103: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile

2019-03-14 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/D6103#88988, @yuja wrote: > Queued most of the patches in this series, thanks. > > > -symbol = b''.join(itertools.takewhile(lambda ch: ch not in special, > > -

D6107: py3: use r'' instead of b'' in opts.get() in phabricator.py

2019-03-14 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/D6107#88990, @yuja wrote: > `pycompat.byteskwargs()` can be used instead. I was under the impression that that was more of a hack, mainly useful for when there are lots of existing `opts.get(b'')` uses in a file, and when

D6103: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile

2019-03-14 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14494. Kwan retitled this revision from "py3: use pycompat.iterbytestr to convert itertools.takewhile result back to bytes" to "py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile". Kwan edited the

D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit

2019-03-14 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/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': ')) > > -

D6114: py3: add test-phabricator.py to python3-whitelist

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a reviewer: pulkit. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6114 AFFECTED FILES contrib/python3-whitelist CHANGE DETAILS diff

D6104: py3: don't try and format a bare dict into a byte string in callconduit

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6104 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6112: py3: use % instead of .format() on a bytestring

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6112 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6110: py3: use %d instead of %s when formatting an int into a byte string

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6110 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6109: py3: only pass unicode to json.dumps in writediffproperties

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6109 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6113: py3: convert to/from bytes/unicode for json.(dump|load)s in debugcallconduit

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6113 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6103: py3: use pycompat.iterbytestr to convert itertools.takewhile result back to bytes

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY itertools.takewhile on a bytestring returns the bytes as ints in py3, use iterbytestr to get the individual characters as bytestring like in py2. REPOSITORY rHG

D6102: py3: use fsencode for the vcr recording paths and strings for the custom_patches arguments

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This fixes phabricator.py's vcrcommand under py3 REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6102 AFFECTED FILES

D6111: py3: use r'' for group name arguments to MatchObjects in phabricator.py

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY MatchObject group names are strings, not bytes. Using bytes in py3 leads to an IndexError. REPOSITORY rHG Mercurial REVISION DETAIL

D6105: py3: convert indexes into bytes when enumerating lists in urlencodenested

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise it'll try to insert them them into a %s slot in a b'' later and fail. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6105

D6107: py3: use r'' instead of b'' in opts.get() in phabricator.py

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6107 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6108: py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6108 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6106: py3: convert URL to str before passing it to request

2019-03-08 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6106 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6082: phabricator: add a `--branch` flag to `hg phabsend`

2019-03-09 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/D6082#88852, @mharbison72 wrote: > In https://phab.mercurial-scm.org/D6082#88851, @pulkit wrote: > > > @mharbison72 thanks for tips on adding test. Will add tests in next iteration. > > > > I found that Differentials do have

D6082: phabricator: add a `--branch` flag to `hg phabsend`

2019-03-19 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/D6082#89656, @pulkit wrote: > In https://phab.mercurial-scm.org/D6082#88981, @Kwan wrote: > > > In https://phab.mercurial-scm.org/D6082#88852, @mharbison72 wrote: > > > > > In https://phab.mercurial-scm.org/D6082#88851,

D6103: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring before passing to itertools.takewhile

2019-03-15 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGe7b84ffb06d9: py3: use pycompat.iterbytestr to convert memoryview slice to bytestring (authored by Kwan, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D6103?vs=14494=14511#toc

D6111: py3: use r'' for group name arguments to MatchObjects in phabricator.py

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG16d050678047: py3: use r for group name arguments to MatchObjects in phabricator.py (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6105: py3: convert indexes into bytes when enumerating lists in urlencodenested

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG47125193bad0: py3: convert indexes into bytes when enumerating lists in urlencodenested (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6104: py3: don't try and format a bare dict into a byte string in callconduit

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9a8c7c17d816: py3: dont try and format a bare dict into a byte string in callconduit (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6110: py3: use %d instead of %s when formatting an int into a byte string

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG634b56b54e7c: py3: use %d instead of %s when formatting an int into a byte string (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6106: py3: convert URL to str before passing it to request

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa98dabdb5a7b: py3: convert URL to str before passing it to request (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6108: py3: fix a few "dict keys as str instead of bytes" issues in phabricator.py

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG59bae59b7498: py3: fix a few dict keys as str instead of bytes issues in phabricator.py (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6102: py3: use fsencode for the vcr recording paths and strings for the custom_patches arguments

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2bad8f92cebf: py3: use fsencode for vcr recording paths and strings for custom_patches args (authored by Kwan, committed by ). CHANGED PRIOR TO COMMIT

D6109: py3: only pass unicode to json.dumps in writediffproperties

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8fd19a7b4ed6: py3: only pass unicode to json.dumps in writediffproperties (authored by Kwan, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D6109?vs=14422=14434#toc REPOSITORY

D6112: py3: use % instead of .format() on a bytestring

2019-03-09 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG2b21c7fbb3a1: py3: use % instead of .format() on a bytestring (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6496: phabricator: add commenting to phabsend for new/updated Diffs

2019-06-07 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 15374. Kwan added a comment. Doctor repo name in the recordings that I'd missed before REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6496?vs=15373=15374 BRANCH default REVISION DETAIL

D6496: phabricator: add commenting to phabsend for new/updated Diffs

2019-06-07 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added a comment. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. 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:

D6496: phabricator: add commenting to phabsend for new/updated Diffs

2019-06-08 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG29528c4235a1: phabricator: add commenting to phabsend for new/updated Diffs (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6513: phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings

2019-06-11 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Currently when making VCR recordings one needs to manually sanitise sensitive credentials before committing and submitting them as part of tests. It is easy to

D6512: phabricator: add a --blocker argument to phabsend to specify blocking reviewers

2019-06-11 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added reviewers: durin42, mharbison72. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The way to signal to Conduit that a reviewer is considered blocking is just to wrap their PHID in "blocking()" when

D6512: phabricator: add --blocker argument to phabsend to specify blocking reviewers

2019-06-12 Thread Kwan (Ian Moody)
Closed by commit rHGf33d3ee110da: phabricator: add --blocker argument to phabsend to specify blocking reviewers (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review".

D6514: phabricator: use parents.set to always set dependencies

2019-06-12 Thread Kwan (Ian Moody)
Closed by commit rHGc19d259fd6ad: phabricator: use parents.set to always set dependencies (authored by Kwan). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6514?vs=15452=15459

D6513: phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings

2019-06-12 Thread Kwan (Ian Moody)
Closed by commit rHGd3c81439e2ee: phabricator: auto-sanitise API tokens and HTTP cookies from VCR recordings (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY

D6514: phabricator: use parents.set to always set dependencies

2019-06-12 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added a reviewer: durin42. Kwan added a comment. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. Is it worth adding a test using histedit, or is the use in existing tests enough? REVISION SUMMARY Now that Mercurial's

D6553: shelve: move shelve extension to core

2019-06-23 Thread Kwan (Ian Moody)
Kwan added a comment. You should probably run `hg mv -A hgext/shelve.py mercurial/shelve.py` and amend and re-send to preserve history. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6553/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6553

D5299: phabricator: fallback reading arcanist config files

2019-05-11 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > Kwan wrote in phabricator.py:201 > I think you could do > > url = util.url(conduit_uri) > url.path = None > url = b'%s' % url > > Also I think you need to check for `phabricator.uri` first, then fall back to > `conduit_uri`, see change to

D5299: phabricator: fallback reading arcanist config files

2019-05-12 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > philpep wrote in phabricator.py:175 > I'd be nice to cache the result of `readarcconfig` but I don't known how to > implement this, any suggestion ? Looks like annotating it with `@util.cachefunc` is enough? > Kwan wrote in phabricator.py:217-222

D6347: phabricator: add custom vcr matcher to match request bodies

2019-05-10 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > martinvonz wrote in phabricator.py:135-144 > Can this be written simply `return set(r1params) == set(r2params)`? Ha! Yes, of course it can. Sorry, I keep forgetting one can do that. REPOSITORY rHG Mercurial REVISION DETAIL

D5299: phabricator: fallback reading arcanist config files

2019-04-19 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > philpep wrote in phabricator.py:201 > HINT: This doesn't work for current mercurial config because "arc > install-certificates" add a trailing "/" to conduit_uri and our .arcconfig > doesn't have this trailing slash. > Any idea how to handle this

D6298: phabricator: include commit (node) and parent in the local:commits metadata

2019-05-06 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG9421d7e12888: phabricator: include commit (node) and parent in the local:commits metadata (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6301: phabricator: fallback to reading metadata from diff for phabread

2019-05-06 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGa4f7dceb07bf: phabricator: fallback to reading metadata from diff for phabread (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6302: phabricator: include branch in the phabread output

2019-05-06 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG231334c1ee96: phabricator: include branch in the phabread output (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6298: phabricator: include commit (node) and parent in the local:commits metadata

2019-04-25 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > indygreg wrote in phabricator.py:403 > What about p2? I left it out since the "hg:meta" code only writes p1 (` b'parent': ctx.p1().hex(),`) and `getdiffmeta` doesn't read p2 from either "hg:meta" or "local:commits": if

D6297: phabricator: include branch in the diffproperty metadata

2019-04-25 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGd49ab47be8a6: phabricator: include branch in the diffproperty metadata (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6300: phabricator: read more metadata from local:commits

2019-04-25 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc4d96f4761d3: phabricator: read more metadata from local:commits (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6299: phabricator: don't assume the existence of properties of local:commits

2019-04-25 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG6dd454e5b123: phabricator: dont assume the existence of properties of local:commits (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6302: phabricator: include branch in the phabread output

2019-04-22 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14895. Kwan edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6302?vs=14891=14895 BRANCH diffmeta (bookmark) on default (branch) REVISION DETAIL https://phab.mercurial-scm.org/D6302

D6297: phabricator: include branch in the diffproperty metadata

2019-04-22 Thread Kwan (Ian Moody)
Kwan added a comment. In https://phab.mercurial-scm.org/D6297#91618, @pulkit wrote: > wow, does it work? For future posterity, since I already replied to pulkit on IRC, this won't make Phab display the branch in the web UI anywhere (still need to use creatediff API for that),

D6301: phabricator: fallback to reading metadata from diff for phabread

2019-04-22 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > phabricator.py:926 > +meta = {} > +if b'date' not in meta and b'dateCreated' in diff: > +meta[b'date'] = b'%s 0' % diff[b'dateCreated'] I didn't use `get` here because "dateCreated" is set by conduit, not the submitted data,

D6296: phabricator: set local:commits time metadata as an int, not a string

2019-04-22 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGc0e30c9ee5ba: phabricator: set local:commits time metadata as an int, not a string (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6295: phabricator: use templatefilters.json in writediffproperties

2019-04-22 Thread Kwan (Ian Moody)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG289d82a070e9: phabricator: use templatefilters.json in writediffproperties (authored by Kwan, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D6301: phabricator: fallback to reading metadata from diff for phabread

2019-04-22 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14890. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6301?vs=14889=14890 REVISION DETAIL https://phab.mercurial-scm.org/D6301 AFFECTED FILES hgext/phabricator.py tests/test-phabricator.t CHANGE DETAILS diff

D6302: phabricator: include branch in the phabread output

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6302 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git a/hgext/phabricator.py

D6304: phabricator: include branch in the phabread output

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH diffmeta (bookmark) on default (branch) REVISION DETAIL https://phab.mercurial-scm.org/D6304 AFFECTED FILES hgext/phabricator.py CHANGE

D6303: phabricator: fallback to reading metadata from diff for phabread

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The metadata in properties can be incomplete or missing entirely, in which case we can fallback to retrieving some from the diff itself. REPOSITORY rHG Mercurial

D6301: phabricator: fallback to reading metadata from diff for phabread

2019-04-22 Thread Kwan (Ian Moody)
Kwan updated this revision to Diff 14894. Kwan edited the summary of this revision. Kwan edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6301?vs=14890=14894 BRANCH default REVISION DETAIL

D6299: phabricator: don't assume the existence of properties of local:commits

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Not all the properties are guaranteed to be there, so if we don't check first we could die with a KeyError. REPOSITORY rHG Mercurial BRANCH default REVISION

D6300: phabricator: read more metadata from local:commits

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY local:commits metadata can contain branch info, and 'rev' has been superseded by 'commit', see:

D6301: phabricator: fallback to reading metadata from diff for phabread

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The metadata in properties can be incomplete or missing entirely, in which case we can fallback to retrieving some from the diff itself. REPOSITORY rHG Mercurial

D6295: phabricator: use templatefilters.json instead of json.dumps in writediffproperties

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Makes the code simpler and more readable. This would have been the better option for https://phab.mercurial-scm.org/rHG8fd19a7b4ed69583d90d0f9af98c791d111d1367 but

D6296: phabricator: set local:commits time metadata as an int, not a string, same as arcanist does

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D6296 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git

D6297: phabricator: include branch in the diffproperty metadata

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D6297 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git

D6298: phabricator: include commit (node) and parent in the local:commits metadata

2019-04-22 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D6298 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS diff --git

D6835: phabricator: don't abort if property writing fails during amending

2019-09-09 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Currently if one of the writediffproperty calls fails due to network issues during the amending of commit messages to include the Diff. Rev. line, the transaction

D6835: phabricator: don't abort if property writing fails during amending

2019-09-09 Thread Kwan (Ian Moody)
Closed by commit rHG0a7e60f50dd4: phabricator: dont abort if property writing fails during amending (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG

D6863: py3: byte-prefix sanitisation regexes in phabricator.py

2019-09-17 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY So it doesn't die with "TypeError: cannot use a string pattern on a bytes-like object". REPOSITORY rHG Mercurial REVISION DETAIL

D6868: py3: add test demonstrating TypeError when phabsending skips unchanged commits

2019-09-17 Thread Kwan (Ian Moody)
Closed by commit rHG3355e0c2845f: py3: add test demonstrating TypeError when phabsending skips unchanged commits (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review".

D6869: py3: pass a bytestring into querydrev instead of a string that'll TypeError

2019-09-17 Thread Kwan (Ian Moody)
Closed by commit rHG6fb281f39c25: py3: pass a bytestring into querydrev instead of a string thatll TypeError (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY

D6869: py3: pass a bytestring into querydrev instead of a string that'll TypeError

2019-09-17 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added a comment. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. For stable REVISION SUMMARY This was a regression I introduced in c19d259fd6ad

D6868: py3: add test demonstrating TypeError when phabsending skips unchanged commits

2019-09-17 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added a comment. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. For stable REVISION SUMMARY Skipping can currently only happen with `--no-amend`, so this isn't a usual configuration. REPOSITORY rHG Mercurial

D6863: py3: byte-prefix sanitisation regexes in phabricator.py

2019-09-17 Thread Kwan (Ian Moody)
Closed by commit rHG04c6de38734d: py3: byte-prefix sanitisation regexes in phabricator.py (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial

D6650: phabricator: handle local:commits time being string or int

2019-07-16 Thread Kwan (Ian Moody)
Kwan created this revision. Kwan added a comment. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. I'm not sure if the test is actually needed, so feel free to drop it/ask me to. REVISION SUMMARY When setting local:commits arcanist has different behaviour

D6649: phabricator: demonstrate broken phabread on string local:commit times

2019-07-16 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6649 AFFECTED FILES tests/phabricator/phabread-str-time.json tests/test-phabricator.t CHANGE DETAILS

D6650: phabricator: handle local:commits time being string or int

2019-07-16 Thread Kwan (Ian Moody)
Kwan added inline comments. INLINE COMMENTS > phabricator.py:953 > if b'time' in commit: > -meta[b'date'] = b'%d 0' % commit[b'time'] > +meta[b'date'] = b'%d 0' % int(commit[b'time']) > if b'branch' in commit: I went for `int()` over

D6649: phabricator: demonstrate broken phabread on string local:commit times

2019-07-17 Thread Kwan (Ian Moody)
Closed by commit rHG29e80d957813: phabricator: demonstrate broken phabread on string local:commit times (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY

D6650: phabricator: handle local:commits time being string or int

2019-07-17 Thread Kwan (Ian Moody)
Closed by commit rHGc9be100eb7b6: phabricator: handle local:commits time being string or int (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". CHANGED PRIOR TO COMMIT

D7134: phabricator: use context manager form of progress in uploadchunks

2019-11-01 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan updated this revision to Diff 17494. Rebase onto stable REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7134?vs=17336=17494 BRANCH stable CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7134/new/ REVISION

D7215: py3: use %d to format an int

2019-11-02 Thread Kwan (Ian Moody)
Kwan created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Avoids a TypeError under py3. Fortunately this is very much an edge case since it requires the user to have deliberately created a local tag of the form 'D\d+'

D7215: py3: use %d to format an int

2019-11-04 Thread Kwan (Ian Moody)
Closed by commit rHG742065def6ca: py3: use %d to format an int (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE

D7061: convert: don't pass bytes to, or expect bytes from, emailparser

2019-11-04 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan abandoned this revision. Obsoleted by a better fix in cf3bf3b03445 . REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7061/new/ REVISION DETAIL

D7218: fsmonitor: use stringutil.forcebytestr() instead of str() on an exception

2019-11-04 Thread Kwan (Ian Moody)
Closed by commit rHG90fba2248693: fsmonitor: use stringutil.forcebytestr() instead of str() on an exception (authored by Kwan). This revision was automatically updated to reflect the committed changes. This revision was not accepted when it landed; it landed in state "Needs Review". REPOSITORY

D7219: hghave: decode black's version before passing to StrictVersion

2019-11-04 Thread Kwan (Ian Moody)
Kwan added a comment. Kwan abandoned this revision. Drop in favour of D7221 . REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7219/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7219 To: Kwan,

  1   2   >