Commits

Anonymous committed 97b3578

contl10n01: disable adding of new files

Comments (0)

Files changed (1)

l10ntools/scripts/tool/commands.py

         myui = ui.ui()
         repo = hg.repository(myui, self._cws_root_dir + "/l10n/" )
         ### hg add ###
-        if len(self._new_files) > 0:
-            add_list = []
-            for lang in self._new_files:
-                add_list.append(self._cws_root_dir+"/l10n/l10n/source/"+lang+"/localize.sdf")
-            add_errmsg = "Execution failed of hg add files " + str(" ".join(add_list)) + "'\n"
-            out_v = utils.Util.hg_cmd(commands.add, self._log, add_errmsg, myui, repo, *add_list)        
+        #if len(self._new_files) > 0:
+        #    add_list = []
+        #    for lang in self._new_files:
+        #        add_list.append(self._cws_root_dir+"/l10n/l10n/source/"+lang+"/localize.sdf")
+        #    add_errmsg = "Execution failed of hg add files " + str(" ".join(add_list)) + "'\n"
+        #    out_v = utils.Util.hg_cmd(commands.add, self._log, add_errmsg, myui, repo, *add_list)        
 
         #### hg commit ###
         if self._commit_all == "True":         # commit all
             file_list = []
             for lang in self._files_modified:
                 file_list.append(self._cws_root_dir+"/l10n/l10n/source/"+lang + "/localize.sdf")
-            for lang in self._new_files:
-                file_list.append(self._cws_root_dir+"/l10n/l10n/source/"+lang + "/localize.sdf")        
+            #for lang in self._new_files:
+            #    file_list.append(self._cws_root_dir+"/l10n/l10n/source/"+lang + "/localize.sdf")        
             if len(file_list) == 0:
                 self._log.die("There is nothing to hg commit ?!?! Is this correct?!")
             commit_errmsg = "Execution failed of hg commit '" + " ".join(file_list) + "'\n"             
             out_v = utils.Util.hg_cmd(commands.commit, self._log, commit_errmsg, myui, repo, *file_list , message=self._commit_msg)
 
+        #time.sleep(5)
         ### hg verify ###
         if len(self._new_files) > 0 or len(self._files_modified) > 0:
             verify_errmsg = "Execution failed of hg verify\n"
             out_v = utils.Util.hg_cmd(commands.push, self._log, push_errmsg, myui, repo, self._dest_repo)
             self._log.info("Changesets pushed to " + self._dest_repo + ":")
             self._log.info(out_v)
-
+        
         os.chdir(old_path)
 
     def post(self, tool_cfg, state_cfg, env):