Mercurial > utils
changeset 33:36d8e4e11e03
More digit for test rep compatibility. Add some err msg.
author | Oleksander Gavenko <gavenko_a@3g.ua> |
---|---|
date | Thu, 20 Mar 2008 22:18:41 +0200 |
parents | 4a989af8827f |
children | d052d75cc98c |
files | hg/hgrepsync |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hg/hgrepsync Mon Mar 03 23:07:50 2008 +0200 +++ b/hg/hgrepsync Thu Mar 20 22:18:41 2008 +0200 @@ -1,5 +1,5 @@ #!/bin/sh -# -*- coding: cp1251-unix -*- +# -*- coding: cp1251-unix; sh-basic-offset: 4 -*- # Copyright (C) 2008 by Oleksandr Gavenko <gavenko_a@3g.ua> # Утилита безопасно синхорнизирует состояние эталонных репозиториев @@ -91,8 +91,8 @@ # Expect two args - path to compared rep. CheckRepCompatibility() { - REP1_ZERO_REV=`hg -R $1 id -i -r 0` - REP2_ZERO_REV=`hg -R $2 id -i -r 0` + REP1_ZERO_REV=`hg -R $1 log -r0 --template '{node}'` + REP2_ZERO_REV=`hg -R $2 log -r0 --template '{node}'` if [ $REP1_ZERO_REV = $REP2_ZERO_REV ] ; then return 0; @@ -117,7 +117,8 @@ if Check_HG_exist; then : else - PrintLog + MSG="It seems hg utility not in PATH." + PrintLog ERROR exit 1; fi @@ -128,7 +129,7 @@ exit 1; fi -if Check_HG_REP_CONF ; then : +if Check_HG_REP_CONF; then : else PrintLog exit 1; @@ -143,6 +144,7 @@ if [ -d $HG_PULL_DIR/$dir ] ; then if CheckRepCompatibility $HG_PULL_DIR/$dir $HG_PUSH_DIR/$dir; then : else + MSG="It seems repositories $HG_PULL_DIR/$dir $HG_PUSH_DIR/$dir not compatable." PrintLog exit 1; fi