It seems that this thread was buried. I'll try to resurrect it with some patches.

0001 - fix usage documentation messages for topdir and dest-file
0002 - remove unused import, fix indentation and a minor typo

-Ionuț
>From 20e888f8091e4c659b8e96a15c79fdc15c18cb97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionu=C8=9B=20Ar=C8=9B=C4=83ri=C8=99i?= <iartar...@suse.cz>
Date: Tue, 10 May 2011 14:55:51 +0200
Subject: [PATCH 1/2] fix usage documentation messages for topdir and
 dest-file

---
 .../tools/rhncfg/config_management/rhncfg_diff.py  |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/tools/rhncfg/config_management/rhncfg_diff.py b/client/tools/rhncfg/config_management/rhncfg_diff.py
index d497ff0..759279c 100644
--- a/client/tools/rhncfg/config_management/rhncfg_diff.py
+++ b/client/tools/rhncfg/config_management/rhncfg_diff.py
@@ -38,11 +38,11 @@ class Handler(handler_base.HandlerBase):
          ),
         handler_base.HandlerBase._option_class(
             '-d', '--dest-file',    action="store",
-             help="Upload the file as this path",
+             help="Remote file to compare to",
          ),
         handler_base.HandlerBase._option_class(
             '-t', '--topdir',       action="store",
-             help="Make all files relative to this string",
+             help="Directory to which all file paths are relative",
          ),
     ]
     def run(self):
-- 
1.7.4.4

>From a62af83de44214071606ff98cb3a6773f92e9d6e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionu=C8=9B=20Ar=C8=9B=C4=83ri=C8=99i?= <iartar...@suse.cz>
Date: Tue, 10 May 2011 14:56:39 +0200
Subject: [PATCH 2/2] remove unused import, fix indentation and a minor typo

---
 .../tools/rhncfg/config_management/rhncfg_diff.py  |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/client/tools/rhncfg/config_management/rhncfg_diff.py b/client/tools/rhncfg/config_management/rhncfg_diff.py
index 759279c..b260dc1 100644
--- a/client/tools/rhncfg/config_management/rhncfg_diff.py
+++ b/client/tools/rhncfg/config_management/rhncfg_diff.py
@@ -21,7 +21,6 @@ import sys
 
 from config_common import handler_base, utils, cfg_exceptions
 from config_common.rhn_log import log_debug, die
-from config_common.file_utils import diff
 from spacewalk.common.fileutils import f_date, ostr_to_sym
 
 
@@ -121,14 +120,14 @@ class Handler(handler_base.HandlerBase):
                 if info['encoding'] == 'base64':
                     info['file_contents'] = base64.decodestring(info['file_contents'])
                 else:
-                    die(9, 'Error: unknow encoding %s' % info['encoding'])
+                    die(9, 'Error: unknown encoding %s' % info['encoding'])
         except cfg_exceptions.RepositoryFileMissingError:
             die(2, "Error: no such file %s (revision %s) in config channel %s"
                 % (path, revision, channel))
         if os.path.islink(local_file) and info['filetype'] != 'symlink' :
-             die(8, "Cannot diff %s; the file on the system is a symbolic link while the file in the channel is not. " % local_file)
+            die(8, "Cannot diff %s; the file on the system is a symbolic link while the file in the channel is not. " % local_file)
         if  info['filetype'] == 'symlink' and not os.path.islink(local_file) :
-             die(8, "Cannot diff %s; the file on the system is not a symbolic link while the file in the channel is. " % local_file)             
+            die(8, "Cannot diff %s; the file on the system is not a symbolic link while the file in the channel is. " % local_file)             
         if info['filetype'] == 'symlink':
             src_link = info['symlink']
             dest_link = os.readlink(local_file)
@@ -152,7 +151,7 @@ class Handler(handler_base.HandlerBase):
         if 'selinux_ctx' not in info:
             info['selinux_ctx'] = ''
         if not first_row and not self.__attributes_differ(info, local_info):
-             return ""
+            return ""
         else:
             template = "--- %s\t%s\tattributes: %s %s %s %s\tconfig channel: %s\trevision: %s"
             if not info.has_key('modified'):
-- 
1.7.4.4

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to