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)
Sat, Dec 21, 3:19 PM
Unknown Object (File)
Fri, Dec 20, 12:42 AM
Unknown Object (File)
Fri, Dec 13, 5:37 AM
Unknown Object (File)
Mon, Dec 9, 6:27 PM
Unknown Object (File)
Thu, Dec 5, 7:49 AM
Unknown Object (File)
Thu, Dec 5, 7:46 AM
Unknown Object (File)
Tue, Dec 3, 2:16 PM
Unknown Object (File)
Wed, Nov 27, 3:15 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).