Page MenuHomePhabricator

Fix arc land on odd/modern git-svn checkouts
ClosedPublic

Authored by asherkin on Sep 17 2018, 2:42 PM.
Tags
None
Referenced Files
F13306610: D19681.diff
Sun, Jun 9, 8:29 AM
F13259240: D19681.id47032.diff
Sun, May 26, 6:19 PM
F13225483: D19681.diff
Sun, May 19, 3:25 PM
F13216037: D19681.diff
Fri, May 17, 9:58 PM
F13212788: D19681.diff
Fri, May 17, 7:05 AM
F13197705: D19681.diff
May 13 2024, 12:25 AM
Unknown Object (File)
May 3 2024, 10:16 AM
Unknown Object (File)
Apr 28 2024, 8:34 AM
Subscribers

Details

Summary

The current code assumes git-svn is always working from a remote called
trunk, but if the repository is initialized without the -T option it
will instead be called git-svn, and if --prefix is used (which is
set by default to origin/ in Git 2+) the remote name will have the
specified prefix as well.

Instead, look at the fetch target refspec set in the git-svn config.

Fixes T13293.

Test Plan

arc land without errors (or manually creating a trunk branch) from a
checkout made with Git 2.18.0 (verified this manually on a non--T
checkout as well).

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Can you file a task for this that has step-by-step reproduction instructions (e.g., run this command, then run this command, here's where the thing breaks before this change)? I think this change is likely fine, I'm just not confident I'll be able to reproduce the issue when this refactors during T13098.

This revision now requires changes to proceed.May 14 2019, 2:24 PM
src/workflow/ArcanistLandWorkflow.php
319–320

Re-visiting this after the testing today, I'm not 100% confident this is actually going to behave correctly with multiple git-svn remotes or tracking branches, but neither are something I've ever used with it.

Thanks, T13293 makes this much clearer.

src/workflow/ArcanistLandWorkflow.php
319–320

I'm comfortable waiting for this to explode somewhere, multiple git-svn remotes seems wildly ambitious.

This revision is now accepted and ready to land.May 22 2019, 4:30 PM

Thanks for the review - I dropped in a comment referencing the task when committing so it's clear why this is here when the refactoring comes along 🙂