P3D1::Repository URL Format

Issue #93 open
Sean Farley created an issue

Since MacHg 0.9.8 has added the ability to load the user's ~/.hgrc, how hard would it be to accept different URL formats (e.g. git+ssh, svn+ssh, etc.)?

Using the 'test' button on the add server dialog gets a 'working' result:

chg identify --cwd /tmp --rev 0 git+ssh:/ /git@github.com/<username>/<repo>;
30

but the label in the left hand corner always says 'Remote Repository is Unreachable.' Adding the server anyway just results in it always saying that and not working.

Comments (8)

  1. Sean Farley reporter

    After digging around the code, it seems that most of the framework is there but that something hardcoded to check the format of the URL. Is that right? I might be able to hack something together if I could get some clues on where to look.

  2. Jason Harris repo owner

    See eg where the connection is tested.

    - (IBAction) testConnection:(id)sender

    It would be *fantastic* if you can at least explore the options of compatibility and what needs to change in core handling of MacHg so it can pull and push to these external servers...

  3. Sean Farley reporter

    Ok, I will do some exploring this week and will ask questions (warning: probably simple or naive questions) if I run into anything.

  4. Sean Farley reporter

    Ok, I finally had time to look into this. I made some progress and have it 'working' but there are a few glaring bugs. I believe all the weirdness is related to the fact that 'hg identify ...' doesn't return a string of length 12 (which is the hash) on a remote repo url. It only works as expected locally. This is the result of investigating hg-git and hgsvn plugins.

    I removed the string length check in testConnection to force it to work. The problems encountered so far:

    1) Adding a previously cloned repo via drag-n-drop doesn't add the correct server repo 2) After manually adding the server repo, you need to check "allow pull from any repo" to get new changesets

    After both these are done, then you can pull / push normally. I hope this helps clears up what is going on.

  5. Log in to comment