Show More
@@ -63,7 +63,7 b' Importing patches:' | |||
|
63 | 63 | $ hg commit `lsdiff -p1 ../p/foo.patch` |
|
64 | 64 | |
|
65 | 65 | Fastest: |
|
66 |
$ cat ../p/patchlist | xargs hg import -p1 -b ../p |
|
|
66 | $ cat ../p/patchlist | xargs hg import -p1 -b ../p | |
|
67 | 67 | |
|
68 | 68 | Exporting a patch: |
|
69 | 69 | |
@@ -76,12 +76,12 b' Exporting a patch:' | |||
|
76 | 76 | Network support: |
|
77 | 77 | |
|
78 | 78 | # pull from the primary Mercurial repo |
|
79 |
foo$ hg clone http://selenic.com/hg/ |
|
|
79 | foo$ hg clone http://selenic.com/hg/ | |
|
80 | 80 | foo$ cd hg |
|
81 | 81 | |
|
82 | 82 | # export your current repo via HTTP with browsable interface |
|
83 | 83 | foo$ hg serve -n "My repo" -p 80 |
|
84 | ||
|
84 | ||
|
85 | 85 | # pushing changes to a remote repo with SSH |
|
86 | 86 | foo$ hg push ssh://user@example.com/~/hg/ |
|
87 | 87 |
@@ -3,7 +3,7 b' storage revlog delta compr' | |||
|
3 | 3 | storage naming by filename by revision hash by filename |
|
4 | 4 | merge file DAGs changeset DAG file DAGs? |
|
5 | 5 | consistency SHA1 SHA1 CRC |
|
6 |
signable? yes yes no |
|
|
6 | signable? yes yes no | |
|
7 | 7 | |
|
8 | 8 | retrieve file tip O(1) O(1) O(revs) |
|
9 | 9 | add rev O(1) O(1) O(revs) |
@@ -3,10 +3,10 b'' | |||
|
3 | 3 | _hg_commands() |
|
4 | 4 | { |
|
5 | 5 | local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \ |
|
6 |
|
|
|
6 | -e '/^global options:/,$d' \ | |
|
7 | 7 | -e '/^ [^ ]/!d; s/[,:]//g;')" |
|
8 | ||
|
9 |
# hide debug commands from users, but complete them if |
|
|
8 | ||
|
9 | # hide debug commands from users, but complete them if | |
|
10 | 10 | # specifically asked for |
|
11 | 11 | if [[ "$cur" == de* ]]; then |
|
12 | 12 | commands="$commands debugcheckstate debugstate debugindex" |
@@ -62,7 +62,7 b'' | |||
|
62 | 62 | cur="$2" |
|
63 | 63 | prev="$3" |
|
64 | 64 | |
|
65 |
# searching for the command |
|
|
65 | # searching for the command | |
|
66 | 66 | # (first non-option argument that doesn't follow a global option that |
|
67 | 67 | # receives an argument) |
|
68 | 68 | for (( i=1; $i<=$COMP_CWORD; i++ )); do |
@@ -160,7 +160,7 b'' | |||
|
160 | 160 | COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" )) |
|
161 | 161 | fi |
|
162 | 162 | ;; |
|
163 |
*) |
|
|
163 | *) | |
|
164 | 164 | COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" )) |
|
165 | 165 | ;; |
|
166 | 166 | esac |
@@ -2113,7 +2113,7 b' proc selectline {l isnew} {' | |||
|
2113 | 2113 | } |
|
2114 | 2114 | $ctext insert end "\n" |
|
2115 | 2115 | } |
|
2116 | ||
|
2116 | ||
|
2117 | 2117 | set comment {} |
|
2118 | 2118 | if {[info exists parents($id)]} { |
|
2119 | 2119 | foreach p $parents($id) { |
@@ -86,7 +86,7 b' def difftree(ui, repo, node1=None, node2' | |||
|
86 | 86 | |
|
87 | 87 | for f in c: |
|
88 | 88 | # TODO get file permissions |
|
89 |
print ":100664 100664 %s %s M\t%s\t%s" % (hg.hex(mmap[f]), |
|
|
89 | print ":100664 100664 %s %s M\t%s\t%s" % (hg.hex(mmap[f]), | |
|
90 | 90 | hg.hex(mmap2[f]), f, f) |
|
91 | 91 | for f in a: |
|
92 | 92 | print ":000000 100664 %s %s N\t%s\t%s" % (empty, hg.hex(mmap2[f]), f, f) |
@@ -137,7 +137,7 b' def catcommit(repo, n, prefix, changes=N' | |||
|
137 | 137 | committer = lines[-1].split(': ')[1].rstrip() |
|
138 | 138 | else: |
|
139 | 139 | committer = "%s %s %s" % (changes[1], date, date_ar[1]) |
|
140 | ||
|
140 | ||
|
141 | 141 | print "author %s %s %s" % (changes[1], date, date_ar[1]) |
|
142 | 142 | print "committer %s" % (committer) |
|
143 | 143 | print "" |
@@ -220,7 +220,7 b' def revtree(args, repo, full="tree", max' | |||
|
220 | 220 | yield (i + x, full != None and l[x] or None) |
|
221 | 221 | if i == 0: |
|
222 | 222 | break |
|
223 | ||
|
223 | ||
|
224 | 224 | # calculate and return the reachability bitmask for sha |
|
225 | 225 | def is_reachable(ar, reachable, sha): |
|
226 | 226 | if len(ar) == 0: |
@@ -262,7 +262,7 b' repository-related commands."' | |||
|
262 | 262 | 'hg-commit-mouse-clicked) |
|
263 | 263 | (define-key hg-commit-mode-file-map " " 'hg-commit-toggle-file) |
|
264 | 264 | (define-key hg-commit-mode-file-map "\r" 'hg-commit-toggle-file) |
|
265 | ||
|
265 | ||
|
266 | 266 | |
|
267 | 267 | ;;; Convenience functions. |
|
268 | 268 | |
@@ -327,7 +327,7 b' all buffers visiting files in the reposi' | |||
|
327 | 327 | (vc-buffer-sync)) |
|
328 | 328 | (hg-do-across-repo path |
|
329 | 329 | (vc-buffer-sync))))) |
|
330 | ||
|
330 | ||
|
331 | 331 | (defun hg-buffer-commands (pnt) |
|
332 | 332 | "Use the properties of a character to do something sensible." |
|
333 | 333 | (interactive "d") |
@@ -402,7 +402,7 b' Each key is of the form (section . name)' | |||
|
402 | 402 | (key (split-string left "\\.")) |
|
403 | 403 | (value (hg-replace-in-string right "\\\\n" "\n" t))) |
|
404 | 404 | (setq items (cons (cons (cons (car key) (cadr key)) value) items)))))) |
|
405 | ||
|
405 | ||
|
406 | 406 | (defun hg-config-section (section config) |
|
407 | 407 | "Return an alist of (name . value) pairs for SECTION of CONFIG." |
|
408 | 408 | (let (items) |
@@ -522,7 +522,7 b' current frame."' | |||
|
522 | 522 | (when file-name |
|
523 | 523 | (set (make-local-variable 'hg-view-file-name) |
|
524 | 524 | (hg-abbrev-file-name file-name)))) |
|
525 | ||
|
525 | ||
|
526 | 526 | (defun hg-file-status (file) |
|
527 | 527 | "Return status of FILE, or nil if FILE does not exist or is unmanaged." |
|
528 | 528 | (let* ((s (hg-run "status" file)) |
@@ -591,7 +591,7 b' to have moved a little, but not really c' | |||
|
591 | 591 | (mark-context (let ((mark (mark-marker))) |
|
592 | 592 | (and mark (hg-position-context mark))))) |
|
593 | 593 | (list point-context mark-context))) |
|
594 | ||
|
594 | ||
|
595 | 595 | (defun hg-find-context (ctx) |
|
596 | 596 | "Attempt to find a context in the given buffer. |
|
597 | 597 | Always returns a valid, hopefully sane, position." |
@@ -740,7 +740,7 b' With a prefix argument, prompt for the p' | |||
|
740 | 740 | (add-text-properties bol (point) '(face bold)) |
|
741 | 741 | (message "%s will be committed" |
|
742 | 742 | (buffer-substring bol (point))))))) |
|
743 | ||
|
743 | ||
|
744 | 744 | (defun hg-commit-mouse-clicked (event) |
|
745 | 745 | "Toggle whether or not the file at POS will be committed." |
|
746 | 746 | (interactive "@e") |
@@ -927,7 +927,7 b' With a prefix argument, prompt for the p' | |||
|
927 | 927 | (when update |
|
928 | 928 | (with-current-buffer buf |
|
929 | 929 | (hg-mode-line))))) |
|
930 | ||
|
930 | ||
|
931 | 931 | (defun hg-incoming (&optional repo) |
|
932 | 932 | "Display changesets present in REPO that are not present locally." |
|
933 | 933 | (interactive (list (hg-read-repo-name " where changes would come from"))) |
@@ -2,14 +2,14 b'' | |||
|
2 | 2 | # tcsh completion for Mercurial |
|
3 | 3 | # |
|
4 | 4 | # This file has been auto-generated by tcsh_completion_build.sh for |
|
5 |
# Mercurial Distributed SCM (version 325c07fd2ebd) |
|
|
5 | # Mercurial Distributed SCM (version 325c07fd2ebd) | |
|
6 | 6 | # |
|
7 | 7 | # Copyright (C) 2005 TK Soh. |
|
8 | 8 | # |
|
9 | 9 | # This is free software; you can redistribute it and/or modify it under |
|
10 | 10 | # the terms of the GNU General Public License as published by the Free |
|
11 | 11 | # Software Foundation; either version 2 of the License, or (at your |
|
12 |
# option) any later version. |
|
|
12 | # option) any later version. | |
|
13 | 13 | # |
|
14 | 14 | |
|
15 | 15 | complete hg \ |
@@ -9,7 +9,7 b'' | |||
|
9 | 9 | # This is free software; you can redistribute it and/or modify it under |
|
10 | 10 | # the terms of the GNU General Public License as published by the Free |
|
11 | 11 | # Software Foundation; either version 2 of the License, or (at your |
|
12 |
# option) any later version. |
|
|
12 | # option) any later version. | |
|
13 | 13 | # |
|
14 | 14 | # |
|
15 | 15 | # Description |
@@ -55,14 +55,14 b' cat > $tcsh_file <<END' | |||
|
55 | 55 | # tcsh completion for Mercurial |
|
56 | 56 | # |
|
57 | 57 | # This file has been auto-generated by $script_name for |
|
58 |
# $hg_version |
|
|
58 | # $hg_version | |
|
59 | 59 | # |
|
60 | 60 | # Copyright (C) 2005 TK Soh. |
|
61 | 61 | # |
|
62 | 62 | # This is free software; you can redistribute it and/or modify it under |
|
63 | 63 | # the terms of the GNU General Public License as published by the Free |
|
64 | 64 | # Software Foundation; either version 2 of the License, or (at your |
|
65 |
# option) any later version. |
|
|
65 | # option) any later version. | |
|
66 | 66 | # |
|
67 | 67 | |
|
68 | 68 | complete hg \\ |
@@ -202,7 +202,7 b' copy <source ...> <dest>::' | |||
|
202 | 202 | -X, --exclude <pat> exclude names matching the given patterns |
|
203 | 203 | -f, --force forcibly copy over an existing managed file |
|
204 | 204 | -p, --parents append source path to dest |
|
205 | ||
|
205 | ||
|
206 | 206 | aliases: cp |
|
207 | 207 | |
|
208 | 208 | diff [-a] [-r revision] [-r revision] [files ...]:: |
@@ -61,7 +61,7 b' This section describes the different sec' | |||
|
61 | 61 | Mercurial "hgrc" file, the purpose of each section, its possible |
|
62 | 62 | keys, and their possible values. |
|
63 | 63 | |
|
64 |
decode/encode:: |
|
|
64 | decode/encode:: | |
|
65 | 65 | Filters for transforming files on checkout/checkin. This would |
|
66 | 66 | typically be used for newline processing or other |
|
67 | 67 | localization/canonicalization of files. |
@@ -685,7 +685,7 b' class hgweb:' | |||
|
685 | 685 | encoding = "gzip" |
|
686 | 686 | else: |
|
687 | 687 | encoding = "x-bzip2" |
|
688 |
req.header([('Content-type', 'application/x-tar'), |
|
|
688 | req.header([('Content-type', 'application/x-tar'), | |
|
689 | 689 | ('Content-disposition', 'attachment; filename=%s%s%s' % |
|
690 | 690 | (name[:-1], '.tar.', type)), |
|
691 | 691 | ('Content-encoding', encoding)]) |
@@ -1,4 +1,4 b'' | |||
|
1 |
# packagescan.py - Helper module for identifing used modules. |
|
|
1 | # packagescan.py - Helper module for identifing used modules. | |
|
2 | 2 | # Used for the py2exe distutil. |
|
3 | 3 | # |
|
4 | 4 | # Copyright 2005 Volker Kleinfeld <Volker.Kleinfeld@gmx.de> |
@@ -26,9 +26,9 b' def getmodules(libpath,packagename):' | |||
|
26 | 26 | libpath = os.path.abspath(libpath) |
|
27 | 27 | sys.path.insert(0,libpath) |
|
28 | 28 | packdir = os.path.join(libpath,packagename) |
|
29 |
# A normal import would not find the package in |
|
|
29 | # A normal import would not find the package in | |
|
30 | 30 | # the build directory. ihook is used to force the import. |
|
31 |
# After the package is imported the import scope for |
|
|
31 | # After the package is imported the import scope for | |
|
32 | 32 | # the following imports is settled. |
|
33 | 33 | p = importfrom(packdir) |
|
34 | 34 | globals()[packagename] = p |
@@ -46,7 +46,7 b' def getmodules(libpath,packagename):' | |||
|
46 | 46 | if m == '__init__.py': continue |
|
47 | 47 | tmp = {} |
|
48 | 48 | mname,ext = os.path.splitext(m) |
|
49 |
fullname = packagename+'.'+mname |
|
|
49 | fullname = packagename+'.'+mname | |
|
50 | 50 | __import__(fullname,tmp,tmp) |
|
51 | 51 | requiredmodules[fullname] = 1 |
|
52 | 52 | # Import all extension modules and by that run the fake demandload |
@@ -45,7 +45,7 b' def patch(strip, patchname, ui):' | |||
|
45 | 45 | if code: |
|
46 | 46 | raise Abort("patch command failed: exit status %s " % code) |
|
47 | 47 | return files.keys() |
|
48 | ||
|
48 | ||
|
49 | 49 | def binary(s): |
|
50 | 50 | """return true if a string is binary data using diff's heuristic""" |
|
51 | 51 | if s and '\0' in s[:4096]: |
@@ -470,7 +470,7 b' class chunkbuffer(object):' | |||
|
470 | 470 | |
|
471 | 471 | def read(self, l): |
|
472 | 472 | """Read L bytes of data from the iterator of chunks of data. |
|
473 |
|
|
|
473 | Returns less than L bytes if the iterator runs dry.""" | |
|
474 | 474 | if l > len(self.buf) and not self.iterempty: |
|
475 | 475 | # Clamp to a multiple of self.targetsize |
|
476 | 476 | targetsize = self.targetsize * ((l // self.targetsize) + 1) |
@@ -91,7 +91,7 b' need to be added, deleted, and merged.' | |||
|
91 | 91 | |
|
92 | 92 | Then for each file, we perform a graph merge and resolve as above. |
|
93 | 93 | It's important to merge files using per-file DAGs rather than just |
|
94 |
changeset level DAGs as this diagram illustrates: |
|
|
94 | changeset level DAGs as this diagram illustrates: | |
|
95 | 95 | |
|
96 | 96 | M M1 M2 |
|
97 | 97 |
@@ -13,13 +13,13 b' import mercurial.version' | |||
|
13 | 13 | |
|
14 | 14 | # py2exe needs to be installed to work |
|
15 | 15 | try: |
|
16 |
import py2exe |
|
|
16 | import py2exe | |
|
17 | 17 | |
|
18 | 18 | # Due to the use of demandload py2exe is not finding the modules. |
|
19 |
# packagescan.getmodules creates a list of modules included in |
|
|
19 | # packagescan.getmodules creates a list of modules included in | |
|
20 | 20 | # the mercurial package plus depdent modules. |
|
21 |
import mercurial.packagescan |
|
|
22 |
from py2exe.build_exe import py2exe as build_exe |
|
|
21 | import mercurial.packagescan | |
|
22 | from py2exe.build_exe import py2exe as build_exe | |
|
23 | 23 | |
|
24 | 24 | class py2exe_for_demandload(build_exe): |
|
25 | 25 | """ overwrites the py2exe command class for getting the build |
@@ -23,7 +23,7 b' a { text-decoration:none; }' | |||
|
23 | 23 | .metatag { |
|
24 | 24 | background-color: #888888; |
|
25 | 25 | color: white; |
|
26 |
text-align: right; |
|
|
26 | text-align: right; | |
|
27 | 27 | } |
|
28 | 28 | |
|
29 | 29 | /* Common */ |
@@ -104,14 +104,14 b' run_one() {' | |||
|
104 | 104 | return $fail |
|
105 | 105 | } |
|
106 | 106 | |
|
107 |
# list of prerequisite programs |
|
|
107 | # list of prerequisite programs | |
|
108 | 108 | # stuff from coreutils (cat, rm, etc) are not tested |
|
109 | 109 | prereqs="python merge diff grep unzip md5sum gunzip sed" |
|
110 | 110 | missing='' |
|
111 | 111 | for pre in $prereqs ; do |
|
112 | 112 | if type $pre > /dev/null 2>&1 ; then |
|
113 | 113 | : prereq exists |
|
114 |
else |
|
|
114 | else | |
|
115 | 115 | missing="$pre $missing" |
|
116 | 116 | fi |
|
117 | 117 | done |
@@ -2,10 +2,10 b'' | |||
|
2 | 2 | hg --debug init |
|
3 | 3 | echo this is a1 > a |
|
4 | 4 | hg add a |
|
5 |
hg commit -m0 -d "0 0" |
|
|
5 | hg commit -m0 -d "0 0" | |
|
6 | 6 | echo this is b1 > b |
|
7 | 7 | hg add b |
|
8 |
hg commit -m1 -d "0 0" |
|
|
8 | hg commit -m1 -d "0 0" | |
|
9 | 9 | hg manifest 1 |
|
10 | 10 | echo this is c1 > c |
|
11 | 11 | hg rawcommit -p 1 -d "0 0" -m2 c |
@@ -5,9 +5,9 b' echo a > a' | |||
|
5 | 5 | hg add a |
|
6 | 6 | hg commit -m "test" -d "0 0" |
|
7 | 7 | hg history |
|
8 |
hg tag -d "0 0" "bleah" |
|
|
8 | hg tag -d "0 0" "bleah" | |
|
9 | 9 | hg history |
|
10 | 10 | |
|
11 | 11 | echo foo >> .hgtags |
|
12 |
hg tag -d "0 0" "bleah2" || echo "failed" |
|
|
12 | hg tag -d "0 0" "bleah2" || echo "failed" | |
|
13 | 13 |
General Comments 0
You need to be logged in to leave comments.
Login now