Logo Search packages:      
Sourcecode: rabbitvcs version File versions  Download package

def rabbitvcs::lib::vcs::svn::SVN::apply_patch (   self,
  patch_file,
  base_dir 
)

Applies a patch created for this WC.

@type patch_file: string
@param patch_file: the path to the patch file

@type base_dir: string
@param base_dir: the base directory from which to interpret the paths in
         the patch file

Definition at line 1723 of file __init__.py.

01723                                                :
        """
        Applies a patch created for this WC.
        
        @type patch_file: string
        @param patch_file: the path to the patch file
        
        @type base_dir: string
        @param base_dir: the base directory from which to interpret the paths in
                         the patch file
        """
        
        any_failures = False
        
        for file, success, rej_file in parse_patch_output(patch_file, base_dir):
            
            fullpath = os.path.join(base_dir, file)
            
            event_dict = dict()
            
            event_dict["path"] = file
            event_dict["mime_type"] = "" # meh
            
            if success:
                event_dict["action"] = _("Patched") # not in pysvn, but
                                                    # we have a fallback
            else:
                any_failures = True
                event_dict["action"] = _("Patch Failed") # better wording needed?
            
            # Creates its own notifications.
            self.add_backwards(fullpath)
            
            if rej_file:
                rej_info = {
                    "path" : rej_file,
                    "action" : _("Rejected Patch"),
                    "mime_type" : None
                            }
            
            if self.client.callback_notify:
                self.client.callback_notify(event_dict)
                if rej_file:
                    self.client.callback_notify(rej_info)
                
        

    def is_version_less_than(self, version):


Generated by  Doxygen 1.6.0   Back to index