Closed mrighele closed 7 years ago
This works great for me in my limited testing.
I struggle to understand how Tramp syntax for a remote path and Hg syntax for a remote can "work together"? Can you please provide and example .hgrc
to highlight this feature?
If you call out to hg with the correct emacs functions, emacs is smart enough to run the process on the remote host.
Do you have an example?
I'm pretty sure you're already doing this correctly - that is, if you apply this patch, then most things Just Work.
I just want to understand what feature this patch is implementing, before merging it.
I struggle to understand how Tramp syntax for a remote path and Hg syntax for a remote can "work together"?
There really isn't anything Mercurial specific here. It's just Tramp and mounting files over ssh. If you call hg root
on a file in /tmp/foo (since Tramp is copying files over in the background), then it's probably going to error out saying it's the file is not in a repo.
However, if you juggle this right, then emacs will shell out to calling hg root
on the remote machine, thereby returning the correct /some/path/on/my/remote/server
. Since that's a file not known to us locally, we'll need to massage the output so emacs can open it via Tramp.
Hopefully, that explains enough to show that this is mostly a Tramp issue which happens to shell out to Mercurial (perhaps it's confusing that Tramp / git / hg all have a 'remote' concept that differs here).
@seanfarley Thanks for the explanation, it is clear now.
Sorry for not replying before. I realize the description of the issue is not really correct. As @seanfarley pointed out the issue was not much with remote repositories, as with remote working directories.
monky-get-root-dir uses "hg root" to get the root for the repository. When we are working with remote repositories, we need to convert the output to a tramp path.