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