[Libreoffice-commits] .: offapi/type_reference registry/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Dec 13 02:06:21 PST 2012


 offapi/type_reference/update-rdb.sh |    4 ++--
 registry/source/registry.cxx        |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 53fbd30b3cd6465251b1b07f4728813d524fcd82
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Dec 13 11:03:03 2012 +0100

    Make registry's mergeKey fail if it cannot process regFileName
    
    ...so that regmerge fails for bad regfile arguments.  Add -v to the regmerge
    calls in update-rdb.sh so that an error message is printed in case of failure.
    
    Change-Id: I6613b9756b4e5628772541580938f6c80fd9bc9e

diff --git a/offapi/type_reference/update-rdb.sh b/offapi/type_reference/update-rdb.sh
index 0f41721..79fd29c 100755
--- a/offapi/type_reference/update-rdb.sh
+++ b/offapi/type_reference/update-rdb.sh
@@ -24,10 +24,10 @@ fi
 
 mkdir tmp
 for i in "$@"; do
-  "${OUTDIR_FOR_BUILD?}"/bin/regmerge tmp/out1.rdb /UCR \
+  "${OUTDIR_FOR_BUILD?}"/bin/regmerge -v tmp/out1.rdb /UCR \
     "${WORKDIR_FOR_BUILD?}"/UnoApiPartTarget/"${i%.idl}".urd
 done
-"${OUTDIR_FOR_BUILD?}"/bin/regmerge tmp/out2.rdb / \
+"${OUTDIR_FOR_BUILD?}"/bin/regmerge -v tmp/out2.rdb / \
   "${SRC_ROOT?}"/offapi/type_reference/types.rdb tmp/out1.rdb
 echo "sanity check diff:"
 diff <("${OUTDIR_FOR_BUILD?}"/bin/regview \
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index 5851199..345631a 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -361,7 +361,7 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg,
             return _ret;
 
         _ret = pReg->loadKey(pNewKey, regFileName, bWarnings, bReport);
-        if (_ret == REG_MERGE_ERROR || (_ret == REG_MERGE_CONFLICT && bWarnings))
+        if (_ret != REG_NO_ERROR && (_ret != REG_MERGE_CONFLICT || bWarnings))
         {
             if (pNewKey != pKey)
                 (void) pKey->closeKey(pNewKey);


More information about the Libreoffice-commits mailing list