# HG changeset patch # User Thomas Arendsen Hein # Date 1186475294 -7200 # Node ID 2ffe3e2a1ac2625e0a7d6e62cb8f4c89760afd62 # Parent bcf6ba3fcbe47efac4cd3c13768ebad2aa63691a# Parent ea7b982b6c0834921aa22388a34a6d8e7a2cb60c merge with crew-stable diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -28,7 +28,7 @@ # cat ~/.patchbomb-$1 # fi # } -# +# # # Writing completion functions for additional commands: # @@ -50,7 +50,7 @@ # an argument (e.g. '--cwd|-R|--repository') # - $canonical - 1 if we canonicalized $cmd before calling the function # 0 otherwise -# +# shopt -s extglob @@ -425,7 +425,7 @@ complete -o bashdefault -o default -F _h done if [ -z "$subcmd" ] || [ $COMP_CWORD -eq $i ] || [ "$subcmd" = help ]; then - COMPREPLY=(${COMPREPLY[@]:-} + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W 'bad good help init next reset' -- "$cur")) return fi @@ -445,7 +445,7 @@ complete -o bashdefault -o default -F _h { case "$prev" in -c|--cc|-t|--to|-f|--from|--bcc) - # we need an e-mail address. let the user provide a function + # we need an e-mail address. let the user provide a function # to get them if [ "$(type -t _hg_emails)" = function ]; then local arg=to diff --git a/contrib/hgdiff b/contrib/hgdiff --- a/contrib/hgdiff +++ b/contrib/hgdiff @@ -15,7 +15,7 @@ parser.add_option("-d", "--difflib", act parser.add_option('-x', '--count', default=1) parser.add_option('-c', '--context', type="int", default=3) parser.add_option('-p', '--show-c-function', action="store_true", default=False) -parser.add_option('-w', '--ignore-all-space', action="store_true", +parser.add_option('-w', '--ignore-all-space', action="store_true", default=False) (options, args) = parser.parse_args() diff --git a/contrib/hgsh/hgsh.c b/contrib/hgsh/hgsh.c --- a/contrib/hgsh/hgsh.c +++ b/contrib/hgsh/hgsh.c @@ -249,7 +249,7 @@ enum cmdline { hg_serve, }; - + /* * attempt to verify that a directory is really a hg repo, by testing * for the existence of a subdirectory. @@ -342,13 +342,13 @@ static void serve_data(int argc, char ** if (cmd != hg_init) { int valid; - + valid = validate_repo(repo_root, "data"); if (valid == -1) { goto badargs; } - + if (valid == 0) { valid = validate_repo(repo_root, "store"); @@ -356,7 +356,7 @@ static void serve_data(int argc, char ** goto badargs; } } - + if (valid == 0) { perror(repo); exit(EX_DATAERR); @@ -385,7 +385,7 @@ static void serve_data(int argc, char ** nargv[i++] = repo; break; } - + nargv[i] = NULL; if (debug) { diff --git a/contrib/mercurial.el b/contrib/mercurial.el --- a/contrib/mercurial.el +++ b/contrib/mercurial.el @@ -426,7 +426,7 @@ Handle frickin' frackin' gratuitous even (if (or (not default) current-prefix-arg) (string-to-number (eval (list* 'read-string - (or prompt "") + (or prompt "") (if default (cons (format "%d" default) nil) nil)))) default))) @@ -565,7 +565,7 @@ directory names from the file system. W (when buf (set-buffer buf) (hg-mode-line-internal status parents))))))) - + ;;; View mode bits. @@ -588,7 +588,7 @@ current frame." (setq hg-view-mode t) (setq truncate-lines t) (when file-name - (setq hg-view-file-name + (setq hg-view-file-name (hg-abbrev-file-name file-name)))) (defun hg-file-status (file) @@ -703,7 +703,7 @@ Always returns a valid, hopefully sane, (added . "a") (deleted . "!") (modified . "m")))))))) - + (defun hg-mode-line (&optional force) "Update the modeline with the current status of a file. An update occurs if optional argument FORCE is non-nil, @@ -1000,7 +1000,7 @@ With a prefix argument, prompt for all o ;; none revision is specified explicitly (none (and (not rev1) (not rev2))) ;; only one revision is specified explicitly - (one (or (and (or (equal rev1 rev2) (not rev2)) rev1) + (one (or (and (or (equal rev1 rev2) (not rev2)) rev1) (and (not rev1) rev2))) diff) (hg-view-output ((cond @@ -1012,7 +1012,7 @@ With a prefix argument, prompt for all o (format "Mercurial: Diff from rev %s to %s of %s" rev1 rev2 a-path)))) (cond - (none + (none (call-process (hg-binary) nil t nil "diff" path)) (one (call-process (hg-binary) nil t nil "diff" "-r" one path)) @@ -1100,7 +1100,7 @@ With a prefix argument, prompt for each (limit (format "%d" (or log-limit hg-log-limit)))) (hg-view-output ((if (equal r1 r2) (format "Mercurial: Log of rev %s of %s" rev1 a-path) - (format + (format "Mercurial: at most %s log(s) from rev %s to %s of %s" limit r1 r2 a-path))) (eval (list* 'call-process (hg-binary) nil t nil @@ -1123,7 +1123,7 @@ With a prefix argument, prompt for each (interactive (list (hg-read-file-name " to log") (hg-read-rev " to start with" "tip") - (hg-read-rev " to end with" + (hg-read-rev " to end with" "0") (hg-read-number "Output limited to: " hg-log-limit))) diff --git a/contrib/mq.el b/contrib/mq.el --- a/contrib/mq.el +++ b/contrib/mq.el @@ -131,7 +131,7 @@ May return nil, meaning \"use the defaul (let ((line (buffer-substring bol (point)))) (when (> (length line) 0) line)))) - + (defun mq-push (&optional patch) "Push patches until PATCH is reached. If PATCH is nil, push at most one patch." @@ -166,7 +166,7 @@ If PATCH is nil, push at most one patch. (if ok (message "Pushing... %s" last-line) (error "Pushing... %s" last-line))))) - + (defun mq-push-all () "Push patches until all are applied." (interactive) @@ -195,7 +195,7 @@ If PATCH is nil, pop at most one patch." (if ok (message "Popping... %s" last-line) (error "Popping... %s" last-line))))) - + (defun mq-pop-all () "Push patches until none are applied." (interactive) @@ -255,7 +255,7 @@ This would become the active patch if po (let ((buf mq-prev-buffer)) (kill-buffer nil) (switch-to-buffer buf))) - + (defun mq-edit-kill () "Kill the edit currently being prepared." (interactive) @@ -316,7 +316,7 @@ Key bindings (set-buffer-modified-p nil) (setq buffer-undo-list nil) (run-hooks 'text-mode-hook 'mq-edit-mode-hook)) - + (defun mq-refresh-edit () "Refresh the topmost applied patch, editing the patch description." (interactive) diff --git a/contrib/simplemerge b/contrib/simplemerge --- a/contrib/simplemerge +++ b/contrib/simplemerge @@ -28,7 +28,7 @@ from mercurial.i18n import _ class CantReprocessAndShowBase(Exception): pass - + def warn(message): sys.stdout.flush() @@ -50,7 +50,7 @@ def intersect(ra, rb): """ assert ra[0] <= ra[1] assert rb[0] <= rb[1] - + sa = max(ra[0], rb[0]) sb = min(ra[1], rb[1]) if sa < sb: @@ -69,7 +69,7 @@ def compare_range(a, astart, aend, b, bs return False else: return True - + @@ -149,15 +149,15 @@ class Merge3Text(object): yield end_marker + newline else: raise ValueError(what) - - + + def merge_annotated(self): """Return merge with conflicts, showing origin of lines. - Most useful for debugging merge. + Most useful for debugging merge. """ for t in self.merge_regions(): what = t[0] @@ -180,8 +180,8 @@ class Merge3Text(object): yield '>>>>\n' else: raise ValueError(what) - - + + @@ -249,15 +249,15 @@ class Merge3Text(object): # section a[0:ia] has been disposed of, etc iz = ia = ib = 0 - + for zmatch, zend, amatch, aend, bmatch, bend in self.find_sync_regions(): #print 'match base [%d:%d]' % (zmatch, zend) - + matchlen = zend - zmatch assert matchlen >= 0 assert matchlen == (aend - amatch) assert matchlen == (bend - bmatch) - + len_a = amatch - ia len_b = bmatch - ib len_base = zmatch - iz @@ -294,22 +294,22 @@ class Merge3Text(object): # if the same part of the base was deleted on both sides # that's OK, we can just skip it. - + if matchlen > 0: assert ia == amatch assert ib == bmatch assert iz == zmatch - + yield 'unchanged', zmatch, zend iz = zend ia = aend ib = bend - + def reprocess_merge_regions(self, merge_regions): """Where there are conflict regions, remove the agreed lines. - Lines where both A and B have made the same changes are + Lines where both A and B have made the same changes are eliminated. """ for region in merge_regions: @@ -342,7 +342,7 @@ class Merge3Text(object): if next_a < region_ia or next_b < region_ib: return 'conflict', None, None, next_a, region_ia, next_b, region_ib mismatch_region = staticmethod(mismatch_region) - + def find_sync_regions(self): """Return a list of sync regions, where both descendents match the base. @@ -397,7 +397,7 @@ class Merge3Text(object): ia += 1 else: ib += 1 - + intbase = len(self.base) abase = len(self.a) bbase = len(self.b) @@ -429,7 +429,7 @@ class Merge3Text(object): del am[0] else: del bm[0] - + return unc @@ -511,9 +511,9 @@ options = [('L', 'label', [], _('labels usage = _('''simplemerge [OPTS] LOCAL BASE OTHER Simple three-way file merge utility with a minimal feature set. - + Apply to LOCAL the changes necessary to go from BASE to OTHER. - + By default, LOCAL is overwritten with the results of this operation. ''') diff --git a/contrib/vim/hg-menu.vim b/contrib/vim/hg-menu.vim --- a/contrib/vim/hg-menu.vim +++ b/contrib/vim/hg-menu.vim @@ -9,7 +9,7 @@ " Usage: These command and gui menu displays useful hg functions " Configuration: Your hg executable must be in your path. " ============================================================================= - + " Section: Init {{{1 if exists("loaded_hg_menu") finish diff --git a/contrib/win32/ReadMe.html b/contrib/win32/ReadMe.html --- a/contrib/win32/ReadMe.html +++ b/contrib/win32/ReadMe.html @@ -2,7 +2,7 @@ Mercurial for Windows - +