Mercurial > hg
annotate mcabber/hgcset.sh @ 1461:8fa24a6d1a93
Improve Remote Controlling Clients
The XEP recommends adding the node to the IQ response.
Some clients seem not to understand the answer when it is omitted.
Problem reported by Rhaamo and js (thanks to js for spotting the
node issue!).
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 12 Apr 2008 13:35:03 +0200 |
parents | 6cb8edbda6d2 |
children | 41c26b7d2890 |
rev | line source |
---|---|
777
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
1 #! /bin/sh |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
2 |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
3 if [ ! -f logprint.h ]; then |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
4 echo "You are not in the src directory" >&2 |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
5 exit 1 |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
6 fi |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
7 |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
8 if which hg > /dev/null 2>&1; then |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
9 cs=$(hg id 2> /dev/null | cut -d' ' -f1) |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
10 if test $? -eq 0; then |
1249
6cb8edbda6d2
Fix hgcset.sh when Mercurial is installed but there is no repository
Mikael Berthe <mikael@lilotux.net>
parents:
777
diff
changeset
|
11 if [ x"$cs" != x ]; then |
6cb8edbda6d2
Fix hgcset.sh when Mercurial is installed but there is no repository
Mikael Berthe <mikael@lilotux.net>
parents:
777
diff
changeset
|
12 grep -q "$cs" hgcset.h > /dev/null 2>&1 || \ |
6cb8edbda6d2
Fix hgcset.sh when Mercurial is installed but there is no repository
Mikael Berthe <mikael@lilotux.net>
parents:
777
diff
changeset
|
13 echo "#define HGCSET \"$cs\"" > hgcset.h |
6cb8edbda6d2
Fix hgcset.sh when Mercurial is installed but there is no repository
Mikael Berthe <mikael@lilotux.net>
parents:
777
diff
changeset
|
14 exit 0 |
6cb8edbda6d2
Fix hgcset.sh when Mercurial is installed but there is no repository
Mikael Berthe <mikael@lilotux.net>
parents:
777
diff
changeset
|
15 fi |
777
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
16 fi |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
17 fi |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
18 |
e6d42f239541
"/version" shows Mercurial changeset (if there's one)
Mikael Berthe <mikael@lilotux.net>
parents:
diff
changeset
|
19 echo > hgcset.h |