1326 dia.exec_() |
1326 dia.exec_() |
1327 res = dia.hasAddOrDelete() |
1327 res = dia.hasAddOrDelete() |
1328 self.checkVCSStatus() |
1328 self.checkVCSStatus() |
1329 return res |
1329 return res |
1330 |
1330 |
1331 def hgPush(self, name, force=False): |
1331 def hgPush(self, name, force=False, newBranch=False): |
1332 """ |
1332 """ |
1333 Public method used to push changes to a remote Mercurial repository. |
1333 Public method used to push changes to a remote Mercurial repository. |
1334 |
1334 |
1335 @param name directory name of the project to be pushed from (string) |
1335 @param name directory name of the project to be pushed from (string) |
1336 @keyparam force flag indicating a forced push (boolean) |
1336 @keyparam force flag indicating a forced push (boolean) |
|
1337 @keyparam newBranch flag indicating to push a new branch (boolean) |
1337 """ |
1338 """ |
1338 args = [] |
1339 args = [] |
1339 args.append('push') |
1340 args.append('push') |
1340 self.addArguments(args, self.options['global']) |
1341 self.addArguments(args, self.options['global']) |
1341 args.append('-v') |
1342 args.append('-v') |
1342 if force: |
1343 if force: |
1343 args.append('-f') |
1344 args.append('-f') |
|
1345 if newBranch: |
|
1346 args.append('--new-branch') |
1344 |
1347 |
1345 # find the root of the repo |
1348 # find the root of the repo |
1346 repodir = self.splitPath(name)[0] |
1349 repodir = self.splitPath(name)[0] |
1347 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
1350 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
1348 repodir = os.path.dirname(repodir) |
1351 repodir = os.path.dirname(repodir) |