1949 |
1949 |
1950 def hgBackout(self, name): |
1950 def hgBackout(self, name): |
1951 """ |
1951 """ |
1952 Public method used to backout an earlier changeset from the Mercurial repository. |
1952 Public method used to backout an earlier changeset from the Mercurial repository. |
1953 |
1953 |
1954 @param name directory name (string or list of strings)) |
1954 @param name directory name (string or list of strings) |
1955 """ |
1955 """ |
1956 dname, fname = self.splitPath(name) |
1956 dname, fname = self.splitPath(name) |
1957 |
1957 |
1958 # find the root of the repo |
1958 # find the root of the repo |
1959 repodir = str(dname) |
1959 repodir = str(dname) |
1989 dia = HgDialog(self.trUtf8('Backing out changeset')) |
1989 dia = HgDialog(self.trUtf8('Backing out changeset')) |
1990 res = dia.startProcess(args, repodir) |
1990 res = dia.startProcess(args, repodir) |
1991 if res: |
1991 if res: |
1992 dia.exec_() |
1992 dia.exec_() |
1993 |
1993 |
|
1994 def hgRollback(self, name): |
|
1995 """ |
|
1996 Public method used to rollback the last transaction. |
|
1997 |
|
1998 @param name directory name (string or list of strings) |
|
1999 """ |
|
2000 dname, fname = self.splitPath(name) |
|
2001 |
|
2002 # find the root of the repo |
|
2003 repodir = str(dname) |
|
2004 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
|
2005 repodir = os.path.dirname(repodir) |
|
2006 if repodir == os.sep: |
|
2007 return |
|
2008 |
|
2009 res = E5MessageBox.yesNo(None, |
|
2010 self.trUtf8("Rollback last transaction"), |
|
2011 self.trUtf8("""Are you sure you want to rollback the last transaction?"""), |
|
2012 icon = E5MessageBox.Warning) |
|
2013 if res: |
|
2014 dia = HgDialog(self.trUtf8('Rollback last transaction')) |
|
2015 res = dia.startProcess(["rollback"], repodir) |
|
2016 if res: |
|
2017 dia.exec_() |
|
2018 |
1994 def hgServe(self, name): |
2019 def hgServe(self, name): |
1995 """ |
2020 """ |
1996 Public method used to edit the repository config file. |
2021 Public method used to edit the repository config file. |
1997 |
2022 |
1998 @param name directory name (string) |
2023 @param name directory name (string) |