Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions rtcFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def recreateoldestworkspace(self):


class Changes:

latest_accept_command = ""

@staticmethod
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand Down