== บทเรียน - การติดตั้ง Mercurial == ''(บทนี้เป็นบทแรกใน [[ThaiTutorial|บทเรียนการใช้งาน Mercurial]] บทถัดไปคือ [[ThaiTutorialClone|ทำสำเนา 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 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|คอมมิท]] ซึ่งรูปแบบนี้ไม่ค่อยมีความหมายเท่าไรนัก เราแนะนำให้คุณเปลี่ยนชื่อผู้ใช้ของคุณในไฟล์ `~/.hgrc` โดยใช้อีเมล์ของคุณมากกว่า (ในวินโดวส์ไฟล์นี้จะอยู่ที่ `%USERPROFILE%\Mercurial.ini`, MercurialIni) โดยเพิ่มบรรทัดต่อไปนี้: {{{ [ui] username = John Doe }}} หลังจากเพิ่มบรรทัดดังกล่าวและบันทึก เราก็ไปที่[[ThaiTutorialClone|บทต่อไป]]กันเลย ---- CategoryTutorial CategoryThai