[issue3293] hg pull return issuse
m2badmin
bugs at mercurial.selenic.com
Wed Feb 29 05:03:11 CST 2012
New submission from m2badmin <admin at match2blue.com>:
hg pull has a return issue (mercurial 2.1 from
https://launchpad.net/~mercurial-ppa/+archive/releases). i can't use it in
bash scripts. if there are no changes on server, hg pull never returns (or
crash) and my script will not continue. it work's well if there are changes
on the server repository
i have no problems with mercurial 1.8 ! i downgraded to it .
my system is ubuntu 10.04.4 lts with mercurial from
https://launchpad.net/~mercurial-ppa/+archive/releases
my quick & dirty testscript..
#/bin/sh
set -e
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
## change to working directory
cd targetdirectory
## update site from server
/usr/bin/hg pull
echo $? #hg returncode
/usr/bin/hg update
echo $? #hg returncode
the results:
weigel at goldcoast:/usr/local/bin$ ./export-website.sh
+ set -e
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+ cd /var/www/domain/directory
+ echo 0
0
+ /usr/bin/hg pull
pulling from ssh://user@server//var/home/database/mercurial/restrepo
searching for changes
no changes found
+ echo 0
0
+ /usr/bin/hg update
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
that all. :-(
the returncodes are never displayed if no changes on mercurial server
----------
messages: 19215
nosy: m2badmin
priority: bug
status: unread
title: hg pull return issuse
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3293>
____________________________________________________
More information about the Mercurial-devel
mailing list