Differences between revisions 5 and 6
Revision 5 as of 2008-11-21 09:39:54
Size: 3468
Comment: Put into Thai category
Revision 6 as of 2009-05-19 19:30:57
Size: 3472
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
''(บทนี้เป็นบทแรกใน [:ThaiTutorial:บทเรียนการใช้งาน Mercurial] บทถัดไปคือ [:ThaiTutorialClone:ทำสำเนา repository ที่มีอยู่])'' ''(บทนี้เป็นบทแรกใน [[ThaiTutorial|บทเรียนการใช้งาน Mercurial]] บทถัดไปคือ [[ThaiTutorialClone|ทำสำเนา repository ที่มีอยู่]])''
Line 42: Line 42:
โดยปกติ Mercurial จะแทนชื่อผู้ใช้ของคุณในรูปแบบ `user@localhost` เวลาคุณ[:Commit:คอมมิท] โดยปกติ Mercurial จะแทนชื่อผู้ใช้ของคุณในรูปแบบ `user@localhost` เวลาคุณ[[Commit|คอมมิท]]
Line 51: Line 51:
หลังจากเพิ่มบรรทัดดังกล่าวและบันทึก เราก็ไปที่[:ThaiTutorialClone:บทต่อไป]กันเลย หลังจากเพิ่มบรรทัดดังกล่าวและบันทึก เราก็ไปที่[[ThaiTutorialClone|บทต่อไป]]กันเลย

บทเรียน - การติดตั้ง Mercurial

(บทนี้เป็นบทแรกใน บทเรียนการใช้งาน Mercurial บทถัดไปคือ ทำสำเนา repository ที่มีอยู่)

การติดตั้ง Mercurial นั้นง่ายนิดเดียว

  • ในลีนุกซ์, แมค OS X, และระบบยูนิกซ์อื่นๆ ให้ทำตามขั้นตอนใน UnixInstall

  • สำหรับวินโดวส์ ให้ทำตามขั้นตอนใน ThaiWindowsInstall

หลังจากคุณติดตั้งโปรแกรมเสร็จแล้วให้กลับมาอ่านหน้านี้ต่อ

โปรแกรม Mercurial มีชื่อว่า hg คำสั่งทุกคำสั่งของ Mercurial จะเริ่มต้นด้วย hg ตามด้วยชื่อคำสั่ง จากนั้นจึงตามด้วยตัวเลือกและ arguments ที่เกี่ยวข้อง

เอาล่ะ ทีนี้เมื่อคุณได้ติดตั้ง Mercurial เรียบร้อยแล้ว ลองพิมพ์คำสั่ง hg ที่คอมมานด์พร๊อมต์ดู โปรแกรม Mercurial จะสรุปคำสั่งหลักๆให้คุณได้อ่าน:

$ hg
Mercurial Distributed SCM

basic commands:

 add        add the specified files on the next commit
 annotate   show changeset information per file line
 clone      make a copy of an existing repository
 commit     commit the specified files or all outstanding changes
 (...)

use "hg help" for the full list of commands or "hg -v" for details

ลองเช็คดูว่าคุณกำลังใช้ Mercurial เวอร์ชั่นไหนอยู่โดยพิมพ์:

$ hg version
Mercurial Distributed SCM (version 1.0)

Copyright (C) 2005-2008 Matt Mackall <mpm@selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE

โดยปกติ Mercurial จะแทนชื่อผู้ใช้ของคุณในรูปแบบ user@localhost เวลาคุณคอมมิท ซึ่งรูปแบบนี้ไม่ค่อยมีความหมายเท่าไรนัก เราแนะนำให้คุณเปลี่ยนชื่อผู้ใช้ของคุณในไฟล์ ~/.hgrc โดยใช้อีเมล์ของคุณมากกว่า (ในวินโดวส์ไฟล์นี้จะอยู่ที่ %USERPROFILE%\Mercurial.ini, MercurialIni) โดยเพิ่มบรรทัดต่อไปนี้:

[ui]
username = John Doe <john@example.com>

หลังจากเพิ่มบรรทัดดังกล่าวและบันทึก เราก็ไปที่บทต่อไปกันเลย


CategoryTutorial CategoryThai

ThaiTutorialInstall (last edited 2009-05-19 19:30:57 by localhost)