comparison README @ 3516:54246ac4b652

Merge with mpm
author Brendan Cully <brendan@kublai.com>
date Wed, 25 Oct 2006 15:10:30 -0700
parents 72efff4be2ad
children 25e549e9b7d0
comparison
equal deleted inserted replaced
3511:060aefba4459 3516:54246ac4b652
35 35
36 $ hg init project # creates project directory 36 $ hg init project # creates project directory
37 $ cd project 37 $ cd project
38 # copy files in, edit them 38 # copy files in, edit them
39 $ hg add # add all unknown files 39 $ hg add # add all unknown files
40 $ hg remove --after # remove deleted files
41 $ hg commit # commit all changes, edit changelog entry 40 $ hg commit # commit all changes, edit changelog entry
42 41
43 Mercurial will look for a file named .hgignore in the root of your 42 Mercurial will look for a file named .hgignore in the root of your
44 repository which contains a set of regular expressions to ignore in 43 repository which contains a set of regular expressions to ignore in
45 file paths. 44 file paths.
46 45
47 Branching and merging: 46 Branching and merging:
48 47
49 $ hg clone linux linux-work # create a new branch 48 $ hg clone project project-work # create a new branch
50 $ cd linux-work 49 $ cd project-work
51 $ <make changes> 50 $ <make changes>
52 $ hg commit 51 $ hg commit
53 $ cd ../linux 52 $ cd ../project
54 $ hg pull ../linux-work # pull changesets from linux-work 53 $ hg pull ../project-work # pull changesets from project-work
55 $ hg merge # merge the new tip from linux-work into 54 $ hg merge # merge the new tip from project-work into
56 # our working directory 55 # our working directory
57 $ hg commit # commit the result of the merge 56 $ hg commit # commit the result of the merge
58 57
59 Importing patches: 58 Importing patches:
60 59
61 Fast: 60 Simple:
62 $ patch < ../p/foo.patch 61 $ patch < ../p/foo.patch
63 $ hg commit -A 62 $ hg commit -A
64 63
65 Faster: 64 Fast:
66 $ patch < ../p/foo.patch
67 $ hg commit `lsdiff -p1 ../p/foo.patch`
68
69 Fastest:
70 $ cat ../p/patchlist | xargs hg import -p1 -b ../p 65 $ cat ../p/patchlist | xargs hg import -p1 -b ../p
71 66
72 Exporting a patch: 67 Exporting a patch:
73 68
74 (make changes) 69 (make changes)
75 $ hg commit 70 $ hg commit
76 $ hg tip 71 $ hg export tip > foo.patch # export latest change
77 28237:747a537bd090880c29eae861df4d81b245aa0190
78 $ hg export 28237 > foo.patch # export changeset 28237
79 72
80 Network support: 73 Network support:
81 74
82 # pull from the primary Mercurial repo 75 # pull from the primary Mercurial repo
83 foo$ hg clone http://selenic.com/hg/ 76 foo$ hg clone http://selenic.com/hg/