comparison README @ 160:5c331d941c7f

Update the README a bit
author mpm@selenic.com
date Wed, 25 May 2005 16:40:22 -0800
parents 17884f79d59d
children 1d8e9637a0a4
comparison
equal deleted inserted replaced
159:f9d8620ef469 160:5c331d941c7f
18 18
19 $ cd linux/ 19 $ cd linux/
20 $ hg init # creates .hg 20 $ hg init # creates .hg
21 $ hg status # show changes between repo and working dir 21 $ hg status # show changes between repo and working dir
22 $ hg diff # generate a unidiff 22 $ hg diff # generate a unidiff
23 $ hg export # export a changeset as a diff
24 $ hg addremove # add all unknown files and remove all missing files 23 $ hg addremove # add all unknown files and remove all missing files
25 $ hg commit # commit all changes, edit changelog entry 24 $ hg commit # commit all changes, edit changelog entry
25 $ hg export # export a changeset as a diff
26 26
27 Mercurial will look for a file named .hgignore in the root of your 27 Mercurial will look for a file named .hgignore in the root of your
28 repository contains a set of regular expressions to ignore in file 28 repository contains a set of regular expressions to ignore in file
29 paths. 29 paths.
30 30
31 Mercurial commands: 31 Mercurial commands:
32 32
33 $ hg history # show changesets 33 $ hg history # show changesets
34 $ hg log Makefile # show commits per file 34 $ hg log Makefile # show commits per file
35 $ hg checkout # check out the tip revision 35 $ hg checkout # check out the tip revision
36 $ hg checkout <hash> # check out a specified changeset 36 $ hg checkout <id> # check out a specified changeset
37 # IDs can be tags, revision numbers, or unique
38 # subsets of changeset hash numbers
37 $ hg add foo # add a new file for the next commit 39 $ hg add foo # add a new file for the next commit
38 $ hg remove bar # mark a file as removed 40 $ hg remove bar # mark a file as removed
39 $ hg verify # check repo integrity 41 $ hg verify # check repo integrity
40 $ hg tags # show current tags 42 $ hg tags # show current tags
41 $ hg annotate [files] # show changeset numbers for each file line 43 $ hg annotate [files] # show changeset numbers for each file line
42 $ hg blame [files] # show commit users for each file line
43 44
44 Branching and merging: 45 Branching and merging:
45 46
46 $ cd .. 47 $ cd ..
47 $ mkdir linux-work 48 $ mkdir linux-work
67 Fastest: 68 Fastest:
68 $ cat ../p/patchlist | xargs hg import -p1 -b ../p 69 $ cat ../p/patchlist | xargs hg import -p1 -b ../p
69 70
70 Network support: 71 Network support:
71 72
72 The simple way:
73
74 # pull the self-hosting hg repo 73 # pull the self-hosting hg repo
75 foo$ hg init 74 foo$ hg init
76 foo$ hg merge http://selenic.com/hg/ 75 foo$ hg merge http://selenic.com/hg/
77 foo$ hg checkout # hg co works too 76 foo$ hg checkout # hg co works too
78 77
79 # export your .hg directory as a directory on your webserver 78 # export your current repo via HTTP with browsable interface
80 foo$ ln -s .hg ~/public_html/hg-linux 79 foo$ hg serve -n "My repo" -p 80
80
81 # merge changes from a remote machine
82 bar$ hg merge hg://foo/
83 bar$ hg co # checkout the result
81 84
82 # merge changes from a remote machine 85 # Set up a CGI server on your webserver
83 bar$ hg merge http://foo/~user/hg-linux 86 foo$ cp hgweb.cgi ~/public_html/hg-linux/index.cgi
87 foo$ emacs ~/public_html/hg-linux/index.cgi # adjust the defaults
84 88
85 The new, fast, experimental way:
86
87 # pull the self-hosting hg repo
88 foo$ hg init
89 foo$ hg merge hg://selenic.com/hg/
90 foo$ hg checkout # hg co works too
91
92 # Set up the CGI server on your webserver
93 foo$ ln -s .hg ~/public_html/hg-linux/.hg
94 foo$ cp hgweb.py ~/public_html/hg-linux/index.cgi
95
96 # merge changes from a remote machine
97 bar$ hg merge hg://foo/~user/hg-linux
98
99 Another approach which does perform well right now is to use rsync.
100 Simply rsync the remote repo to a read-only local copy and then do a
101 local pull.
102