Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a repository on my development server whose directory I have mounted using sshfs. I've synced up my uid/guid and seem to be able to execute/edit files as usual on said directory, as if I had just ssh'ed in. However, when I run a command like hg status, the process hangs and never returns to me the expected result. Is there any reason why mounting a directory like this would be much different than just sshing in and calling the same command?

For reference, the mounted filesystem is nfs, and the command I run is 'sshfs me@myserver:/home/me/repo /home/me/mnt/repo'

Thanks in advance.

share|improve this question
    
Sounds like an "interesting" problem :-) I don't know mercurial, but (i) do you have any debugging options to hg? (ii) when hg hangs, can you still access the mounted filesystem, ls and cd working normally? –  January Sep 22 '12 at 17:27
    
(i) Not that I know of. There is a --verbose option, but using that still returns me nothing. (ii) yes, I still have full accesss to the filesystem. –  grobolom Sep 22 '12 at 17:30
    
OK, two tools that might help you find out what hg is doing: ltrace and strace (see their man pages). Running them might give you an idea what is happening. –  January Sep 22 '12 at 19:04
    
Ah, cool. So it seems that the issue isn't that hg hangs - it actually runs fine. However, it seems to be scanning the entire repository for changes remotely, resulting in excessively slow speeds. Is there any way to speed this up? –  grobolom Sep 22 '12 at 21:20
    
I see. Seems you better create a local copy -- since you are using a version control system, this is actually the way to go. –  January Sep 22 '12 at 21:43

1 Answer 1

up vote 1 down vote accepted

Mercurial doesn't require any special form of access to the files, but (as you've found out), it will stat all the files when you run hg status. With a network filesystem this can take a long time.

Since Mercurial is a distributed version control system, the basic assumption is that you'll be operation on a local repository, not a repository residing on a network filesytem. So you should always try to make a local clone and work on that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.