Fossil SCM
Backed off on the strength of the disapprobation in the new "Converting Repositories on Windows" doc section, being both unnecessary and possibly wrong.
Commit
3e464b026503d1fb7e807d1ea9cbcf7c7f4a48b293615160fc4c47e38a8f8907
Parent
19c347b46004246…
1 file changed
+11
-25
+11
-25
| --- www/inout.wiki | ||
| +++ www/inout.wiki | ||
| @@ -40,36 +40,22 @@ | ||
| 40 | 40 | The above commands work best on proper POSIX systems like Linux, macOS, |
| 41 | 41 | and the BSDs, where everything <tt>git</tt> sends is consumed by |
| 42 | 42 | <tt>fossil</tt> as soon as it can manage, with both programs working |
| 43 | 43 | concurrently. |
| 44 | 44 | |
| 45 | -Windows has problems in this area which we can trace back to MS-DOS, | |
| 46 | -where <tt>command.com</tt> emulated pipes in terms of temporary files. | |
| 47 | -The source program's output was written to disk, and only when that | |
| 48 | -executable stopped was the consuming program launched, with its input | |
| 49 | -silently redirected in from the temporary file in the background. This | |
| 50 | -problem isn't likely to affect you these days unless you boot up an old | |
| 51 | -copy of Windows 98 or similar, being DOS-based, thus having | |
| 52 | -<tt>command.com</tt> as its shell. | |
| 53 | - | |
| 54 | -You may therefore wonder why we dig this historical fact up. Didn't | |
| 55 | -Microsoft correct that in rebuilding their shell as <tt>cmd.exe</tt> for | |
| 56 | -the Windows NT era? Yes, they did, but they then went and broke this | |
| 57 | -underlying assumption <i>again</i> when they later designed PowerShell. | |
| 58 | -Because PS wants to believe everything is an object stream between .NET | |
| 59 | -programs and thus needs to translate expected data formats between them, | |
| 60 | -it falls down when you try to run a command like the above when the size | |
| 61 | -of the translated repository is greater than the size of available | |
| 62 | -memory. PowerShell tries to load the entire fast-export output before | |
| 63 | -sending it out to "<tt>fossil import</tt>," and that only works on | |
| 64 | -sufficiently small repositories. | |
| 65 | - | |
| 45 | +For some reason, the current version of PowerShell included with Windows | |
| 46 | +chokes when you do this when the in-flight repository size exceeds | |
| 47 | +available memory. We do not know why it buffers the entire stream | |
| 48 | +emitted by "<tt>git fast-export</tt>" before sending it along to Fossil, | |
| 49 | +but we've seen the problem recur on multiple machines. | |
| 50 | + | |
| 51 | +While one workaround is to fall back to <tt>cmd.exe</tt> — which doesn't | |
| 52 | +seem to be affected by this problem — we instead recommend using | |
| 66 | 53 | Mirosoft's own [https://learn.microsoft.com/en-us/windows/wsl/ | Windows |
| 67 | -Subsystem for Linux] solves this problem, as do userspace clones like | |
| 68 | -Cygwin and the MSYS2 underpinnings of the two major "Git for Windows" | |
| 69 | -products. You may successfully use any of these systems to do the | |
| 70 | -conversion directly. | |
| 54 | +Subsystem for Linux] or either of the two popular "Git for Windows" | |
| 55 | +distributions based on MSYS2. They handle pipes the POSIX way, avoiding | |
| 56 | +any dependency on the amount of data involved. | |
| 71 | 57 | |
| 72 | 58 | <h2>Fossil → Git</h2> |
| 73 | 59 | |
| 74 | 60 | To convert a Fossil repository into a Git repository, run commands like |
| 75 | 61 | this: |
| 76 | 62 |
| --- www/inout.wiki | |
| +++ www/inout.wiki | |
| @@ -40,36 +40,22 @@ | |
| 40 | The above commands work best on proper POSIX systems like Linux, macOS, |
| 41 | and the BSDs, where everything <tt>git</tt> sends is consumed by |
| 42 | <tt>fossil</tt> as soon as it can manage, with both programs working |
| 43 | concurrently. |
| 44 | |
| 45 | Windows has problems in this area which we can trace back to MS-DOS, |
| 46 | where <tt>command.com</tt> emulated pipes in terms of temporary files. |
| 47 | The source program's output was written to disk, and only when that |
| 48 | executable stopped was the consuming program launched, with its input |
| 49 | silently redirected in from the temporary file in the background. This |
| 50 | problem isn't likely to affect you these days unless you boot up an old |
| 51 | copy of Windows 98 or similar, being DOS-based, thus having |
| 52 | <tt>command.com</tt> as its shell. |
| 53 | |
| 54 | You may therefore wonder why we dig this historical fact up. Didn't |
| 55 | Microsoft correct that in rebuilding their shell as <tt>cmd.exe</tt> for |
| 56 | the Windows NT era? Yes, they did, but they then went and broke this |
| 57 | underlying assumption <i>again</i> when they later designed PowerShell. |
| 58 | Because PS wants to believe everything is an object stream between .NET |
| 59 | programs and thus needs to translate expected data formats between them, |
| 60 | it falls down when you try to run a command like the above when the size |
| 61 | of the translated repository is greater than the size of available |
| 62 | memory. PowerShell tries to load the entire fast-export output before |
| 63 | sending it out to "<tt>fossil import</tt>," and that only works on |
| 64 | sufficiently small repositories. |
| 65 | |
| 66 | Mirosoft's own [https://learn.microsoft.com/en-us/windows/wsl/ | Windows |
| 67 | Subsystem for Linux] solves this problem, as do userspace clones like |
| 68 | Cygwin and the MSYS2 underpinnings of the two major "Git for Windows" |
| 69 | products. You may successfully use any of these systems to do the |
| 70 | conversion directly. |
| 71 | |
| 72 | <h2>Fossil → Git</h2> |
| 73 | |
| 74 | To convert a Fossil repository into a Git repository, run commands like |
| 75 | this: |
| 76 |
| --- www/inout.wiki | |
| +++ www/inout.wiki | |
| @@ -40,36 +40,22 @@ | |
| 40 | The above commands work best on proper POSIX systems like Linux, macOS, |
| 41 | and the BSDs, where everything <tt>git</tt> sends is consumed by |
| 42 | <tt>fossil</tt> as soon as it can manage, with both programs working |
| 43 | concurrently. |
| 44 | |
| 45 | For some reason, the current version of PowerShell included with Windows |
| 46 | chokes when you do this when the in-flight repository size exceeds |
| 47 | available memory. We do not know why it buffers the entire stream |
| 48 | emitted by "<tt>git fast-export</tt>" before sending it along to Fossil, |
| 49 | but we've seen the problem recur on multiple machines. |
| 50 | |
| 51 | While one workaround is to fall back to <tt>cmd.exe</tt> — which doesn't |
| 52 | seem to be affected by this problem — we instead recommend using |
| 53 | Mirosoft's own [https://learn.microsoft.com/en-us/windows/wsl/ | Windows |
| 54 | Subsystem for Linux] or either of the two popular "Git for Windows" |
| 55 | distributions based on MSYS2. They handle pipes the POSIX way, avoiding |
| 56 | any dependency on the amount of data involved. |
| 57 | |
| 58 | <h2>Fossil → Git</h2> |
| 59 | |
| 60 | To convert a Fossil repository into a Git repository, run commands like |
| 61 | this: |
| 62 |