คำสั่ง Clone
hg clone [OPTION]... SOURCE [DEST]
การ clone repository คือการทำสำเนาของ repository ณ เวลาใดเวลาหนึ่ง โดย repository ใหม่นี้จะมีประวัติทุกอย่างครบถ้วนในตัวของมันเอง
repository ที่ถูกทำสำเนานั้นไม่เหมือนกับการแตกกิ่ง
คำสั่ง clone จะดึงไฟล์จากส่วนปลายของกิ่ง หลัก (หรือจะเรียกว่ากิ่งที่ไม่มีชื่อก็ได้) (ลองดู กิ่งที่มีชื่อ) เพราะฉะนั้นคุณควรจะปล่อยกิ่งหลักของคุณให้ไม่มีชื่ออยู่เหมือนเดิม 1
ตัวช่วยเหลือ: http://www.selenic.com/mercurial/hg.1.html#clone
ดู: บทเรียนการทำสำเนา repository, ThaiCommunicatingChanges, คำสั่ง pull, ThaiWorkingPractices, ThaiRepoSamples
หมายเหตุ
การรายงานความคืบหน้าเมื่อทำสำเนา repository ขนาดใหญ่
ในตอนนี้ยังไม่มีวิธีใดที่ทำให้เราสามารถเห็นความคืบหน้าระหว่างการทำสำเนา repository ขนาดใหญ่ได้ สำหรับวิธีแก้ขัดให้ใช้ตัวเลือก --debug ไปก่อน:
> hg clone --debug http://www.selenic.com/repo/hello my-hello using http://www.selenic.com/repo/hello sending heads command requesting all changes sending changegroup command adding changesets add changeset 0a04b987be5a add changeset 82e55d328c8c adding manifests adding file changes adding Makefile revisions adding hello.c revisions added 2 changesets with 2 changes to 2 files updating the branch cache updating working directory resolving manifests overwrite False partial False ancestor 000000000000 local 000000000000+ remote 82e55d328c8c Makefile: remote created -> g hello.c: remote created -> g getting Makefile getting hello.c 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
อีกวิธีนึงที่อาจช่วยได้คือการทำสำเนาทีละส่วนโดยใช้ hg clone --rev <revision>
ลองดู: http://selenic.com/pipermail/mercurial-devel/2008-April/006067.html
