Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 276
4a7e25ee406c
parent 248
f4561c24989a
child 305
5cf9e308f342
equal deleted inserted replaced
275:88c8b9eefc45 276:4a7e25ee406c
1309 if res: 1309 if res:
1310 dia.exec_() 1310 dia.exec_()
1311 res = dia.hasAddOrDelete() 1311 res = dia.hasAddOrDelete()
1312 self.checkVCSStatus() 1312 self.checkVCSStatus()
1313 1313
1314 def hgPush(self, name): 1314 def hgPush(self, name, force = False):
1315 """ 1315 """
1316 Public method used to push changes to a remote Mercurial repository. 1316 Public method used to push changes to a remote Mercurial repository.
1317 1317
1318 @param name directory name of the project to be pushed from (string) 1318 @param name directory name of the project to be pushed from (string)
1319 @keyparam force flag indicating a forced push (boolean)
1319 """ 1320 """
1320 args = [] 1321 args = []
1321 args.append('push') 1322 args.append('push')
1322 self.addArguments(args, self.options['global']) 1323 self.addArguments(args, self.options['global'])
1323 args.append('-v') 1324 args.append('-v')
1325 if force:
1326 args.append('-f')
1324 1327
1325 # find the root of the repo 1328 # find the root of the repo
1326 repodir = self.splitPath(name)[0] 1329 repodir = self.splitPath(name)[0]
1327 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 1330 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
1328 repodir = os.path.dirname(repodir) 1331 repodir = os.path.dirname(repodir)

eric ide

mercurial