User:Glauxosdever/Version Control Software: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
(Add some example design and implementation (merging still to do))
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
(One intermediate revision by the same user not shown)
Line 83:
This file contains four functions as described in the comments. It's still nothing VCS-specific.
 
<sourcesyntaxhighlight lang="python">
# This function reads <filename> into a list of lines.
# The trailing '\n' character of each line is discarded.
Line 109:
lines = [" ".join(wordline) for wordline in wordlines]
writelines(filename, lines)
</syntaxhighlight>
</source>
 
==== init.py ====
Line 115:
This file contains code to initialise an empty repository. You should make it executable.
 
<sourcesyntaxhighlight lang="python">
#! /usr/bin/python
 
Line 131:
if __name__ == "__main__":
main()
</syntaxhighlight>
</source>
 
==== branch.py ====
Line 137:
This file contains code to create an empty branch. You should also make it executable.
 
<sourcesyntaxhighlight lang="python">
#! /usr/bin/python
 
Line 168:
if __name__ == "__main__":
main()
</syntaxhighlight>
</source>
 
==== commit.py ====
Line 176:
You should also make this file executable.
 
<sourcesyntaxhighlight lang="python">
#! /usr/bin/python
 
Line 303:
if __name__ == "__main__":
main()
</syntaxhighlight>
</source>
 
==== fsck.py ====
Line 311:
It is also quite complex, I hope it is correct and that I explained stuff well in the comments. Again, make it executable.
 
<sourcesyntaxhighlight lang="python">
#! /usr/bin/python
 
Line 427:
if __name__ == "__main__":
main()
</syntaxhighlight>
</source>
 
==== merge.py ====