Overriding dependencies of crate on Github

I'm trying to override the version of a crate. That crate is both used directly and by another crate on Github. Patching the dependencies and crates.io works fine, but the section [patch."GitHub - John-Nagle/ui-mock"] doesn't seem to do anything. Do I need some other syntax because I'm overriding a specific branch, or what?

Error message is:

------------ expected `EguiRenderRoutine`, found a different `EguiRenderRoutine`
    |
    = note: `EguiRenderRoutine` and `EguiRenderRoutine` have similar names, but are actually distinct types
note: `EguiRenderRoutine` is defined in crate `rend3_egui`
   --> /home/john/.cargo/git/checkouts/rend3-issue570-7a55d7cece9b9b17/03987d8/rend3-egui/src/lib.rs:16:1
    |
16  | pub struct EguiRenderRoutine {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `EguiRenderRoutine` is defined in crate `rend3_egui`
   --> /home/john/.cargo/git/checkouts/rend3-e03f89403de3386a/c7c2d85/rend3-egui/src/lib.rs:16:1

Relevant part of workspace-level Cargo.toml is:

[workspace.dependencies]
#   Currently, issue 570 patch version/
rend3 = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-egui = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-framework = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-routine = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }

libui = { version = "^0.9.4", git = "https://github.com/John-Nagle/ui-mock.git", branch = "arc2" }

[patch.crates-io]
rend3 = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-egui = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-framework = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-routine = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }

libui = { version = "^0.9.4", git = "https://github.com/John-Nagle/ui-mock.git", branch = "arc2" }

[patch."https://github.com/John-Nagle/ui-mock.git"]
rend3 = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-egui = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-framework = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-routine = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }

The problem comes from these lines, which depend on the repo https://github.com/BVE-Reborn/rend3.git:

Add the following to Cargo.toml to override this:

[patch."https://github.com/BVE-Reborn/rend3.git"]
rend3 = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-egui = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-framework = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }
rend3-routine = { version = "^0.3.0", git = 'https://github.com/John-Nagle/rend3-issue570' }

(or, change your John-Nagle/ui-mock repo to not depend on the BVE-Reborn/rend3 repo.)

What you have written is to override dependencies on the ui-mock repository (for the specifically overridden packages). If you want to override the dependencies of the ui-mock repository, do as mbrubeck said.