Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

status: pychecker reported file hiding global

Changeset 53e30c0f75e9

Parent 1e4c2d96c857

by Steve Borho

Changes to one file · Browse files at 53e30c0f75e9 Showing diff from parent 1e4c2d96c857 Diff from another changeset...

Change 1 of 14 Show Entire File hggtk/​status.py Stacked
 
558
559
560
561
562
563
564
 
 
 
 
565
566
567
 
616
617
618
619
620
 
 
621
622
623
 
 
624
625
626
 
674
675
676
677
678
 
 
679
680
681
682
 
 
683
684
685
686
687
 
 
688
689
690
 
691
692
693
694
695
696
 
 
 
697
698
699
 
703
704
705
706
 
707
708
709
710
711
 
 
712
713
714
 
765
766
767
768
 
769
770
771
 
805
806
807
808
809
810
 
 
 
811
812
813
 
818
819
820
821
822
823
824
825
 
 
 
 
 
826
827
828
 
833
834
835
836
837
 
 
838
839
840
 
841
842
 
843
844
845
 
857
858
859
860
 
861
862
863
864
865
866
 
 
867
868
869
 
1004
1005
1006
1007
1008
 
 
1009
1010
1011
1012
 
1013
1014
1015
1016
1017
1018
 
1019
1020
1021
 
1058
1059
1060
1061
1062
 
 
1063
1064
1065
 
1116
1117
1118
1119
1120
 
 
1121
1122
1123
1124
1125
1126
 
1127
1128
 
1129
1130
1131
 
1138
1139
1140
1141
 
1142
1143
1144
1145
1146
1147
 
1148
1149
 
1150
1151
1152
 
1155
1156
1157
1158
 
1159
1160
 
1161
1162
1163
1164
 
1165
1166
 
1167
1168
1169
1170
 
1171
1172
1173
1174
 
1175
1176
1177
 
558
559
560
 
 
 
 
561
562
563
564
565
566
567
 
616
617
618
 
 
619
620
621
 
 
622
623
624
625
626
 
674
675
676
 
 
677
678
679
680
 
 
681
682
683
684
685
 
 
686
687
688
689
 
690
691
692
693
 
 
 
694
695
696
697
698
699
 
703
704
705
 
706
707
708
709
 
 
710
711
712
713
714
 
765
766
767
 
768
769
770
771
 
805
806
807
 
 
 
808
809
810
811
812
813
 
818
819
820
 
 
 
 
 
821
822
823
824
825
826
827
828
 
833
834
835
 
 
836
837
838
839
 
840
841
 
842
843
844
845
 
857
858
859
 
860
861
862
863
864
 
 
865
866
867
868
869
 
1004
1005
1006
 
 
1007
1008
1009
1010
1011
 
1012
1013
1014
1015
1016
1017
 
1018
1019
1020
1021
 
1058
1059
1060
 
 
1061
1062
1063
1064
1065
 
1116
1117
1118
 
 
1119
1120
1121
1122
1123
1124
1125
 
1126
1127
 
1128
1129
1130
1131
 
1138
1139
1140
 
1141
1142
1143
1144
1145
1146
 
1147
1148
 
1149
1150
1151
1152
 
1155
1156
1157
 
1158
1159
 
1160
1161
1162
1163
 
1164
1165
 
1166
1167
1168
1169
 
1170
1171
1172
1173
 
1174
1175
1176
1177
@@ -558,10 +558,10 @@
    for opt, char, changes in ([ct for ct in explicit_changetypes   if self.test_opt(ct[0])] or changetypes) : - for file in changes: - mst = file in ms and ms[file].upper() or "" - file = util.localpath(file) - self.filemodel.append([file in recheck, char, toutf(file), file, mst, False]) + for wfile in changes: + mst = wfile in ms and ms[wfile].upper() or "" + wfile = util.localpath(wfile) + self.filemodel.append([wfile in recheck, char, toutf(wfile), wfile, mst, False])     selection = self.filetree.get_selection()   selected = False @@ -616,11 +616,11 @@
    def _update_chunk_state(self, entry):   '''Update chunk toggle state to match file toggle state''' - file = util.pconvert(entry[FM_PATH]) - if file not in self._filechunks: return + wfile = util.pconvert(entry[FM_PATH]) + if wfile not in self._filechunks: return   entry[FM_PARTIAL_SELECTED] = False - self._update_partial(self.diff_model, file, False) - for n in self._filechunks[file][1:]: + self._update_partial(self.diff_model, wfile, False) + for n in self._filechunks[wfile][1:]:   self.diff_model[n][DM_REJECTED] = not entry[FM_CHECKED]   self._update_diff_model_row(self.diff_model[n])   @@ -674,26 +674,26 @@
  text_renderer.set_property('foreground', 'black')     - def _view_left_file(self, stat, file): - return self._view_file(stat, file, True) + def _view_left_file(self, stat, wfile): + return self._view_file(stat, wfile, True)     - def _remove_file(self, stat, file): - self._hg_remove([file]) + def _remove_file(self, stat, wfile): + self._hg_remove([wfile])   return True     - def _rename_file(self, stat, file): - fdir, fname = os.path.split(file) + def _rename_file(self, stat, wfile): + fdir, fname = os.path.split(wfile)   newfile = entry_dialog(self, "Rename file to:", True, fname)   if newfile and newfile != fname: - self._hg_move([file, os.path.join(fdir, newfile)]) + self._hg_move([wfile, os.path.join(fdir, newfile)])   return True     - def _copy_file(self, stat, file): - file = self.repo.wjoin(file) - fdir, fname = os.path.split(file) + def _copy_file(self, stat, wfile): + wfile = self.repo.wjoin(wfile) + fdir, fname = os.path.split(wfile)   dialog = gtk.FileChooserDialog(parent=self,   title='Copy file to',   action=gtk.FILE_CHOOSER_ACTION_SAVE, @@ -703,12 +703,12 @@
  dialog.set_current_folder(fdir)   dialog.set_current_name(fname)   response = dialog.run() - newfile=file + newfile=wfile   if response == gtk.RESPONSE_OK:   newfile = dialog.get_filename()   dialog.destroy() - if newfile != file: - self._hg_copy([file, newfile]) + if newfile != wfile: + self._hg_copy([wfile, newfile])   return True     @@ -765,7 +765,7 @@
  ''' Update the diff text with merge diff to both parents'''   def dohgdiff():   difftext = ['===== Diff to first parent =====\n'] - wfiles = [self.repo.wjoin(file)] + wfiles = [self.repo.wjoin(wfile)]   matcher = cmdutil.match(self.repo, wfiles, self.opts)   for s in patch.diff(self.repo, self.repo.dirstate.parents()[0], None,   match=matcher, opts=patch.diffopts(self.ui, self.opts)): @@ -805,9 +805,9 @@
  if not sel:   self._last_file = None   return False - file = self.filemodel[sel[0]][FM_PATH_UTF8] - if force or file != self._last_file: - self._last_file = file + wfile = self.filemodel[sel[0]][FM_PATH_UTF8] + if force or wfile != self._last_file: + self._last_file = wfile   self._hg_call_wrapper('Diff', dohgdiff)   return False   @@ -818,11 +818,11 @@
  if not sel:   self._last_file = None   return False - file = util.pconvert(self.filemodel[sel[0]][FM_PATH]) - if force or file != self._last_file: - self._last_file = file - if file in self._filechunks: - row = self._filechunks[file][0] + wfile = util.pconvert(self.filemodel[sel[0]][FM_PATH]) + if force or wfile != self._last_file: + self._last_file = wfile + if wfile in self._filechunks: + row = self._filechunks[wfile][0]   self.diff_tree.scroll_to_cell((row, ), None, True)   selection = self.diff_tree.get_selection()   selection.unselect_all() @@ -833,13 +833,13 @@
  dmodel = dtree.get_model()   row = dmodel[path]   chunk = self._shelve_chunks[row[DM_CHUNK_ID]] - file = chunk.filename() - if file not in self._filechunks: + wfile = chunk.filename() + if wfile not in self._filechunks:   return   for fr in self.filemodel: - if util.pconvert(fr[FM_PATH]) == file: + if util.pconvert(fr[FM_PATH]) == wfile:   break - fchunks = self._filechunks[file][1:] + fchunks = self._filechunks[wfile][1:]   if row[DM_IS_HEADER]:   for n in fchunks:   dmodel[n][DM_REJECTED] = fr[FM_CHECKED] @@ -857,13 +857,13 @@
  # Update file's check status   if fr[FM_PARTIAL_SELECTED] != partial:   fr[FM_PARTIAL_SELECTED] = partial - self._update_partial(dmodel, file, partial) + self._update_partial(dmodel, wfile, partial)   if fr[FM_CHECKED] != newvalue:   fr[FM_CHECKED] = newvalue   self._update_check_count()   - def _update_partial(self, dmodel, file, partial): - hc = self._filechunks[file][0] + def _update_partial(self, dmodel, wfile, partial): + hc = self._filechunks[wfile][0]   row = dmodel[hc]   displayed = row[DM_DISPLAYED]   tag = ' ** Partial **' @@ -1004,18 +1004,18 @@
  return True     - def _revert_file(self, stat, file): - self._hg_revert([file]) + def _revert_file(self, stat, wfile): + self._hg_revert([wfile])   return True     - def _log_file(self, stat, file): + def _log_file(self, stat, wfile):   from gtools import cmdtable   from history import GLog     # Might want to include 'rev' here... trying without   statopts = self.merge_opts(cmdtable['glog|ghistory'][1], ('include', 'exclude', 'git')) - dialog = GLog(self.ui, self.repo, self.cwd, [file], statopts, False) + dialog = GLog(self.ui, self.repo, self.cwd, [wfile], statopts, False)   dialog.display()   return True   @@ -1058,8 +1058,8 @@
  return True     - def _add_file(self, stat, file): - self._hg_add([file]) + def _add_file(self, stat, wfile): + self._hg_add([wfile])   return True     @@ -1116,16 +1116,16 @@
  'Note: only clean files can be moved.', self).run()   return True   - def _delete_file(self, stat, file): - self._delete_files([file]) + def _delete_file(self, stat, wfile): + self._delete_files([wfile])     def _delete_files(self, files):   dialog = Confirm('Delete unrevisioned', files, self)   if dialog.run() == gtk.RESPONSE_YES :   errors = '' - for file in files: + for wfile in files:   try: - os.unlink(self.repo.wjoin(file)) + os.unlink(self.repo.wjoin(wfile))   except Exception, inst:   errors += str(inst) + '\n\n'   @@ -1138,15 +1138,15 @@
  self.reload_status()   return True   - def _guess_rename(self, stat, file): + def _guess_rename(self, stat, wfile):   import rename   dialog = rename.DetectRenameDialog(self.repo.root)   dialog.show_all()   dialog.set_notify_func(self.ignoremask_updated)   - def _ignore_file(self, stat, file): + def _ignore_file(self, stat, wfile):   import hgignore - dialog = hgignore.HgIgnoreDialog(self.repo.root, util.pconvert(file)) + dialog = hgignore.HgIgnoreDialog(self.repo.root, util.pconvert(wfile))   dialog.show_all()   dialog.set_notify_func(self.ignoremask_updated)   return True @@ -1155,23 +1155,23 @@
  '''User has changed the ignore mask in hgignore dialog'''   self.reload_status()   - def _mark_resolved(self, stat, file): + def _mark_resolved(self, stat, wfile):   ms = merge_.mergestate(self.repo) - ms.mark(util.pconvert(file), "r") + ms.mark(util.pconvert(wfile), "r")   self.reload_status()     - def _unmark_resolved(self, stat, file): + def _unmark_resolved(self, stat, wfile):   ms = merge_.mergestate(self.repo) - ms.mark(util.pconvert(file), "u") + ms.mark(util.pconvert(wfile), "u")   self.reload_status()     - def _do_resolve(self, stat, file): + def _do_resolve(self, stat, wfile):   ms = merge_.mergestate(self.repo)   wctx = self.repo[None]   mctx = wctx.parents()[-1] - ms.resolve(util.pconvert(file), wctx, mctx) + ms.resolve(util.pconvert(wfile), wctx, mctx)   self.reload_status()