summaryrefslogtreecommitdiff
path: root/sandbox/aa-turner/git_conversion/common_cvs.lift
blob: 2433772154f074b0096d7bd9bba1988d75b495ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Set up options
set canonicalize
set progress
prefer git

# Create macros
define releasetag {
tag create {0} {1}
<{0}> setfield comment "Docutils {0}"
}

# Read in CVS docstring repository
read --no-automatic-ignores --user-ignores <docstring.fi
authors read <docutils.map
prefer git

# Update commit messages
gitify
=C filter dedos

# Remove uneeded "import-1.1.1" branch
:50 squash --delete --quiet

# Combine "*** empty log message ***" commits with neighbours where appropriate
:58 squash --pushback
/Minimal writer./ squash --pushback

# Rename branches
branch rename heads/master heads/docstring

# Rename web directory
path rename "web/(.*)" "web_docstring/\1" --force

# Ensure every commit message ends with a single new line
=C append "\n" --rstrip
=C append "\n"

# Remove autogenerated .gitignore
expunge .gitignore

# Export to git
!mkdir -p cvs_tmp_docstring
write cvs_tmp_docstring/
write >cvs_docstring.fi

# Read in CVS structuredtext repository
read --no-automatic-ignores --user-ignores <structuredtext.fi
authors read <docutils.map
prefer git

# Update commit messages
gitify
=C filter dedos

# Remove uneeded "import-1.1.1" branch
branch delete heads/import-1.1.1
branch delete heads/rel-0-3
branch delete tags/RELEASE

# Fix merge commit and delete redundant branch
:292,:280,:297 reparent --use-order
branch delete heads/Rrefactor-test

# Fix commits in test-refactor branch
:271,:278,:272,:276,:273,:280,:276,:274 reorder
:278 squash --pushback
:276 squash --pushback
:280 squash --pushback
:28 squash --delete --quiet

# Fix first commits
:37 squash --pushback
:30 squash --pushback
:14 setfield comment "initial checkin"

# Remove empty commits
=Z setfield comment "\n"
=Z squash --empty-only --delete

# Rename branches
branch rename heads/master heads/structuredtext

# Rename web directory
path rename "web/(.*)" "web_structuredtext/\1" --force

# Ensure every commit message ends with a single new line
=C append "\n" --rstrip
=C append "\n"

# Remove autogenerated .gitignore
expunge .gitignore

# Export to git
!mkdir -p cvs_tmp_structuredtext
write cvs_tmp_structuredtext/
write >cvs_structuredtext.fi

exit