[Bug 3768] New: hg hangs when changegroup hook calls shell script which reads from stdin

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Jan 16 11:14:27 CST 2013


http://bz.selenic.com/show_bug.cgi?id=3768

          Priority: normal
            Bug ID: 3768
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: hg hangs when changegroup hook calls shell script
                    which reads from stdin
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: mikhail.solovyev at gmail.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: unspecified
         Component: Mercurial
           Product: Mercurial

hgrc:
[hooks]
changegroup = /root/issue_9725/testhook.sh

/root/issue_9725/testhook.sh:
#!/bin/bash
echo "enter some text"
read env1
echo "you entered "$env1

When doing hg push through ssh to this repo, hg hangs. And in list of processes
on repo server I see:

21750 ?        Ss     0:00  \_ sshd: misha [priv]
21754 ?        S      0:00  |   \_ sshd: misha at pts/2
21755 pts/2    Ss     0:00  |       \_ -bash
10638 pts/2    S+     0:00  |           \_ strace -o /tmp/123 -f hg push
10639 pts/2    S+     0:00  |               \_ /usr/bin/python /usr/bin/hg push
10640 pts/2    S+     0:00  |                   \_ ssh db34 hg -R
/root/issue_9725/testrepo serve --stdio
10641 ?        Ss     0:00  \_ sshd: misha [priv]
10645 ?        S      0:00      \_ sshd: misha at notty
10646 ?        Ss     0:00          \_ /usr/bin/python /usr/bin/hg -R
/root/issue_9725/testrepo serve --stdio
10663 ?        S      0:00              \_ /bin/bash
/root/issue_9725/testhook.sh


If I work with repository through local filesystem, hook works just fine. The
problem is with ssh push only.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list