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