1999 os.remove(self.bundleFile) |
1999 os.remove(self.bundleFile) |
2000 self.bundleFile = None |
2000 self.bundleFile = None |
2001 self.checkVCSStatus() |
2001 self.checkVCSStatus() |
2002 return res |
2002 return res |
2003 |
2003 |
2004 def hgPush(self, name, force=False, newBranch=False): |
2004 def hgPush(self, name, force=False, newBranch=False, rev=None): |
2005 """ |
2005 """ |
2006 Public method used to push changes to a remote Mercurial repository. |
2006 Public method used to push changes to a remote Mercurial repository. |
2007 |
2007 |
2008 @param name directory name of the project to be pushed from (string) |
2008 @param name directory name of the project to be pushed from (string) |
2009 @keyparam force flag indicating a forced push (boolean) |
2009 @keyparam force flag indicating a forced push (boolean) |
2010 @keyparam newBranch flag indicating to push a new branch (boolean) |
2010 @keyparam newBranch flag indicating to push a new branch (boolean) |
|
2011 @keyparam rev revision to be pushed (including all ancestors) (string) |
2011 """ |
2012 """ |
2012 args = self.initCommand("push") |
2013 args = self.initCommand("push") |
2013 args.append('-v') |
2014 args.append('-v') |
2014 if force: |
2015 if force: |
2015 args.append('-f') |
2016 args.append('-f') |
2016 if newBranch: |
2017 if newBranch: |
2017 args.append('--new-branch') |
2018 args.append('--new-branch') |
|
2019 if rev: |
|
2020 args.append('--rev') |
|
2021 args.append(rev) |
2018 |
2022 |
2019 # find the root of the repo |
2023 # find the root of the repo |
2020 repodir = self.splitPath(name)[0] |
2024 repodir = self.splitPath(name)[0] |
2021 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2025 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
2022 repodir = os.path.dirname(repodir) |
2026 repodir = os.path.dirname(repodir) |