eric6/Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 8234
fcb6b4b96274
parent 8222
5994b80b8760
child 8240
93b8a353c4bf
equal deleted inserted replaced
8233:bad78a592cc2 8234:fcb6b4b96274
745 being edited and has unsaved modification, they can be saved or the 745 being edited and has unsaved modification, they can be saved or the
746 operation may be aborted. 746 operation may be aborted.
747 747
748 @param name file/directory name to be diffed (string) 748 @param name file/directory name to be diffed (string)
749 """ 749 """
750 if isinstance(name, list): 750 names = name[:] if isinstance(name, list) else [name]
751 names = name[:]
752 else:
753 names = [name]
754 for nam in names: 751 for nam in names:
755 if os.path.isfile(nam): 752 if os.path.isfile(nam):
756 editor = e5App().getObject("ViewManager").getOpenEditor(nam) 753 editor = e5App().getObject("ViewManager").getOpenEditor(nam)
757 if editor and not editor.checkDirty(): 754 if editor and not editor.checkDirty():
758 return 755 return
1256 url = "" 1253 url = ""
1257 args = self.initCommand("showconfig") 1254 args = self.initCommand("showconfig")
1258 args.append('paths.default') 1255 args.append('paths.default')
1259 1256
1260 output, error = self.__client.runcommand(args) 1257 output, error = self.__client.runcommand(args)
1261 1258 url = output.splitlines()[0].strip() if output else ""
1262 if output:
1263 url = output.splitlines()[0].strip()
1264 else:
1265 url = ""
1266 1259
1267 return QCoreApplication.translate( 1260 return QCoreApplication.translate(
1268 'mercurial', 1261 'mercurial',
1269 """<h3>Repository information</h3>\n""" 1262 """<h3>Repository information</h3>\n"""
1270 """<p><table>\n""" 1263 """<p><table>\n"""
1455 1448
1456 This method gives the chance to enter the revisions to be compared. 1449 This method gives the chance to enter the revisions to be compared.
1457 1450
1458 @param name file/directory name to be diffed (string) 1451 @param name file/directory name to be diffed (string)
1459 """ 1452 """
1460 if isinstance(name, list): 1453 names = name[:] if isinstance(name, list) else [name]
1461 names = name[:]
1462 else:
1463 names = [name]
1464 for nam in names: 1454 for nam in names:
1465 if os.path.isfile(nam): 1455 if os.path.isfile(nam):
1466 editor = e5App().getObject("ViewManager").getOpenEditor(nam) 1456 editor = e5App().getObject("ViewManager").getOpenEditor(nam)
1467 if editor and not editor.checkDirty(): 1457 if editor and not editor.checkDirty():
1468 return 1458 return

eric ide

mercurial