diff --git a/rtcFunctions.py b/rtcFunctions.py index 6aae08c..6cae0b2 100644 --- a/rtcFunctions.py +++ b/rtcFunctions.py @@ -78,6 +78,7 @@ def recreateoldestworkspace(self): class Changes: + latest_accept_command = "" @staticmethod @@ -86,11 +87,11 @@ def discard(*changeentries): shell.execute("lscm discard --overwrite-uncommitted " + idstodiscard) @staticmethod - def accept(*changeentries, logpath): + def accept(*changeentries, workspace, repo, logpath): for changeEntry in changeentries: shouter.shout("Accepting: " + changeEntry.tostring()) revisions = Changes._collectids(changeentries) - latest_accept_command = "lscm accept -v --overwrite-uncommitted --changes " + revisions + latest_accept_command = "lscm accept -v --overwrite-uncommitted --changes " + revisions + " --target " + workspace + " -r " + repo return shell.execute(latest_accept_command, logpath, "a") @staticmethod @@ -155,7 +156,7 @@ def acceptchangesintoworkspace(self, changeentries): if skipnextchangeset: skipnextchangeset = False continue - acceptedsuccesfully = Changes.accept(changeEntry, logpath=self.acceptlogpath) is 0 + acceptedsuccesfully = Changes.accept(changeEntry, workspace=self.config.workspace, repo=self.config.repo, logpath=self.acceptlogpath) is 0 if not acceptedsuccesfully: shouter.shout("Change wasnt succesfully accepted into workspace") skipnextchangeset = self.retryacceptincludingnextchangeset(changeEntry, changeentries) @@ -179,7 +180,7 @@ def retryacceptincludingnextchangeset(self, change, changes): " changeset and continue"): return False Changes.discard(change) - successfull = Changes.accept(change, nextchangeentry, logpath=self.acceptlogpath) is 0 + successfull = Changes.accept(change, nextchangeentry, workspace=self.config.workspace, repo=self.config.repo, logpath=self.acceptlogpath) is 0 if not successfull: Changes.discard(change, nextchangeentry)