Page MenuHomePhabricator
Feed All Stories

Fri, Sep 24

cspeckmim planned changes to D21724: Update Mercurial's cascading of commit sets to rebase non-landed commits.

Marking Plan Changes until I test this out in Git

Fri, Sep 24, 4:05 PM

Thu, Sep 23

cspeckmim updated the diff for D21724: Update Mercurial's cascading of commit sets to rebase non-landed commits.

Remove the $obsolete_map and $rebasedActiveCommit and just use $rebasedCommitMap

Thu, Sep 23, 3:39 AM
cspeckmim planned changes to D21724: Update Mercurial's cascading of commit sets to rebase non-landed commits.
Thu, Sep 23, 3:23 AM
cspeckmim requested review of D21724: Update Mercurial's cascading of commit sets to rebase non-landed commits.
Thu, Sep 23, 3:09 AM
cspeckmim added a revision to T13668: Landing a string of dependent revisions which contains branched commits will result in stripping/pruning those branched commits: D21724: Update Mercurial's cascading of commit sets to rebase non-landed commits.
Thu, Sep 23, 3:09 AM · Mercurial, Arcanist

Wed, Sep 22

cspeckmim updated the task description for T13668: Landing a string of dependent revisions which contains branched commits will result in stripping/pruning those branched commits.
Wed, Sep 22, 2:10 AM · Mercurial, Arcanist
cspeckmim created T13668: Landing a string of dependent revisions which contains branched commits will result in stripping/pruning those branched commits.
Wed, Sep 22, 2:06 AM · Mercurial, Arcanist

Sat, Sep 18

cspeckmim added a comment to D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.

The second baby has arrived

aw smile.png (100×100 px, 6 KB)
dancing duck.gif (280×498 px, 2 MB)

Sat, Sep 18, 2:02 AM

Fri, Sep 17

epriestley added a comment to D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.

The second baby has arrived so I have about 17 seconds per day to look at my computer nowadays, but I think it would also be reasonable to backfill str_starts_with() if you run into more of this -- the strncmp() syntax has always felt pretty hard to read to me. You can do that in PHP like this:

Fri, Sep 17, 1:02 PM
cspeckmim closed D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.
Fri, Sep 17, 3:03 AM
cspeckmim committed rARCa028291f8e5e: Make corrections to the "arc amend" workflow in Mercurial repositories to be… (authored by cspeckmim).
Make corrections to the "arc amend" workflow in Mercurial repositories to be…
Fri, Sep 17, 3:03 AM
cspeckmim retitled D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+ from Make corrections to the "arc amend" workflow used with Mercurial repositories to Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.
Fri, Sep 17, 3:02 AM
cspeckmim updated the summary of D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.
Fri, Sep 17, 3:01 AM
epriestley accepted D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.
Fri, Sep 17, 2:20 AM

Thu, Sep 16

cspeckmim updated the diff for D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.

Switch to using strncmp()

Thu, Sep 16, 6:57 PM
cspeckmim requested review of D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.
Thu, Sep 16, 6:55 PM
cspeckmim added a revision to T13665: The "arc amend" workflow does not work on Mercurial repositories: D21723: Make corrections to the "arc amend" workflow in Mercurial repositories to be compatible with PHP 5+.
Thu, Sep 16, 6:54 PM · Mercurial, Arcanist
cspeckmim added inline comments to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.
Thu, Sep 16, 6:35 PM

Tue, Sep 14

cspeckmim updated the task description for T13667: Landing a mercurial revision which has no changes causes errors on the revision page as well as history viewing.
Tue, Sep 14, 9:59 PM · Arcanist, Mercurial
cspeckmim updated the task description for T13667: Landing a mercurial revision which has no changes causes errors on the revision page as well as history viewing.
Tue, Sep 14, 9:55 PM · Arcanist, Mercurial
cspeckmim created T13667: Landing a mercurial revision which has no changes causes errors on the revision page as well as history viewing.
Tue, Sep 14, 9:49 PM · Arcanist, Mercurial

Mon, Sep 13

epriestley added inline comments to D21680: An assortment of fixes and updates to using arc-land with mercurial.
Mon, Sep 13, 9:28 PM
cspeckmim added inline comments to D21680: An assortment of fixes and updates to using arc-land with mercurial.
Mon, Sep 13, 5:58 PM

Tue, Sep 7

cspeckmim retitled D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling from Update "arc liberate" to fix error with PHP 8 and add "--verbose" argument to adjust it to Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Tue, Sep 7, 6:02 PM

Sun, Sep 5

cspeckmim closed T13665: The "arc amend" workflow does not work on Mercurial repositories as Resolved by committing rARCd246a0656259: Update ArcanistMercurialAPI to support getting the current commit ref.
Sun, Sep 5, 7:25 PM · Mercurial, Arcanist
cspeckmim closed D21716: Update ArcanistMercurialAPI to support getting the current commit ref.
Sun, Sep 5, 7:25 PM
cspeckmim committed rARCd246a0656259: Update ArcanistMercurialAPI to support getting the current commit ref (authored by cspeckmim).
Update ArcanistMercurialAPI to support getting the current commit ref
Sun, Sep 5, 7:25 PM
cspeckmim added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

I played around with this some more and this feels pretty solid for resolving most common symbols. I'll poke around some of the mercurial source a bit later this week and see if I can find an easy way for resolving revset/symbols easily though a custom extension.

Sun, Sep 5, 6:01 PM
cspeckmim updated the diff for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Don't bother trying to lookup bookmark/tag names when the symbol is a number as Mercurial disallows this. Also fix the revision number mapping which somehow worked? But still does now...

Sun, Sep 5, 5:48 PM
cspeckmim updated the test plan for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.
Sun, Sep 5, 5:34 PM
cspeckmim updated the diff for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Fix not being able to lookup commit by symbol 0

Sun, Sep 5, 5:33 PM
cspeckmim updated the diff for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Include support for revision number and hash-prefix symbols

Sun, Sep 5, 5:16 PM
cspeckmim added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

The "symbol" here could, in the absolute-most-general case, be a short commit hash (abcd1234) or symbolic commit (tip^^^) -- not just a bookmark or tag name -- so I think this trick (though quite clever) may run into trouble some day.

Oh yea... hmm I think it's possible to include support for commit hashes (or prefixes) as well as revision ID -- I'll try out a change real quick to see if it's simple to include support for those symbols at least. Any relativity modifiers ^^ I think are effectively impossible to handle without resorting to individual hg log commands or an extension

Sun, Sep 5, 4:36 PM
epriestley accepted D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

The "symbol" here could, in the absolute-most-general case, be a short commit hash (abcd1234) or symbolic commit (tip^^^) -- not just a bookmark or tag name -- so I think this trick (though quite clever) may run into trouble some day. This looks like a reasonable fix to the immediate issue, though, and we can cross this bridge if/when we come to it.

Sun, Sep 5, 3:29 PM
cspeckmim updated the diff for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

More-correct formatting for the revset

Sun, Sep 5, 7:10 AM
cspeckmim updated the diff for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Update the revsets used to work around potentially invalid symbols from preventing all symbols from resolving

Sun, Sep 5, 7:05 AM
cspeckmim added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Ooh actually it looks like this will work

$ hg log --revset "bookmark('re:^symbol$') or tag('re:^symbol$')"

Doing that doesn't fail if the symbol doesn't exist

Sun, Sep 5, 6:45 AM
cspeckmim added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Hmm could maybe do something like hg log --rev 'bookmark() or tag() or .' to just get every commit that has a potential symbol and then process those. It would end up getting more results than necessary in every case. The query runs relatively quickly (~230ms) on our ~128k commit repository but it only has ~550 tags which I'm guessing is low -- if we tagged every build we'd have ~15k.

Sun, Sep 5, 6:32 AM
cspeckmim added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Not yet handling the case where an invalid symbol results in failing to lookup any symbols

I didn't see any obvious way of doing this through revsets but I'll try some more experiments. An extension that adds a template keyword, or just a new command for this, might also be an option

Sun, Sep 5, 6:11 AM
cspeckmim updated the summary of D21716: Update ArcanistMercurialAPI to support getting the current commit ref.
Sun, Sep 5, 6:04 AM
cspeckmim planned changes to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Not yet handling the case where an invalid symbol results in failing to lookup any symbols

Sun, Sep 5, 6:01 AM
cspeckmim updated the diff for D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

Provide implementation of ArcanistMercurialCommitSymbolCommitHardpointQuery to enable hardpoint queries for commit symbols.

Sun, Sep 5, 6:00 AM
cspeckmim closed D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sun, Sep 5, 1:22 AM
cspeckmim committed rARCcd17e8441214: Update "arc liberate" to fix error with PHP 8 and add "--verbose" argument to… (authored by cspeckmim).
Update "arc liberate" to fix error with PHP 8 and add "--verbose" argument to…
Sun, Sep 5, 1:22 AM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

So that part is correct, but swapping the commit and branch was incidental, and I overlooked it because we usually get the same result: in common cases, this is moot because ancestors(<branch name>) is equivalent to ancestors(<heads of that branch>), and branch(<commit hash>) is equivalent to branch(<branch of that commit>). The latter is always equivalent; the former is equivalent when commit is the single head of branch, which it almost always is in regular use.

But this behavior (on this install) is unambiguously wrong:

Screen Shot 2021-09-04 at 5.28.41 PM.png (1×2 px, 407 KB)

...since b7be5c961297 (the parameter) is an ancestor of 162a9c1e8e44 (the first commit in the result set). I'll send you a diff.

Sun, Sep 5, 1:21 AM · Diffusion
epriestley committed rPb9ba0418ed13: Correct a parameter order swap in "diffusion.historyquery" for Mercurial (authored by epriestley).
Correct a parameter order swap in "diffusion.historyquery" for Mercurial
Sun, Sep 5, 1:16 AM
epriestley closed D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.
Sun, Sep 5, 1:16 AM
epriestley accepted D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sun, Sep 5, 1:16 AM
cspeckmim added a comment to D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.

Thanks for checking this out

Sun, Sep 5, 1:09 AM
cspeckmim accepted D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.
Sun, Sep 5, 1:09 AM
cspeckmim added a comment to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Err, I updated the error message after running those cases so it no longer says "Failed liberating:" but "Failed to update library:"

Sun, Sep 5, 1:08 AM
cspeckmim requested review of D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Sorry I made a side-stop checking out the error-handling behavior from ArcanistLiberateWorkflow - I made some updates so it can detect the failure to avoid indicating success.

Sun, Sep 5, 1:06 AM
cspeckmim updated the diff for D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Update error handling of ArcanistLiberateWorkflow to detect failure from running rebuild-map.php in a separate process.

Sun, Sep 5, 1:02 AM
epriestley requested review of D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.
Sun, Sep 5, 12:48 AM
epriestley added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21722: Correct a parameter order swap in "diffusion.historyquery" for Mercurial.
Sun, Sep 5, 12:47 AM · Diffusion
epriestley accepted D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Thanks!

Sun, Sep 5, 12:45 AM
cspeckmim updated the diff for D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Remove log() entirely, let filesystem errors escape outwardly.

Sun, Sep 5, 12:40 AM
epriestley added a comment to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

I think it's reasonable to remove the try/catch and just let the exception escape. It isn't consistent with the approach to error handling in the rest of the codebase, and I can't think of any valid reason to continue here after a write failure.

Sun, Sep 5, 12:38 AM
cspeckmim closed D21719: Fix searching legalpad documents by contributors.
Sun, Sep 5, 12:37 AM
cspeckmim committed rP3b2868e15553: Fix searching legalpad documents by contributors (authored by cspeckmim).
Fix searching legalpad documents by contributors
Sun, Sep 5, 12:37 AM
cspeckmim requested review of D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sun, Sep 5, 12:36 AM
cspeckmim updated the summary of D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sun, Sep 5, 12:36 AM
cspeckmim added inline comments to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.
Sun, Sep 5, 12:32 AM
epriestley added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

Good catch!

Sun, Sep 5, 12:30 AM · Diffusion
cspeckmim updated the diff for D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

Change approach - remove --verbose, remove --quiet, remove most instances of log() being used, keep the instance when an error is encountered.

Sun, Sep 5, 12:29 AM
epriestley accepted D21719: Fix searching legalpad documents by contributors.

Thanks!

Sun, Sep 5, 12:17 AM

Sat, Sep 4

cspeckmim closed T13634: Support marking commits as UNREACHABLE in Mercurial as Resolved.
Sat, Sep 4, 11:55 PM · Diffusion
cspeckmim retitled D21719: Fix searching legalpad documents by contributors from Fix typo in legalpad search engine to Fix searching legalpad documents by contributors.
Sat, Sep 4, 11:51 PM
cspeckmim published D21719: Fix searching legalpad documents by contributors for review.

I didn't make a task for this as it's a fairly small change and the reproduction/test case is also fairly simple.

Sat, Sep 4, 11:11 PM
cspeckmim committed rP09c3c7d87931: Add support to marking commits as UNREACHABLE for Mercurial (authored by cspeckmim).
Add support to marking commits as UNREACHABLE for Mercurial
Sat, Sep 4, 11:05 PM
cspeckmim closed D21715: Add support to marking commits as UNREACHABLE for Mercurial.
Sat, Sep 4, 11:05 PM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

One tangential thing I noticed from the error messages in these cases, in DiffusionHistoryQueryConduitAPIMethod the getMercurialResult() function executes this hg command

$path_args = array();
if (strlen($path)) {
  $path_args[] = $path;
  $revset_arg = hgsprintf(
    'reverse(ancestors(%s))',
    $commit_hash);
} else {
  $revset_arg = hgsprintf(
    'reverse(ancestors(%s)) and branch(%s)',
    $drequest->getBranch(),
    $commit_hash);
}
Sat, Sep 4, 11:03 PM · Diffusion
cspeckmim closed T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations as Resolved.
Sat, Sep 4, 10:51 PM · Diffusion
cspeckmim committed rP458ad4a8617a: Remove history query from DiffusionRepositoryController as it is unused (authored by cspeckmim).
Remove history query from DiffusionRepositoryController as it is unused
Sat, Sep 4, 10:51 PM
cspeckmim closed D21717: Remove history query from DiffusionRepositoryController as it is unused.
Sat, Sep 4, 10:50 PM
cspeckmim added a comment to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.

With just the updates to the future handling this is now the landing page I see with missing commits:

Screen Shot 2021-09-04 at 6.33.54 PM.png (948×3 px, 180 KB)

Sat, Sep 4, 10:50 PM · Diffusion
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

I tested this out and it works properly, in that there's no noticeable difference between the behavior with this change and without but including the new future updates

Sat, Sep 4, 10:48 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Sigh maybe update arcanist too. I ran arc lint before arc diff and it said no lints...

Sat, Sep 4, 10:47 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Try again but with arcanist on master

Sat, Sep 4, 10:44 PM
cspeckmim updated the diff for D21717: Remove history query from DiffusionRepositoryController as it is unused.

Rebased onto changes (no merge needed tho)

Sat, Sep 4, 10:42 PM
cspeckmim retitled D21717: Remove history query from DiffusionRepositoryController as it is unused from Update DiffusionRepositoryController to use appropriate error handling, remove history query to Remove history query from DiffusionRepositoryController as it is unused.
Sat, Sep 4, 10:41 PM
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

I'm working on testing out the issue before/after this change

Sat, Sep 4, 10:23 PM
cspeckmim planned changes to D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

I'll do that

Sat, Sep 4, 9:38 PM
epriestley accepted D21717: Remove history query from DiffusionRepositoryController as it is unused.

This looks great to me now, as long as I didn't miss anything with the Future stuff and it does what it's supposed to on top of D21720 + D21721.

Sat, Sep 4, 9:38 PM
epriestley committed rPb757e5c30249: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time (authored by epriestley).
Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time
Sat, Sep 4, 9:36 PM
epriestley closed D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.
Sat, Sep 4, 9:36 PM
epriestley accepted D21718: Update "arc liberate" to fix error with PHP 8, remove logging, modify error handling.

I'd favor this change:

Sat, Sep 4, 9:35 PM
cspeckmim accepted D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.

I hadn't considered that having this still use http requests could be done in parallel vs. the clustered running them in serial being faster (theoretically)

Sat, Sep 4, 9:34 PM
cspeckmim renamed T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations from Improve error-handling behavior of Diffusion repository landing page to Improve error-handling behavior of Diffusion repository landing page on non-clustered installations.
Sat, Sep 4, 9:29 PM · Diffusion
epriestley requested review of D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.
Sat, Sep 4, 9:21 PM
epriestley committed rARCf993b1fbda71: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts (authored by epriestley).
Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts
Sat, Sep 4, 9:19 PM
epriestley closed D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.
Sat, Sep 4, 9:19 PM
epriestley added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21721: Use "MethodCallFuture" to move Diffusion Conduit exceptions to resolution time.
Sat, Sep 4, 9:13 PM · Diffusion
epriestley added a comment to D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.

Yeah -- isReady() should really be called something else nowadays (it's, uh, "doTheThingThisFutureDoes()" pretty much), but it would be a backward-compatibility break and I shuffled enough stuff around in T11968 that I didn't want to press my luck.

Sat, Sep 4, 9:05 PM
cspeckmim added a comment to D21717: Remove history query from DiffusionRepositoryController as it is unused.

Does that mean the ConduitClientFuture doesn't begin execution until resolve() is called or some other internal mechanism triggered by iterating a FutureIterator?

Right: creating a future doesn't start it (it doesn't make any network connections, launch any subprocesses, etc). Technically, you can start a future explicitly by calling $future->start(), but there's little/no reason to ever do so.

Even if we started futures on creation, the process is ultimately still single-threaded and we don't get any kind of I/O handling "for free" in PHP, so execution must pass into most Futures regularly to make meaningful progress on them: for example, if you just start() an HTTP future and don't return to it, it will probably get about as far as opening a network connection but not actually send any bytes over the wire, so it isn't really executing fully in parallel. Subprocess futures usually don't need as much upkeep as network futures, but they can still stall if the stderr buffer on the child process fills up and the parent process hasn't returned execution into the Future to read the buffer.

Sat, Sep 4, 9:04 PM
epriestley added a comment to D21716: Update ArcanistMercurialAPI to support getting the current commit ref.

This might or might not be helpful, but the rough model here is that "hardpoints" are an open slot that some particular data may be loaded into. The physical analogy is a "hardpoint" on fighter aircraft where a particular missile or bomb may be attached.

Sat, Sep 4, 9:00 PM
cspeckmim accepted D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.

oops

Sat, Sep 4, 9:00 PM
cspeckmim added a comment to D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.

I looked at Future to see how isReady() plays into other parts and this looks good! Thank you!

Sat, Sep 4, 8:59 PM
epriestley requested review of D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.
Sat, Sep 4, 8:40 PM
epriestley added a revision to T13666: Improve error-handling behavior of Diffusion repository landing page on non-clustered installations: D21720: Provide "MethodCallFuture" to fix exception semantics in mixed-future contexts.
Sat, Sep 4, 8:40 PM · Diffusion