DuplicateRepoCleanup class
Moves the folders a repository rename left behind out of a workspace.
Renaming a repository does not invalidate its old name — the platform redirects it — so a manifest that still names the old one keeps cloning successfully and the workspace ends up holding the same repository twice. The dependency graph then sees one package name in two folders, drops one of them, and whichever it drops is decided by folder order rather than by which checkout is current.
The checkout that lies in the folder its own manifests name is kept; the
others go to <root>/.trash/.ocean/<org>/<repo>. Nothing is deleted, so a
forgotten local change is still recoverable — which is also why this runs
without asking.
Constructors
- DuplicateRepoCleanup()
-
Constructor.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
{required String workspacePath, required String rootPath, required GgLog ggLog, bool dryRun = false}) → Future< List< String> > -
Trashes every leftover checkout in
workspacePathand returns the<org>/<repo>labels it moved. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited