Takumi IINO avatar Takumi IINO committed 480be5a

add split practices

Comments (0)

Files changed (2)

rewrite/split-1.sh

+#!/bin/sh
+
+rm -rf $(basename $0 .sh)
+hg init $(basename $0 .sh)
+(
+cd $(basename $0 .sh)
+
+cat << EOT > .hg/hgrc
+[extensions]
+mq =
+EOT
+
+touch file0; hg add; hg commit -m "add file0"
+touch file1;
+touch file2;
+touch file3;
+touch file4;
+touch file5;
+hg add;
+hg commit -m "add files"
+
+echo "課題" $(basename $0 .sh)
+echo "file1からfile5までが1つのコミットになっています。"
+echo "1つのコミットで1つのファイルが追加されるように"
+echo "コミットを分割してください。"
+echo ""
+echo "ヒント:"
+echo "hg qrefresh FILE"
+
+)

rewrite/split-2.sh

+#!/bin/sh
+
+rm -rf $(basename $0 .sh)
+hg init $(basename $0 .sh)
+(
+cd $(basename $0 .sh)
+
+cat << EOT > .hg/hgrc
+[extensions]
+mq =
+EOT
+
+echo "あいうえお" >> 50on.txt
+echo "かきくけこ" >> 50on.txt
+echo "さしすせそ" >> 50on.txt
+echo "たちつてと" >> 50on.txt
+echo "なにぬねの" >> 50on.txt
+hg add 50on.txt
+hg commit -m "add 50on.txt"
+echo "はひふへほ" >> 50on.txt
+echo "まみむめも" >> 50on.txt
+echo "や ゆ よ" >> 50on.txt
+echo "らりるれろ" >> 50on.txt
+echo "わ   を" >> 50on.txt
+echo "ん" >> 50on.txt
+hg commit -m "update 50on.txt"
+
+echo "課題" $(basename $0 .sh)
+echo "1.revision1で5行追加されています。"
+echo "1コミットで1行追加するようにコミットを分割してください。"
+
+)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.