Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py

changeset 3190
a9a94491c4fd
parent 3160
209a07d7e401
child 3277
b7d9c75223e3
equal deleted inserted replaced
3189:9a21c547de5f 3190:a9a94491c4fd
30 def initActions(self): 30 def initActions(self):
31 """ 31 """
32 Public method to generate the action objects. 32 Public method to generate the action objects.
33 """ 33 """
34 self.hgFetchAct = E5Action( 34 self.hgFetchAct = E5Action(
35 self.trUtf8('Fetch changes'), 35 self.tr('Fetch changes'),
36 UI.PixmapCache.getIcon("vcsUpdate.png"), 36 UI.PixmapCache.getIcon("vcsUpdate.png"),
37 self.trUtf8('Fetch changes'), 37 self.tr('Fetch changes'),
38 0, 0, self, 'mercurial_fetch') 38 0, 0, self, 'mercurial_fetch')
39 self.hgFetchAct.setStatusTip(self.trUtf8( 39 self.hgFetchAct.setStatusTip(self.tr(
40 'Fetch changes from a remote repository' 40 'Fetch changes from a remote repository'
41 )) 41 ))
42 self.hgFetchAct.setWhatsThis(self.trUtf8( 42 self.hgFetchAct.setWhatsThis(self.tr(
43 """<b>Fetch changes</b>""" 43 """<b>Fetch changes</b>"""
44 """<p>This pulls changes from a remote repository into the """ 44 """<p>This pulls changes from a remote repository into the """
45 """local repository. If the pulled changes add a new branch""" 45 """local repository. If the pulled changes add a new branch"""
46 """ head, the head is automatically merged, and the result of""" 46 """ head, the head is automatically merged, and the result of"""
47 """ the merge is committed. Otherwise, the working directory""" 47 """ the merge is committed. Otherwise, the working directory"""
69 """ 69 """
70 Public method to get the menu title. 70 Public method to get the menu title.
71 71
72 @return title of the menu (string) 72 @return title of the menu (string)
73 """ 73 """
74 return self.trUtf8("Fetch") 74 return self.tr("Fetch")
75 75
76 def __hgFetch(self): 76 def __hgFetch(self):
77 """ 77 """
78 Private slot used to fetch changes from a remote repository. 78 Private slot used to fetch changes from a remote repository.
79 """ 79 """
80 shouldReopen = self.vcs.getExtensionObject("fetch")\ 80 shouldReopen = self.vcs.getExtensionObject("fetch")\
81 .hgFetch(self.project.getProjectPath()) 81 .hgFetch(self.project.getProjectPath())
82 if shouldReopen: 82 if shouldReopen:
83 res = E5MessageBox.yesNo( 83 res = E5MessageBox.yesNo(
84 None, 84 None,
85 self.trUtf8("Fetch"), 85 self.tr("Fetch"),
86 self.trUtf8("""The project should be reread. Do this now?"""), 86 self.tr("""The project should be reread. Do this now?"""),
87 yesDefault=True) 87 yesDefault=True)
88 if res: 88 if res:
89 self.project.reopenProject() 89 self.project.reopenProject()

eric ide

mercurial