diff -r 54632671aa3b -r f148796813d4 Plugins/VcsPlugins/vcsMercurial/FetchExtension/fetch.py --- a/Plugins/VcsPlugins/vcsMercurial/FetchExtension/fetch.py Sat Feb 11 18:19:56 2017 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/FetchExtension/fetch.py Sat Feb 11 19:47:41 2017 +0100 @@ -28,13 +28,20 @@ @param vcs reference to the Mercurial vcs object """ super(Fetch, self).__init__(vcs) + + self.__vcs = vcs - def hgFetch(self, name): + def hgFetch(self, name, revisions=None): """ Public method to fetch changes from a remote repository. - @param name file/directory name (string) - @return flag indicating that the project should be reread (boolean) + @param name directory name of the project to be fetched to + @type str + @param revisions list of revisions to be pulled + @type list of str + @return flag indicating, that the update contained an add + or delete + @rtype bool """ # find the root of the repo repodir = self.vcs.splitPath(name)[0] @@ -45,7 +52,7 @@ from .HgFetchDialog import HgFetchDialog res = False - dlg = HgFetchDialog() + dlg = HgFetchDialog(self.__vcs) if dlg.exec_() == QDialog.Accepted: message, switchParent = dlg.getData() @@ -56,6 +63,10 @@ if switchParent: args.append("--switch-parent") args.append("-v") + if revisions: + for rev in revisions: + args.append("--rev") + args.append(rev) dia = HgDialog( self.tr('Fetching from a remote Mercurial repository'),