Differences between revisions 2 and 3
Revision 2 as of 2008-11-19 10:12:18
Size: 3298
Comment: Change link to ThaiTutorialClone.
Revision 3 as of 2008-11-20 15:10:56
Size: 3302
Comment: Link to Thai translation of WindowsInstall
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
 * สำหรับวินโดวส์ ให้ทำตามขั้นตอนใน WindowsInstall  * สำหรับวินโดวส์ ให้ทำตามขั้นตอนใน ThaiWindowsInstall

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

(หน้านี้เป็นหน้าแรกจาก 9 หน้าใน [:ThaiTutorial:บทเรียน] การใช้งาน Mercurial หน้าต่อไปคือ [:ThaiTutorialClone])

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

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

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

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

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

เอาล่ะ ทีนี้เมื่อคุณได้ติดตั้ง Mercurial เรียบร้อยแล้ว ก็น่าจะสามารถพิมพ์คำสั่ง hg ที่ prompt และโปรแกรม 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 สำหรับ [:Commit:commits] ซึ่งรูปแบบนี้ไม่ค่อยมีความหมายเท่าไรนัก คุณควรจะใช้ที่อยู่อีเมล์ของคุณในไฟล์ ~/.hgrc มากกว่า (ในวินโดวส์จะอยู่ที่ %USERPROFILE%\Mercurial.ini, MercurialIni) โดยเพิ่มบรรทัดต่อไปนี้:

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

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


CategoryTutorial

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