Page MenuHomePhabricator

Add support for landing to hosted Mercurial repos.
ClosedPublic

Authored by asherkin on Nov 8 2013, 7:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 1:05 AM
Unknown Object (File)
Sat, Nov 16, 8:39 PM
Unknown Object (File)
Oct 18 2024, 9:20 AM
Unknown Object (File)
Oct 16 2024, 8:33 AM
Unknown Object (File)
Oct 2 2024, 2:08 AM
Unknown Object (File)
Sep 6 2024, 9:26 AM
Unknown Object (File)
Aug 31 2024, 1:23 PM
Unknown Object (File)
Aug 31 2024, 1:05 PM

Details

Summary

I've kept this as close as possible to the Git version for ease of review and later refactoring of them both together. At minimum, the functions to get the working dir should probably be cleaned up one day.

Test Plan

Landed a revision.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

One inline -- walk me through that? Everything else looks good.

src/applications/differential/DifferentialGetWorkingCopy.php
54

This is surprising -- I'd expect it to be file://, so the result is like file:///path/to/something. Does that not work? It seems to work correctly on my local machine:

>>> orbital ~/repos $ hg clone file:///Users/epriestley/repos/hg-working-copy new-clone
updating to branch default
7 files updated, 0 files merged, 0 files removed, 0 files unresolved
>>> orbital ~/repos $
src/applications/differential/landing/DifferentialLandingStrategy.php
49โ€“50

OMG THESE TABSPACES ARE NOT COMPLETELY ACCUCATE

src/applications/differential/DifferentialGetWorkingCopy.php
54

file:// only seems to work if given an absolute path, just file: alone is happy with both. The former seems to be a silly bug with Mercurial being overzealous, so I went with the latter as it seemed like it would be more reliable. Could change it for consistency, I don't know if there are any other implications.

src/applications/differential/landing/DifferentialLandingStrategy.php
49โ€“50

SHRIEK

Please fix it in the pull lest I bring shame upon my family.

Alright -- I'm going to swap it for file:// for consistency, since non-absolute paths shouldn't exist and may have weird security implications, so it's probably better if it breaks. We'll have stronger guarantees around this in the future.

Closed by commit rPd700e7f22d6d (authored by @asherkin, committed by @epriestley).