Plugins/VcsPlugins/vcsMercurial/hg.py

branch
5_1_x
changeset 1285
544520790fdd
parent 1236
7a58aba00647
child 1320
e94577f27c3e
equal deleted inserted replaced
1281:80a974cf4f14 1285:544520790fdd
1836 def hgUnbundle(self, name): 1836 def hgUnbundle(self, name):
1837 """ 1837 """
1838 Public method to apply changegroup files. 1838 Public method to apply changegroup files.
1839 1839
1840 @param name directory name (string) 1840 @param name directory name (string)
1841 @return flag indicating, that the update contained an add
1842 or delete (boolean)
1841 """ 1843 """
1842 dname, fname = self.splitPath(name) 1844 dname, fname = self.splitPath(name)
1843 1845
1844 # find the root of the repo 1846 # find the root of the repo
1845 repodir = str(dname) 1847 repodir = str(dname)
1846 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 1848 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
1847 repodir = os.path.dirname(repodir) 1849 repodir = os.path.dirname(repodir)
1848 if repodir == os.sep: 1850 if repodir == os.sep:
1849 return 1851 return
1850 1852
1853 res = False
1851 files = E5FileDialog.getOpenFileNames( 1854 files = E5FileDialog.getOpenFileNames(
1852 None, 1855 None,
1853 self.trUtf8("Apply changegroups"), 1856 self.trUtf8("Apply changegroups"),
1854 repodir, 1857 repodir,
1855 self.trUtf8("Mercurial Changegroup Files (*.hg);;All Files (*)")) 1858 self.trUtf8("Mercurial Changegroup Files (*.hg);;All Files (*)"))
1861 1864
1862 args = [] 1865 args = []
1863 args.append('unbundle') 1866 args.append('unbundle')
1864 if update: 1867 if update:
1865 args.append("--update") 1868 args.append("--update")
1869 args.append("--verbose")
1866 args.extend(files) 1870 args.extend(files)
1867 1871
1868 dia = HgDialog(self.trUtf8('Apply changegroups')) 1872 dia = HgDialog(self.trUtf8('Apply changegroups'))
1869 res = dia.startProcess(args, repodir) 1873 res = dia.startProcess(args, repodir)
1870 if res: 1874 if res:
1871 dia.exec_() 1875 dia.exec_()
1876 res = dia.hasAddOrDelete()
1877 self.checkVCSStatus()
1878 return res
1872 1879
1873 def hgBisect(self, name, subcommand): 1880 def hgBisect(self, name, subcommand):
1874 """ 1881 """
1875 Public method to perform bisect commands. 1882 Public method to perform bisect commands.
1876 1883

eric ide

mercurial