Git Conversion Lazarus: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Git Conversion Lazarus
| Old | New | Line | |
|---|---|---|---|
| 1 | + | This page has the detailed steps used to convert the Lazarus SVN repro to git. | |
| 2 | + | ||
| 3 | + | # SubGIT | |
| 4 | + | ||
| 5 | + | The initial conversion will be done using TMate Subgit. | |
| 6 | + | ||
| 7 | + | ## Install | |
| 8 | + | ||
| 9 | + | Unpack subgit to | |
| 10 | + | ||
| 11 | + | ` ~/subgit/subgit-3.3.11` | |
| 12 | + | ||
| 13 | + | ## Required | |
| 14 | + | ||
| 15 | + | An author.txt file | |
| 16 | + | ||
| 17 | + | ` svn-name - git-name <email>` | |
| 18 | + | ||
| 19 | + | ## Run / main repro | |
| 20 | + | ||
| 21 | + | ` cd ~/subgit/subgit-3.3.11`\ | |
| 22 | + | ` ./bin/subgit configure `[`https://svn.freepascal.org/svn/lazarus`](https://svn.freepascal.org/svn/lazarus)` laz.git`\ | |
| 23 | + | ` `\ | |
| 24 | + | ` gedit laz.git/subgit/config ` | |
| 25 | + | ||
| 26 | + | And add the following (the first line, replaces an existing setting) | |
| 27 | + | ||
| 28 | + | ` [svn]`\ | |
| 29 | + | ` trunk = trunk:refs/heads/main`\ | |
| 30 | + | ` gitCommitMessage = %message\\n\\ngit-svn-id: %branch@%revision -\\n`\ | |
| 31 | + | ` `\ | |
| 32 | + | ` [translate] `\ | |
| 33 | + | ` eols = false`\ | |
| 34 | + | ` otherProperties = false`\ | |
| 35 | + | ` ignores = false` | |
| 36 | + | ||
| 37 | + | The translate options prevent .gitignore and .gitattributes. Those can be translated, but will later be replaced... | |
| 38 | + | ||
| 39 | + | ` cp authors.txt laz.git/subgit/authors.txt` | |
| 40 | + | ||
| 41 | + | ` ./bin/subgit install laz.git` | |
| 42 | + | ||
| 43 | + | Without skipping the gitignore/gitattributes, there will be an error at revision 47330. The process will hang. nterrupt it and edit | |
| 44 | + | ||
| 45 | + | ` gedit lazarus.git/svn/.metadata` | |
| 46 | + | ||
| 47 | + | and set branches-maxRev and tags-maxRev to 47332 (it should be at 47330) <https://stackoverflow.com/questions/18918215/skip-revisions-when-installing-subgit-repository> Continue with | |
| 48 | + | ||
| 49 | + | ` ./bin/subgit install laz-bin.git` | |
| 50 | + | ||
| 51 | + | Stop the daemon | |
| 52 | + | ||
| 53 | + | ` ./bin/subgit shutdown laz-bin.git/` | |
| 54 | + | ||
| 55 | + | ## Run / binaries repro | |
| 56 | + | ||
| 57 | + | ` ./bin/subgit configure `[`https://svn.freepascal.org/svn/lazarus`](https://svn.freepascal.org/svn/lazarus)` laz-bin.git` | |
| 58 | + | ||
| 59 | + | ` gedit laz-bin.git/subgit/config `\ | |
| 60 | + | ` [svn]`\ | |
| 61 | + | ` gitCommitMessage = %message\\n\\ngit-svn-id: %branch@%revision -\\n`\ | |
| 62 | + | ` trunk = binaries:refs/heads/main` | |
| 63 | + | ||
| 64 | + | ` cp authors.txt laz-bin.git/subgit/authors.txt` | |
| 65 | + | ||
| 66 | + | follow the steps above | |
| 67 | + | ||
| 68 | + | ## Run / website repro | |
| 69 | + | ||
| 70 | + | ` ./bin/subgit configure `[`https://svn.freepascal.org/svn/lazaruswebsite`](https://svn.freepascal.org/svn/lazaruswebsite)` laz-web.git` | |
| 71 | + | ||
| 72 | + | ` gedit laz-web.git/subgit/config `\ | |
| 73 | + | ` [svn]`\ | |
| 74 | + | ` gitCommitMessage = %message\\n\\ngit-svn-id: %branch@%revision -\\n`\ | |
| 75 | + | ` trunk = trunk:refs/heads/main` | |
| 76 | + | ||
| 77 | + | ` cp authors.txt laz-web.git/subgit/authors.txt` | |
| 78 | + | ||
| 79 | + | follow the steps above | |
| 80 | + | ||
| 81 | + | # Part 2 | |
| 82 | + | ||
| 83 | + | - Updating gitignore | |
| 84 | + | - Prefixing all issue references with \# | |
| 85 | + | - translating svn revisions to git hashes | |
| 86 | + | ||
| 87 | + | ## Set a git user | |
| 88 | + | ||
| 89 | + | ` git config --local user.email "lazarus@lazarus-ide.org"`\ | |
| 90 | + | ` git config --local user.name "lazarus"` | |
| 91 | + | ||
| 92 | + | ## Clean out left overs from subgit | |
| 93 | + | ||
| 94 | + | ` git for-each-ref --format="%(refname)" refs/svn/ | xargs -n 1 git update-ref -d` | |
| 95 | + | ||
| 96 | + | ## Clean left overs from binaries | |
| 97 | + | ||
| 98 | + | There are a few tags, that lead to binaries (gdb.exe) ending up in the data | |
| 99 | + | ||
| 100 | + | ` git tag -d binaries_0_9_26`\ | |
| 101 | + | ` git tag -d binaries_0_9_26_2`\ | |
| 102 | + | ` git tag -d binaries_0_9_28`\ | |
| 103 | + | ` git tag -d binaries_0_9_30`\ | |
| 104 | + | ` git tag -d binaries_0_9_30_2`\ | |
| 105 | + | ` git tag -d binaries_0_9_30_2RC1`\ | |
| 106 | + | ` git tag -d binaries_1_0` | |
| 107 | + | ||
| 108 | + | ## Updating gitignore/gitattributes / Prefix issues with \# | |
| 109 | + | ||
| 110 | + | The below combines the 2 steps. It can be run in 2 separate calls. | |
| 111 | + | ||
| 112 | + | It will run for about one hour. | |
| 113 | + | ||
| 114 | + | <s> | |
| 115 | + | ||
| 116 | + | ` FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --index-filter ' cp ~/subgit/subgit-3.3.11/.gitignore ~/subgit/subgit-3.3.11/.gitattributes . ; git add .gitignore .gitattributes ' --msg-filter ' perl -ne "while (s/((?:iss?ues?|[ (](?:bugs?|mantis|fix|fixes|patch)\b)(?: +id)?[ :]+(?:#?0*[1-9][0-9]{2,4}(?: *(?:[ ,]| and ) *))*)(0*[1-9][0-9]{2,4})\b/\1#\2/i) {}; print" ' -f -- --all` | |
| 117 | + | ||
| 118 | + | </s> | |
| 119 | + | ||
| 120 | + | ` FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --msg-filter ' perl -ne "while (s/((?:iss?ues?|[ (](?:bugs?|mantis|fix|fixes|patch)\b)(?: +id)?[ :]+(?:#?0*[1-9][0-9]{2,4}(?: *(?:[ ,]| and ) *))*)(0*[1-9][0-9]{2,4})\b/\1#\2/i) {}; print" ' -f -- --all` | |
| 121 | + | ||
| 122 | + | Cleanup | |
| 123 | + | ||
| 124 | + | ` git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d`\ | |
| 125 | + | ` git reflog expire --expire=now --all ;git gc --prune=now` | |
| 126 | + | ||
| 127 | + | ## Translating references to svn rev (r12345) to \#hash | |
| 128 | + | ||
| 129 | + | This must be the very last filter-branch. As each filter-branch creates new hashes for the commits, and that would invalidate the hash refs created here. | |
| 130 | + | ||
| 131 | + | - The first batch will update only commits it branch main. | |
| 132 | + | ||
| 133 | + | ||
| 134 | + | This will also only be references to other commits in main. | |
| 135 | + | ||
| 136 | + | Merges from branches to main can not be updated. | |
| 137 | + | ||
| 138 | + | - The 2nd batch will update only commits in branches. This means the hashes for the main branch will be left intact. | |
| 139 | + | ||
| 140 | + | ||
| 141 | + | This will update merges from main to fixes | |
| 142 | + | ||
| 143 | + | To verify the 2nd batch does not update the main branch compare the hash for **git log -n1 main**. It should not be changed by the 2nd batch. | |
| 144 | + | ||
| 145 | + | ` rm -rf /tmp/rmap`\ | |
| 146 | + | ` mkdir /tmp/rmap`\ | |
| 147 | + | ` git rev-list main | xargs -L1 /bin/sh -c 'a=$( git log -n1 --pretty='%B' $0 | grep "git-svn-id: .*@[0-9][0-9]* " | sed "s/.*@`$`[0-9]*`$` .*/\1/" ) ; echo $0 > /tmp/rmap/$a'`\ | |
| 148 | + | ` git rev-list main | xargs -L1 /bin/sh -c 'echo 1 > /tmp/rmap/m_$0'` | |
| 149 | + | ||
| 150 | + | ` FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --msg-filter 'perl -wne "use strict; `\ | |
| 151 | + | ` unless ( -e qq#/tmp/rmap/m_\$ENV{GIT_COMMIT}# ) { print; next; }`\ | |
| 152 | + | ` my %f; foreach(/(?:(?:commit|rev|revisions?|revision`$`s`$`|revert|reverted) +| r)([1-9][0-9]{3,4}\b(?:[\/,-] *[1-9][0-9]{3,4}\b)*)\b/gi) {`\ | |
| 153 | + | ` my \$rvl=\$1; `\ | |
| 154 | + | ` foreach my \$a (split / *[\/,] */, \$rvl) {`\ | |
| 155 | + | ` unless (\$f{\$a}){`\ | |
| 156 | + | ` \$f{\$a}=q/#/;`\ | |
| 157 | + | ` my(\$a1, \$a2) = split / *- */, \$a;`\ | |
| 158 | + | ` my \$c; my \$rh; if( open \$rh, q/</, qq#/tmp/rmap/\$a1#) { \$c=<\$rh>; chomp \$c; }`\ | |
| 159 | + | ` my \$h; if(\$c && (open \$h, q/</, qq#../map/\$c#)) { `\ | |
| 160 | + | ` \$c=<\$h>; chomp \$c; \$c = q/#/.substr \$c, 0,10; `\ | |
| 161 | + | ` if (\$a2) {`\ | |
| 162 | + | ` my \$c2; my \$rh2; if( open \$rh2, q/</, qq#/tmp/rmap/\$a1#) { \$c2=<\$rh2>; chomp \$c2; }`\ | |
| 163 | + | ` my \$h; if(\$c2 && (open \$h, q/</, qq#../map/\$c2#)) { \$c2=<\$h>; chomp \$c2; `\ | |
| 164 | + | ` \$c = \$c.q/-#/.substr( \$c2, 0,10); `\ | |
| 165 | + | ` }`\ | |
| 166 | + | ` else { \$c = \$c.q/..# / unless \$c eq q/#/; warn q/MAP2 FAIL /.\$c2 }`\ | |
| 167 | + | ` }`\ | |
| 168 | + | ` \$f{\$a}=\$c;`\ | |
| 169 | + | ` }`\ | |
| 170 | + | ` else {warn q/MAP1 fail/.\$a;}`\ | |
| 171 | + | ` }} `\ | |
| 172 | + | ` } `\ | |
| 173 | + | ` foreach my \$k (keys %f) { my \$v = \$f{\$k};`\ | |
| 174 | + | ` unless (\$v eq q/#/) { s/([ r,\/]\${k}\b)/\$1 \$v/g; }`\ | |
| 175 | + | ` } `\ | |
| 176 | + | ` warn \$_ if keys %f;`\ | |
| 177 | + | ` print; "`\ | |
| 178 | + | ` ' -f -- --all` | |
| 179 | + | ||
| 180 | + | ` git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d` | |
| 181 | + | ||
| 182 | + | ` rm -rf /tmp/rmap`\ | |
| 183 | + | ` mkdir /tmp/rmap`\ | |
| 184 | + | ` git rev-list --all | xargs -L1 /bin/sh -c 'a=$( git log -n1 --pretty='%B' $0 | grep "git-svn-id: .*@[0-9][0-9]* " | sed "s/.*@`$`[0-9]*`$` .*/\1/" ) ; echo $0 > /tmp/rmap/$a'`\ | |
| 185 | + | ` git rev-list main | xargs -L1 /bin/sh -c 'echo 1 > /tmp/rmap/m_$0'` | |
| 186 | + | ||
| 187 | + | ` FILTER_BRANCH_SQUELCH_WARNING=1 git filter-branch --msg-filter 'perl -wne "use strict; `\ | |
| 188 | + | ` if ( -e qq#/tmp/rmap/m_\$ENV{GIT_COMMIT}# ) { print; next; }`\ | |
| 189 | + | ` my %f; foreach(/(?:(?:commit|rev|revisions?|revision`$`s`$`|revert|reverted) +| r)([1-9][0-9]{3,4}\b(?:[\/,-] *[1-9][0-9]{3,4}\b)*)\b/gi) {`\ | |
| 190 | + | ` my \$rvl=\$1; `\ | |
| 191 | + | ` foreach my \$a (split / *[\/,] */, \$rvl) {`\ | |
| 192 | + | ` unless (\$f{\$a}){`\ | |
| 193 | + | ` \$f{\$a}=q/#/;`\ | |
| 194 | + | ` my(\$a1, \$a2) = split / *- */, \$a;`\ | |
| 195 | + | ` my \$c; my \$rh; if( open \$rh, q/</, qq#/tmp/rmap/\$a1#) { \$c=<\$rh>; chomp \$c; }`\ | |
| 196 | + | ` if (\$c) { unless ( -e qq#/tmp/rmap/m_\$c# ) { `\ | |
| 197 | + | ` my \$h; if(open \$h, q/</, qq#../map/\$c#) { \$c=<\$h>; chomp \$c; }`\ | |
| 198 | + | ` }}`\ | |
| 199 | + | ` if(\$c ) {`\ | |
| 200 | + | ` \$c = q/#/.substr \$c, 0,10; `\ | |
| 201 | + | ` if (\$a2) {`\ | |
| 202 | + | ` my \$c2; my \$rh2; if( open \$rh2, q/</, qq#/tmp/rmap/\$a1#) { \$c2=<\$rh2>; chomp \$c2; }`\ | |
| 203 | + | ` if (\$c2) { unless ( -e qq#/tmp/rmap/m_\$c2# ) { `\ | |
| 204 | + | ` my \$h; if(open \$h, q/</, qq#../map/\$c2#) { \$c2=<\$h>; chomp \$c2; }`\ | |
| 205 | + | ` }}`\ | |
| 206 | + | ` if(\$c2) { \$c = \$c.q/-#/.substr( \$c2, 0,10); }`\ | |
| 207 | + | ` else { \$c = \$c.q/..# / unless \$c eq q/#/; warn q/MAP2 FAIL /.\$c2 }`\ | |
| 208 | + | ` }`\ | |
| 209 | + | ` \$f{\$a}=\$c;`\ | |
| 210 | + | ` }`\ | |
| 211 | + | ` else {warn q/MAP1 fail/.\$a;}`\ | |
| 212 | + | ` }} `\ | |
| 213 | + | ` } `\ | |
| 214 | + | ` foreach my \$k (keys %f) { my \$v = \$f{\$k};`\ | |
| 215 | + | ` unless (\$v eq q/#/) { s/([ r,\/]\${k}\b)/\$1 \$v/g; }`\ | |
| 216 | + | ` } `\ | |
| 217 | + | ` warn \$_ if keys %f;`\ | |
| 218 | + | ` print; "`\ | |
| 219 | + | ` ' -f -- --all` | |
| 220 | + | ||
| 221 | + | ` git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d`\ | |
| 222 | + | ` git reflog expire --expire=now --all ;git gc --prune=now`\ | |
| 223 | + | ` rm -rf /tmp/rmap` | |
| 224 | + | ||
| 225 | + | ## Updating tags | |
| 226 | + | ||
| 227 | + | This must be done **after** all filter-branches | |
| 228 | + | ||
| 229 | + | - Annotate all tags. | |
| 230 | + | - Create some more tags | |
| 231 | + | ||
| 232 | + | This needs the git user being set | |
| 233 | + | ||
| 234 | + | ` git for-each-ref --format="%(refname:short)" refs/tags/ | xargs -L1 /bin/sh -c 'git tag -f -a $0 -m $0 $0 '` | |
| 235 | + | ||
| 236 | + | ` git rev-list --in-commit-order --reverse fixes_2_2..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-2_3" -m "main to version 2.3" $0'`\ | |
| 237 | + | ` git rev-list --in-commit-order --reverse fixes_2_0..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-2_1" -m "main to version 2.1" $0'`\ | |
| 238 | + | ` git rev-list --in-commit-order --reverse fixes_1_8..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-1_9" -m "main to version 1.9" $0'`\ | |
| 239 | + | ` git rev-list --in-commit-order --reverse fixes_1_6..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-1_7" -m "main to version 1.7" $0'`\ | |
| 240 | + | ` git rev-list --in-commit-order --reverse fixes_1_4..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-1_5" -m "main to version 1.5" $0'`\ | |
| 241 | + | ` git rev-list --in-commit-order --reverse fixes_1_2..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-1_3" -m "main to version 1.3" $0'`\ | |
| 242 | + | ` git rev-list --in-commit-order --reverse fixes_1_0..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-1_1" -m "main to version 1.1" $0'`\ | |
| 243 | + | ` git rev-list --in-commit-order --reverse fixes_0_9_30..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-0_9_31" -m "main to version 0.9.31" $0'`\ | |
| 244 | + | ` git rev-list --in-commit-order --reverse fixes_0_9_28..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-0_9_29" -m "main to version 0.9.29" $0'`\ | |
| 245 | + | ` git rev-list --in-commit-order --reverse fixes_0_9_26..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-0_9_27" -m "main to version 0.9.27" $0'`\ | |
| 246 | + | ` git rev-list --in-commit-order --reverse fixes_0_9_24..main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-0_9_25" -m "main to version 0.9.25" $0'`\ | |
| 247 | + | ` git rev-list --in-commit-order --reverse main | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "main-0_0" -m "main init" $0'`\ | |
| 248 | + | ` `\ | |
| 249 | + | ` git rev-list --in-commit-order --reverse main..fixes_2_2 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-2_2" -m "fixes 2.2 branch" $0'`\ | |
| 250 | + | ` git rev-list --in-commit-order --reverse main..fixes_2_0 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-2_0" -m "fixes 2.0 branch" $0'`\ | |
| 251 | + | ` git rev-list --in-commit-order --reverse main..fixes_1_8 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-1_8" -m "fixes 1.8 branch" $0'`\ | |
| 252 | + | ` git rev-list --in-commit-order --reverse main..fixes_1_6 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-1_6" -m "fixes 1.6 branch" $0'`\ | |
| 253 | + | ` git rev-list --in-commit-order --reverse main..fixes_1_4 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-1_4" -m "fixes 1.4 branch" $0'`\ | |
| 254 | + | ` git rev-list --in-commit-order --reverse main..fixes_1_2 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-1_2" -m "fixes 1.2 branch" $0'`\ | |
| 255 | + | ` git rev-list --in-commit-order --reverse main..fixes_1_0 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-1_0" -m "fixes 1.0 branch" $0'`\ | |
| 256 | + | ` git rev-list --in-commit-order --reverse main..fixes_0_9_30 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-0_9_30" -m "fixes 0.9.30 branch" $0'`\ | |
| 257 | + | ` git rev-list --in-commit-order --reverse main..fixes_0_9_28 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-0_9_28" -m "fixes 0.9.28 branch" $0'`\ | |
| 258 | + | ` git rev-list --in-commit-order --reverse main..fixes_0_9_26 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-0_9_26" -m "fixes 0.9.26 branch" $0'`\ | |
| 259 | + | ` git rev-list --in-commit-order --reverse main..fixes_0_9_24 | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-fixes-0_9_24" -m "fixes 0.9.24 branch" $0'`\ | |
| 260 | + | ` `\ | |
| 261 | + | ` git rev-list --in-commit-order --reverse main..free-sparta | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-free-sparta" -m "free-sparta branch" $0'`\ | |
| 262 | + | ` git rev-list --in-commit-order --reverse main..gtk-splitup | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-gtk-splitup" -m "gtk-splitup branch" $0'`\ | |
| 263 | + | ` git rev-list --in-commit-order --reverse main..lcl-smartlink | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-lcl-smartlink" -m "lcl-smartlink branch" $0'`\ | |
| 264 | + | ` git rev-list --in-commit-order --reverse main..listviewsortindicator | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-listviewsortindicator" -m "listviewsortindicator branch" $0'`\ | |
| 265 | + | ` git rev-list --in-commit-order --reverse main..macosfullkeyboardaccess | head -n 1 | xargs -L1 /bin/sh -c 'git tag -a "t-macosfullkeyboardaccess" -m "macosfullkeyboardaccess branch" $0'` | |
| 266 | + | ||
| 267 | + | ## Finish | |
| 268 | + | ||
| 269 | + | edit HEAD to point to main | |
| 270 | + | ||
| 271 | + | ` gedit HEAD` | |
| 272 | + | ||
| 273 | + | ` git remote add origin `[`https://gitlab.com/freepascal.org/lazarus-ide/lazarus_test_conversion_X.git`](https://gitlab.com/freepascal.org/lazarus-ide/lazarus_test_conversion_X.git) | |
| 274 | + | ||
| 275 | + | ` git push --all origin`\ | |
| 276 | + | ` git push --tags origin` | |
| 277 | + | ||
| 278 | + | On gitlab | |
| 279 | + | ||
| 280 | + | - Settings / Repository | |
| 281 | + | - set default gitlab branch\ | |
| 282 | + | \- no autoclose issues on default branch // decide later | |
| 283 | + | - set "reject unverified users" | |
| 284 | + | - protect branches * // no force push | |
| 285 | + | - protect tags: fixes* lazarus* release* main* // maintainers only | |
| 286 | + | ||
| 287 | + | - Settings / Integrations | |
| 288 | + | - External wiki | |
| 289 | + | ||
| 290 | + | - Settings / General | |
| 291 | + | - Disable Wiki, Snippets, Papges, Requirements, Operations, Service Desk, Container, Packages\ | |
| 292 | + | For now also CI, until we use it | |
| 293 | + | - Merge request approvals: Enable "Prevent users from modifying MR approval rules" | |
| 294 | + | - set the avatar | |
| 295 | + | - Add "description" | |
| 296 | + | - Make public | |
| 297 | + | - Disable "Users can request access" | |
| 298 | + | ||
| 299 | + | # Comparing data before/after filter-branch | |
| 300 | + | ||
| 301 | + | With subject line / Will show changes in subject | |
| 302 | + | ||
| 303 | + | ` git log --pretty='format:%ae %an %cd %s %d' --graph --all > ../log.txt` | |
| 304 | + | ||
| 305 | + | Without subject line / Should have no diff | |
| 306 | + | ||
| 307 | + | - This compares the graph and committers =\> Thus it will show if all commits are present, and if all branches are correct | |
| 308 | + | ||
| 309 | + | ` git log --pretty='format:%ae %an %cd %d' --graph --all > ../log.txt` | |
| 310 | + | ||
| 311 | + | - compare the changes to files (gitignore / gitattributes will diff for the top commit(s)) / --graph can be added too | |
| 312 | + | ||
| 313 | + | ||
| 314 | + | (slow) | |
| 315 | + | ||
| 316 | + | ` git log --all --pretty='%ae %an %cd %d' --stat > ../statlog.txt` | |
| 317 | + | ||
| 318 | + | - Compare the overall amount of lines in the log. | |
| 319 | + | ||
| 320 | + | ` git log --all | wc -l` | |
| 321 | + | ||
| 322 | + | Make sure you do that after "clean up" in each step. Otherwise the internal subgit or filter-branch revs will go into the compare. | |
| 323 | + | ||
| 324 | + | Also "removing the binaries" introduces a diff. | |
| 325 | + | ||
| 326 | + | # Data | |
| 327 | + | ||
| 328 | + | Please mail me for any changes. Do not make changes here. Otherwise the changes will not make it into the conversion. | |
| 329 | + | ||
| 330 | + | ## .gitignore | |
| 331 | + | ||
| 332 | + | ` **/*.o`\ | |
| 333 | + | ` **/*.ppu`\ | |
| 334 | + | ` **/*.exe`\ | |
| 335 | + | ` **/*.bak`\ | |
| 336 | + | ` **/*.diff`\ | |
| 337 | + | ` **/*.patch`\ | |
| 338 | + | ` **/units/`\ | |
| 339 | + | ` **/lib/`\ | |
| 340 | + | ` **/*;[1-9]`\ | |
| 341 | + | ` **/*.~*`\ | |
| 342 | + | ` **/*.*~`\ | |
| 343 | + | ` **/*.fpcunit.ini`\ | |
| 344 | + | ` **/*.lps`\ | |
| 345 | + | ` **/*.compiled`\ | |
| 346 | + | ` /docs/chm/**/*.chm`\ | |
| 347 | + | ` /docs/chm/**/*.xct`\ | |
| 348 | + | ` /docs/chm/**/*.kwd`\ | |
| 349 | + | ` /docs/chm/**/*.txt`\ | |
| 350 | + | ` /libeay32.dll`\ | |
| 351 | + | ` /ssleay32.dll`\ | |
| 352 | + | ` /lazarus.cfg`\ | |
| 353 | + | ` ide/revision.inc`\ | |
| 354 | + | ` `\ | |
| 355 | + | ` !**/patches/*.patch`\ | |
| 356 | + | ` !**/patches/*.diff` | |
| 357 | + | ||
| 358 | + | ## .gitattributes | |
| 359 | + | ||
| 360 | + | ` * text=auto !eol`\ | |
| 361 | + | ` **/*.pp text`\ | |
| 362 | + | ` **/*.pas text`\ | |
| 363 | + | ` **/*.inc text`\ | |
| 364 | + | ` **/*.lfm text`\ | |
| 365 | + | ` **/*.lrs text`\ | |
| 366 | + | ` **/*.lps text`\ | |
| 367 | + | ` **/*.lpr text`\ | |
| 368 | + | ` **/*.lpi text`\ | |
| 369 | + | ` **/*.lpk text`\ | |
| 370 | + | ` **/*.lpl text`\ | |
| 371 | + | ` **/*.lrj text`\ | |
| 372 | + | ` **/*.dpr text`\ | |
| 373 | + | ` **/*.dfm text`\ | |
| 374 | + | ` **/*.pot text`\ | |
| 375 | + | ` **/*.po text`\ | |
| 376 | + | ` **/*.rc text`\ | |
| 377 | + | ` **/*.txt text`\ | |
| 378 | + | ` **/*.txt.sample text`\ | |
| 379 | + | ` **/*.ini text`\ | |
| 380 | + | ` **/*.cfg text`\ | |
| 381 | + | ` **/*.iss text`\ | |
| 382 | + | ` **/*.isl text`\ | |
| 383 | + | ` **/*.xml text`\ | |
| 384 | + | ` **/*.xsl text`\ | |
| 385 | + | ` **/*.html text`\ | |
| 386 | + | ` **/*.css text`\ | |
| 387 | + | ` **/*.php text`\ | |
| 388 | + | ` **/*.js text`\ | |
| 389 | + | ` **/.htaccess text`\ | |
| 390 | + | ` **/*.patch text`\ | |
| 391 | + | ` **/*.md text`\ | |
| 392 | + | ` **/*.bat text`\ | |
| 393 | + | ` **/*.sh text`\ | |
| 394 | + | ` **/*.compiled text`\ | |
| 395 | + | ` **/*.bdsproj text`\ | |
| 396 | + | ` **/*.plist text`\ | |
| 397 | + | ` **/*.h text`\ | |
| 398 | + | ` **/*.c text`\ | |
| 399 | + | ` **/*.cpp text`\ | |
| 400 | + | ` **/*.in text`\ | |
| 401 | + | ` **/*.xpm text`\ | |
| 402 | + | ` **/*.svg text`\ | |
| 403 | + | ` **/Makefile text`\ | |
| 404 | + | ` **/Makefile.compiled text`\ | |
| 405 | + | ` **/Makefile.fpc text`\ | |
| 406 | + | ` **/*.exe -text`\ | |
| 407 | + | ` **/*.dll -text`\ | |
| 408 | + | ` **/*.so -text`\ | |
| 409 | + | ` **/*.gif -text`\ | |
| 410 | + | ` **/*.jpg -text`\ | |
| 411 | + | ` **/*.ico -text`\ | |
| 412 | + | ` **/*.bmp -text`\ | |
| 413 | + | ` **/*.res -text`\ | |
| 414 | + | ` **/*.ttf -text`\ | |
| 415 | + | ` **/*.cur -text`\ | |
| 416 | + | ` **/*.db3 -text`\ | |
| 417 | + | ` **/*.dbf -text`\ | |
| 418 | + | ` **/*.mbf -text`\ | |
| 419 | + | ` **/*.mdx -text`\ | |
| 420 | + | ` **/*.fbk -text`\ | |
| 421 | + | ` **/*.odt -text`\ | |
| 422 | + | ` **/*.ods -text`\ | |
| 423 | + | ` **/*.odg -text`\ | |
| 424 | + | ` **/*.odp -text`\ | |
| 425 | + | ` **/*.xls -text`\ | |
| 426 | + | ` **/*.pdf -text`\ | |
| 427 | + | ` **/*.zip -text`\ | |
| 428 | + | ` **/*.rar -text`\ | |
| 429 | + | ` **/*.tar -text`\ | |
| 430 | + | ` **/*.tgz -text`\ | |
| 431 | + | ` **/*.gz -text`\ | |
| 432 | + | ` **/*.icns -text`\ | |
| 433 | + | ` **/*.dcr -text`\ | |
| 434 | + | ` components/aggpas/**/*.ppm -text`\ | |
| 435 | + | ` **/*.app/Contents/MacOS/* -text` | |
| 436 | + | ||
| 437 | + | --- | |
| 438 | + | *From the Free Pascal wiki, page "Git Conversion Lazarus", as it stood on 2021-07-28 after a change by Martin, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 439 | + | Category: Version Control |
