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, Apr 30, 8:27 AM
Unknown Object (File)
Sat, Apr 27, 4:06 PM
Unknown Object (File)
Thu, Apr 25, 2:59 AM
Unknown Object (File)
Sat, Apr 20, 6:06 PM
Unknown Object (File)
Sun, Apr 14, 3:53 AM
Unknown Object (File)
Thu, Apr 11, 8:44 AM
Unknown Object (File)
Fri, Apr 5, 4:42 PM
Unknown Object (File)
Apr 4 2024, 9:44 AM

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).