[issue3324] Repository corruptions when pulling into a repo using a cron job
Ehsan Akhgari
bugs at mercurial.selenic.com
Fri Mar 16 16:03:25 UTC 2012
New submission from Ehsan Akhgari <ehsan at mozilla.com>:
I have a couple of cron jobs which I use to sync up some mercurial repos.
Here's how the cron job scripts roughly look like:
#!/bin/bash
set -e
BASE_DIR=`dirname "$0"`
LOCK_FILE=/tmp/foo.lockfile
# check for the lock file to prevent running multiple instances of the script
# at the same time.
if [ -e "$LOCK_FILE" ]; then
exit 0
fi
trap "rm -f \"$LOCK_FILE\"; exit" INT TERM EXIT
touch $LOCK_FILE
cd mozilla-central
hg pull > /dev/null
hg update -C > /dev/null
# do stuff to sync
These cron jobs run every minute on my machine. Every two or three days I
see that they stop working because the local hg repo gets corrupted. Here's
an example:
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
browser/themes/winstripe/syncSetup.css at 89419: d69b671cc352 in manifests not
found
browser/themes/winstripe/syncSetup.css at 89422: 746f43ab0f53 in manifests not
found
browser/themes/winstripe/syncSetup.css at 89424: b86a99f52634 in manifests not
found
dom/base/nsWrapperCache.h at 89387: 722a822dfb8d in manifests not found
dom/src/geolocation/Makefile.in at 89413: 1e99b80e0038 in manifests not found
dom/telephony/Makefile.in at 89413: 2dc490daed9d in manifests not found
js/src/jsutil.h at 89393: 452a76d6d8b2 in manifests not found
js/src/jsutil.h at 89395: 6b30c0dc1a5f in manifests not found
91698 files, 89470 changesets, 433939 total revisions
8 integrity errors encountered!
(first damaged changeset appears to be 89387)
And I have to reclone from scratch. At first I was using hg 1.9, then I
switched to 2.1.1+33-c655e4acaa82 (my own hg build) but the problem persists.
I'd love to provide you with some debugging information, so please let me
know what kind of information I can provide in order to help you diagnose this.
Thanks!
----------
messages: 19398
nosy: ehsan
priority: bug
status: unread
title: Repository corruptions when pulling into a repo using a cron job
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3324>
____________________________________________________
More information about the Mercurial-devel
mailing list