Remove the specified entries from the queue. Arguments: revs: Stash revisions or queued exp names to be removed. queued: Remove all queued tasks. all: Remove all tasks. Returns: Revisions (or names) which were removed.
(
self,
revs: Collection[str],
all_: bool = False,
queued: bool = False,
**kwargs,
)
| 133 | """Pop and return the first item in the queue.""" |
| 134 | |
| 135 | def remove( |
| 136 | self, |
| 137 | revs: Collection[str], |
| 138 | all_: bool = False, |
| 139 | queued: bool = False, |
| 140 | **kwargs, |
| 141 | ) -> list[str]: |
| 142 | """Remove the specified entries from the queue. |
| 143 | |
| 144 | Arguments: |
| 145 | revs: Stash revisions or queued exp names to be removed. |
| 146 | queued: Remove all queued tasks. |
| 147 | all: Remove all tasks. |
| 148 | |
| 149 | Returns: |
| 150 | Revisions (or names) which were removed. |
| 151 | """ |
| 152 | |
| 153 | if all_ or queued: |
| 154 | return self.clear() |
| 155 | |
| 156 | name_to_remove: list[str] = [] |
| 157 | entry_to_remove: list[ExpStashEntry] = [] |
| 158 | queue_entries = self.match_queue_entry_by_name(revs, self.iter_queued()) |
| 159 | for name, entry in queue_entries.items(): |
| 160 | if entry: |
| 161 | entry_to_remove.append(self.stash.stash_revs[entry.stash_rev]) |
| 162 | name_to_remove.append(name) |
| 163 | |
| 164 | self.stash.remove_revs(entry_to_remove) |
| 165 | return name_to_remove |
| 166 | |
| 167 | def clear(self, **kwargs) -> list[str]: |
| 168 | """Remove all entries from the queue.""" |
nothing calls this directly
no test coverage detected