# HG changeset patch # User Vadim Gelfer # Date 1142209319 28800 # Node ID b7cc0f323a4cd98e70f45c18830484dd5a74b03d # Parent 8f565af14095d8c44e188d441d5c70f03f95bd48# Parent d7c038e805e91f79bfa108175fba6b957a968e35 merge with crew. diff -r 8f565af14095 -r b7cc0f323a4c .hgignore --- a/.hgignore Sun Mar 12 15:58:56 2006 -0800 +++ b/.hgignore Sun Mar 12 16:21:59 2006 -0800 @@ -12,6 +12,7 @@ build dist doc/*.[0-9] +doc/*.[0-9].gendoc.txt doc/*.[0-9].{x,ht}ml MANIFEST patches diff -r 8f565af14095 -r b7cc0f323a4c PKG-INFO --- a/PKG-INFO Sun Mar 12 15:58:56 2006 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -Metadata-Version: 1.0 -Name: mercurial -Version: 0.7 -Summary: scalable distributed SCM -Home-page: http://selenic.com/mercurial -Author: Matt Mackall -Author-email: mpm@selenic.com -License: GNU GPL -Description: UNKNOWN -Platform: UNKNOWN diff -r 8f565af14095 -r b7cc0f323a4c contrib/bash_completion --- a/contrib/bash_completion Sun Mar 12 15:58:56 2006 -0800 +++ b/contrib/bash_completion Sun Mar 12 16:21:59 2006 -0800 @@ -1,27 +1,5 @@ shopt -s extglob -_hg_command_list() -{ - "$hg" --debug help 2>/dev/null | \ - awk 'function command_line(line) { - gsub(/,/, "", line) - gsub(/:.*/, "", line) - split(line, aliases) - command = aliases[1] - delete aliases[1] - print command - for (i in aliases) - if (index(command, aliases[i]) != 1) - print aliases[i] - } - /^list of commands:/ {commands=1} - commands && /^ debug/ {a[i++] = $0; next;} - commands && /^ [^ ]/ {command_line($0)} - /^global options:/ {exit 0} - END {for (i in a) command_line(a[i])}' - -} - _hg_option_list() { "$hg" -v help $1 2>/dev/null | \ @@ -37,21 +15,9 @@ _hg_commands() { - local all commands result - - all=$(_hg_command_list) - commands=${all%%$'\n'debug*} - result=$(compgen -W '$commands' -- "$cur") - - # hide debug commands from users, but complete them if - # there is no other possible command - if [ "$result" = "" ]; then - local debug - debug=debug${all#*$'\n'debug} - result=$(compgen -W '$debug' -- "$cur") - fi - - COMPREPLY=(${COMPREPLY[@]:-} $result) + local commands + commands="$("$hg" debugcomplete "$cur" 2>/dev/null)" || commands="" + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$commands' -- "$cur")) } _hg_paths() diff -r 8f565af14095 -r b7cc0f323a4c contrib/hbisect.py --- a/contrib/hbisect.py Sun Mar 12 15:58:56 2006 -0800 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,287 +0,0 @@ -#!/usr/bin/env python -# -# This software may be used and distributed according to the terms -# of the GNU General Public License, incorporated herein by reference. - -from mercurial.demandload import demandload -demandload(globals(), "os sys sets") -from mercurial import hg - -versionstr = "0.0.3" - -def lookup_rev(ui, repo, rev=None): - """returns rev or the checked-out revision if rev is None""" - if not rev is None: - return repo.lookup(rev) - parents = [p for p in repo.dirstate.parents() if p != hg.nullid] - if len(parents) != 1: - ui.warn("unexpected number of parents\n") - ui.warn("please commit or revert\n") - sys.exit(1) - return parents.pop() - -def check_clean(ui, repo): - modified, added, removed, deleted, unknown = repo.changes() - if modified or added or removed: - ui.warn("Repository is not clean, please commit or revert\n") - sys.exit(1) - -class bisect(object): - """dichotomic search in the DAG of changesets""" - def __init__(self, ui, repo): - self.repo = repo - self.path = os.path.join(repo.join(""), "bisect") - self.ui = ui - self.goodrevs = [] - self.badrev = None - self.good_dirty = 0 - self.bad_dirty = 0 - self.good_path = os.path.join(self.path, "good") - self.bad_path = os.path.join(self.path, "bad") - - s = self.good_path - if os.path.exists(s): - self.goodrevs = self.repo.opener(s).read().splitlines() - self.goodrevs = [hg.bin(x) for x in self.goodrevs] - s = self.bad_path - if os.path.exists(s): - r = self.repo.opener(s).read().splitlines() - if r: - self.badrev = hg.bin(r.pop(0)) - - def __del__(self): - if not os.path.isdir(self.path): - return - f = self.repo.opener(self.good_path, "w") - f.write("\n".join([hg.hex(r) for r in self.goodrevs])) - if len(self.goodrevs) > 0: - f.write("\n") - f = self.repo.opener(self.bad_path, "w") - if self.badrev: - f.write(hg.hex(self.badrev) + "\n") - - def init(self): - """start a new bisection""" - if os.path.isdir(self.path): - self.ui.warn("bisect directory already exists\n") - return 1 - os.mkdir(self.path) - check_clean(self.ui, self.repo) - return 0 - - def reset(self): - """finish a bisection""" - if os.path.isdir(self.path): - sl = [self.bad_path, self.good_path] - for s in sl: - if os.path.exists(s): - os.unlink(s) - os.rmdir(self.path) - # Not sure about this - #self.ui.write("Going back to tip\n") - #self.repo.update(self.repo.changelog.tip()) - return 1 - - def num_ancestors(self, head=None, stop=None): - """ - returns a dict with the mapping: - node -> number of ancestors (self included) - for all nodes who are ancestor of head and - not in stop. - """ - if head is None: - head = self.badrev - return self.__ancestors_and_nb_ancestors(head, stop)[1] - - def ancestors(self, head=None, stop=None): - """ - returns the set of the ancestors of head (self included) - who are not in stop. - """ - if head is None: - head = self.badrev - return self.__ancestors_and_nb_ancestors(head, stop)[0] - - def __ancestors_and_nb_ancestors(self, head, stop=None): - """ - if stop is None then ancestors of goodrevs are used as - lower limit. - - returns (anc, n_child) where anc is the set of the ancestors of head - and n_child is a dictionary with the following mapping: - node -> number of ancestors (self included) - """ - cl = self.repo.changelog - if not stop: - stop = sets.Set([]) - for g in reversed(self.goodrevs): - if g in stop: - continue - stop.update(cl.reachable(g)) - def num_children(a): - """ - returns a dictionnary with the following mapping - node -> [number of children, empty set] - """ - d = {a: [0, sets.Set([])]} - for i in xrange(cl.rev(a)+1): - n = cl.node(i) - if not d.has_key(n): - d[n] = [0, sets.Set([])] - parents = [p for p in cl.parents(n) if p != hg.nullid] - for p in parents: - d[p][0] += 1 - return d - - if head in stop: - self.ui.warn("Unconsistent state, %s is good and bad\n" - % hg.hex(head)) - sys.exit(1) - n_child = num_children(head) - for i in xrange(cl.rev(head)+1): - n = cl.node(i) - parents = [p for p in cl.parents(n) if p != hg.nullid] - for p in parents: - n_child[p][0] -= 1 - if not n in stop: - n_child[n][1].union_update(n_child[p][1]) - if n_child[p][0] == 0: - n_child[p] = len(n_child[p][1]) - if not n in stop: - n_child[n][1].add(n) - if n_child[n][0] == 0: - if n == head: - anc = n_child[n][1] - n_child[n] = len(n_child[n][1]) - return anc, n_child - - def next(self): - if not self.badrev: - self.ui.warn("You should give at least one bad\n") - sys.exit(1) - if not self.goodrevs: - self.ui.warn("No good revision given\n") - self.ui.warn("Assuming the first revision is good\n") - ancestors, num_ancestors = self.__ancestors_and_nb_ancestors(self.badrev) - tot = len(ancestors) - if tot == 1: - if ancestors.pop() != self.badrev: - self.ui.warn("Could not find the first bad revision\n") - sys.exit(1) - self.ui.write( - "The first bad revision is : %s\n" % hg.hex(self.badrev)) - sys.exit(0) - self.ui.write("%d revisions left\n" % tot) - best_rev = None - best_len = -1 - for n in ancestors: - l = num_ancestors[n] - l = min(l, tot - l) - if l > best_len: - best_len = l - best_rev = n - return best_rev - - def autonext(self): - """find and update to the next revision to test""" - check_clean(self.ui, self.repo) - rev = self.next() - self.ui.write("Now testing %s\n" % hg.hex(rev)) - return self.repo.update(rev, force=True) - - def good(self, rev): - self.goodrevs.append(rev) - - def autogood(self, rev=None): - """mark revision as good and update to the next revision to test""" - check_clean(self.ui, self.repo) - rev = lookup_rev(self.ui, self.repo, rev) - self.good(rev) - if self.badrev: - self.autonext() - - def bad(self, rev): - self.badrev = rev - - def autobad(self, rev=None): - """mark revision as bad and update to the next revision to test""" - check_clean(self.ui, self.repo) - rev = lookup_rev(self.ui, self.repo, rev) - self.bad(rev) - if self.goodrevs: - self.autonext() - -# should we put it in the class ? -def test(ui, repo, rev): - """test the bisection code""" - b = bisect(ui, repo) - rev = repo.lookup(rev) - ui.write("testing with rev %s\n" % hg.hex(rev)) - anc = b.ancestors() - while len(anc) > 1: - if not rev in anc: - ui.warn("failure while bisecting\n") - sys.exit(1) - ui.write("it worked :)\n") - new_rev = b.next() - ui.write("choosing if good or bad\n") - if rev in b.ancestors(head=new_rev): - b.bad(new_rev) - ui.write("it is bad\n") - else: - b.good(new_rev) - ui.write("it is good\n") - anc = b.ancestors() - repo.update(new_rev, force=True) - for v in anc: - if v != rev: - ui.warn("fail to found cset! :(\n") - return 1 - ui.write("Found bad cset: %s\n" % hg.hex(b.badrev)) - ui.write("Everything is ok :)\n") - return 0 - -def bisect_run(ui, repo, cmd=None, *args): - """bisect extension: dichotomic search in the DAG of changesets -for subcommands see "hg bisect help\" - """ - def help_(cmd=None, *args): - """show help for a given bisect subcommand or all subcommands""" - cmdtable = bisectcmdtable - if cmd: - doc = cmdtable[cmd][0].__doc__ - synopsis = cmdtable[cmd][2] - ui.write(synopsis + "\n") - ui.write("\n" + doc + "\n") - return - ui.write("list of subcommands for the bisect extension\n\n") - cmds = cmdtable.keys() - cmds.sort() - m = max([len(c) for c in cmds]) - for cmd in cmds: - doc = cmdtable[cmd][0].__doc__.splitlines(0)[0].rstrip() - ui.write(" %-*s %s\n" % (m, cmd, doc)) - - b = bisect(ui, repo) - bisectcmdtable = { - "init": (b.init, 0, "hg bisect init"), - "bad": (b.autobad, 1, "hg bisect bad []"), - "good": (b.autogood, 1, "hg bisect good []"), - "next": (b.autonext, 0, "hg bisect next"), - "reset": (b.reset, 0, "hg bisect reset"), - "help": (help_, 1, "hg bisect help []"), - } - - if not bisectcmdtable.has_key(cmd): - ui.warn("bisect: Unknown sub-command\n") - return help_() - if len(args) > bisectcmdtable[cmd][1]: - ui.warn("bisect: Too many arguments\n") - return help_() - return bisectcmdtable[cmd][0](*args) - -cmdtable = { - "bisect": (bisect_run, [], - "hg bisect [help|init|reset|next|good|bad]"), - #"bisect-test": (test, [], "hg bisect-test rev"), -} diff -r 8f565af14095 -r b7cc0f323a4c contrib/mercurial.spec --- a/contrib/mercurial.spec Sun Mar 12 15:58:56 2006 -0800 +++ b/contrib/mercurial.spec Sun Mar 12 16:21:59 2006 -0800 @@ -1,7 +1,7 @@ Summary: Mercurial -- a distributed SCM Name: mercurial -Version: 0.7 -Release: 1 +Version: 0.8 +Release: 0 License: GPL Group: Development/Tools Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz @@ -10,6 +10,7 @@ %define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))') %define pythonlib %{_libdir}/python%{pythonver}/site-packages/%{name} +%define hgext %{_libdir}/python%{pythonver}/site-packages/hgext %description Mercurial is a fast, lightweight source control management system designed @@ -30,10 +31,12 @@ %files %defattr(-,root,root,-) -%doc doc/* contrib/patchbomb *.cgi +%doc doc/* *.cgi %dir %{pythonlib} +%dir %{hgext} %{_bindir}/hgmerge %{_bindir}/hg %{pythonlib}/templates %{pythonlib}/*.py* %{pythonlib}/*.so +%{hgext}/*.py* diff -r 8f565af14095 -r b7cc0f323a4c contrib/win32/mercurial.iss --- a/contrib/win32/mercurial.iss Sun Mar 12 15:58:56 2006 -0800 +++ b/contrib/win32/mercurial.iss Sun Mar 12 16:21:59 2006 -0800 @@ -28,23 +28,22 @@ DefaultGroupName=Mercurial [Files] -Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs +Source: ..\..\msys\1.0\bin\patch.exe; DestDir: {app} Source: contrib\mercurial.el; DestDir: {app}/Contrib -Source: contrib\patchbomb; DestDir: {app}/Contrib -Source: dist\w9xpopen.exe; DestDir: {app} +Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme +Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Flags: confirmoverwrite +Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt Source: dist\hg.exe; DestDir: {app} +Source: dist\library.zip; DestDir: {app} +Source: dist\mfc71.dll; DestDir: {sys}; Flags: sharedfile uninsnosharedfileprompt Source: dist\msvcr71.dll; DestDir: {sys}; Flags: sharedfile uninsnosharedfileprompt -Source: dist\library.zip; DestDir: {app} +Source: dist\w9xpopen.exe; DestDir: {app} Source: doc\*.txt; DestDir: {app}\Docs -Source: dist\mfc71.dll; DestDir: {sys}; Flags: sharedfile uninsnosharedfileprompt +Source: templates\*.*; DestDir: {app}\Templates; Flags: recursesubdirs createallsubdirs +Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt Source: COPYING; DestDir: {app}; DestName: Copying.txt Source: comparison.txt; DestDir: {app}\Docs; DestName: Comparison.txt Source: notes.txt; DestDir: {app}\Docs; DestName: DesignNotes.txt -Source: CONTRIBUTORS; DestDir: {app}; DestName: Contributors.txt -Source: contrib\win32\ReadMe.html; DestDir: {app}; Flags: isreadme -Source: ..\..\msys\1.0\bin\patch.exe; DestDir: {app} -Source: contrib\win32\mercurial.ini; DestDir: {app}; DestName: Mercurial.ini; Flags: confirmoverwrite -Source: contrib\win32\postinstall.txt; DestDir: {app}; DestName: ReleaseNotes.txt [INI] Filename: {app}\Mercurial.url; Section: InternetShortcut; Key: URL; String: http://www.selenic.com/mercurial/ diff -r 8f565af14095 -r b7cc0f323a4c doc/Makefile --- a/doc/Makefile Sun Mar 12 15:58:56 2006 -0800 +++ b/doc/Makefile Sun Mar 12 16:21:59 2006 -0800 @@ -8,6 +8,12 @@ html: $(HTML) +hg.1.txt: hg.1.gendoc.txt + touch hg.1.txt + +hg.1.gendoc.txt: ../mercurial/commands.py + python gendoc.py > $@ + %: %.xml xmlto man $*.xml @@ -18,4 +24,4 @@ asciidoc -b html4 $*.txt || asciidoc -b html $*.txt clean: - $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) + $(RM) $(MAN) $(MAN:%=%.xml) $(MAN:%=%.html) *.[0-9].gendoc.txt diff -r 8f565af14095 -r b7cc0f323a4c doc/gendoc.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/gendoc.py Sun Mar 12 16:21:59 2006 -0800 @@ -0,0 +1,92 @@ +import sys, textwrap +# import from the live mercurial repo +sys.path.insert(0, "..") +from mercurial.commands import table, globalopts +from mercurial.i18n import gettext as _ + +def get_desc(docstr): + if not docstr: + return "", "" + # sanitize + docstr = docstr.strip("\n") + docstr = docstr.rstrip() + shortdesc = docstr.splitlines()[0].strip() + + i = docstr.find("\n") + if i != -1: + desc = docstr[i+2:] + else: + desc = " %s" % shortdesc + return (shortdesc, desc) + +def get_opts(opts): + for shortopt, longopt, default, desc in opts: + allopts = [] + if shortopt: + allopts.append("-%s" % shortopt) + if longopt: + allopts.append("--%s" % longopt) + desc += default and _(" (default: %s)") % default or "" + yield(", ".join(allopts), desc) + +def get_cmd(cmd): + d = {} + attr = table[cmd] + cmds = cmd.lstrip("^").split("|") + + d['synopsis'] = attr[2] + d['cmd'] = cmds[0] + d['aliases'] = cmd.split("|")[1:] + d['desc'] = get_desc(attr[0].__doc__) + d['opts'] = list(get_opts(attr[1])) + return d + + +def show_doc(ui): + def bold(s, text=""): + ui.write("%s\n%s\n%s\n" % (s, "="*len(s), text)) + def underlined(s, text=""): + ui.write("%s\n%s\n%s\n" % (s, "-"*len(s), text)) + + # print options + underlined(_("OPTIONS")) + for optstr, desc in get_opts(globalopts): + ui.write("%s::\n %s\n\n" % (optstr, desc)) + + # print cmds + underlined(_("COMMANDS")) + h = {} + for c, attr in table.items(): + f = c.split("|")[0] + f = f.lstrip("^") + h[f] = c + cmds = h.keys() + cmds.sort() + + for f in cmds: + if f.startswith("debug"): continue + d = get_cmd(h[f]) + # synopsis + ui.write("%s::\n" % d['synopsis'].replace("hg ","", 1)) + # description + ui.write("%s\n\n" % d['desc'][1]) + # options + opt_output = list(d['opts']) + if opt_output: + opts_len = max([len(line[0]) for line in opt_output]) + ui.write(_(" options:\n")) + for optstr, desc in opt_output: + if desc: + s = "%-*s %s" % (opts_len, optstr, desc) + else: + s = optstr + s = textwrap.fill(s, initial_indent=4 * " ", + subsequent_indent=(6 + opts_len) * " ") + ui.write("%s\n" % s) + ui.write("\n") + # aliases + if d['aliases']: + ui.write(_(" aliases: %s\n\n") % " ".join(d['aliases'])) + +if __name__ == "__main__": + show_doc(sys.stdout) diff -r 8f565af14095 -r b7cc0f323a4c doc/hg.1.txt --- a/doc/hg.1.txt Sun Mar 12 15:58:56 2006 -0800 +++ b/doc/hg.1.txt Sun Mar 12 16:21:59 2006 -0800 @@ -14,42 +14,6 @@ ----------- The hg(1) command provides a command line interface to the Mercurial system. -OPTIONS -------- - --R, --repository:: - repository root directory - ---cwd:: - change working directory - --y, --noninteractive:: - do not prompt, assume 'yes' for any required answers - --q, --quiet:: - suppress output - --v, --verbose:: - enable additional output - ---debug:: - enable debugging output - ---traceback:: - print traceback on exception - ---time:: - time how long the command takes - ---profile:: - print command execution profile - ---version:: - output version information and exit - --h, --help:: - display help and exit - COMMAND ELEMENTS ---------------- @@ -70,617 +34,8 @@ fast and the old-http:// protocol which is much slower but does not require a special server on the web host. -COMMANDS --------- -add [options] [files ...]:: - Schedule files to be version controlled and added to the repository. - - The files will be added to the repository at the next commit. - - If no names are given, add all files in the current directory and - its subdirectories. - -addremove [options] [files ...]:: - Add all new files and remove all missing files from the repository. - - New files are ignored if they match any of the patterns in .hgignore. As - with add, these changes take effect at the next commit. - -annotate [-r -u -n -c -d] [files ...]:: - List changes in files, showing the revision id responsible for each line - - This command is useful to discover who did a change or when a change took - place. - - Without the -a option, annotate will avoid processing files it - detects as binary. With -a, annotate will generate an annotation - anyway, probably with undesirable results. - - options: - -a, --text treat all files as text - -I, --include include names matching the given patterns - -X, --exclude exclude names matching the given patterns - -r, --revision annotate the specified revision - -u, --user list the author - -d, --date list the commit date - -c, --changeset list the changeset - -n, --number list the revision number (default) - -bundle :: - (EXPERIMENTAL) - - Generate a compressed changegroup file collecting all changesets - not found in the other repository. - - This file can then be transferred using conventional means and - applied to another repository with the unbundle command. This is - useful when native push and pull are not available or when - exporting an entire repository is undesirable. The standard file - extension is ".hg". - - Unlike import/export, this exactly preserves all changeset - contents including permissions, rename data, and revision history. - -cat [options] :: - Print the specified files as they were at the given revision. - If no revision is given then the tip is used. - - Output may be to a file, in which case the name of the file is - given using a format string. The formatting rules are the same as - for the export command, with the following additions: - - %s basename of file being printed - %d dirname of file being printed, or '.' if in repo root - %p root-relative path name of file being printed - - options: - -I, --include include names matching the given patterns - -X, --exclude exclude names matching the given patterns - -o, --output print output to file with formatted name - -r, --rev print the given revision - -clone [options] [dest]:: - Create a copy of an existing repository in a new directory. - - If no destination directory name is specified, it defaults to the - basename of the source. - - The location of the source is added to the new repository's - .hg/hgrc file, as the default to be used for future pulls. - - For efficiency, hardlinks are used for cloning whenever the source - and destination are on the same filesystem. Some filesystems, - such as AFS, implement hardlinking incorrectly, but do not report - errors. In these cases, use the --pull option to avoid - hardlinking. - - See pull for valid source format details. - - options: - -U, --noupdate do not update the new working directory - --pull use pull protocol to copy metadata - -e, --ssh specify ssh command to use - --remotecmd specify hg command to run on the remote side - -commit [options] [files...]:: - Commit changes to the given files into the repository. - - If a list of files is omitted, all changes reported by "hg status" - from the root of the repository will be commited. - - The HGEDITOR or EDITOR environment variables are used to start an - editor to add a commit comment. - - Options: - - -A, --addremove run addremove during commit - -I, --include include names matching the given patterns - -X, --exclude exclude names matching the given patterns - -m, --message use as commit message - -l, --logfile read the commit message from - -d, --date record datecode as commit date - -u, --user record user as commiter - - aliases: ci - -copy :: - Mark dest as having copies of source files. If dest is a - directory, copies are put in that directory. If dest is a file, - there can only be one source. - - By default, this command copies the contents of files as they - stand in the working directory. If invoked with --after, the - operation is recorded, but no copying is performed. - - This command takes effect in the next commit. - - NOTE: This command should be treated as experimental. While it - should properly record copied files, this information is not yet - fully used by merge, nor fully reported by log. - - Options: - -A, --after record a copy that has already occurred - -I, --include include names matching the given patterns - -X, --exclude exclude names matching the given patterns - -f, --force forcibly copy over an existing managed file - - aliases: cp - -diff [-a] [-r revision] [-r revision] [files ...]:: - Show differences between revisions for the specified files. - - Differences between files are shown using the unified diff format. - - When two revision arguments are given, then changes are shown - between those revisions. If only one revision is specified then - that revision is compared to the working directory, and, when no - revisions are specified, the working directory files are compared - to its parent. - - Without the -a option, diff will avoid generating diffs of files - it detects as binary. With -a, diff will generate a diff anyway, - probably with undesirable results. - - options: - -a, --text treat all files as text - -I, --include include names matching the given patterns - -p, --show-function show which function each change is in - -X, --exclude exclude names matching the given patterns - -w, --ignore-all-space ignore white space when comparing lines - -export [-o filespec] [revision] ...:: - Print the changeset header and diffs for one or more revisions. - - The information shown in the changeset header is: author, - changeset hash, parent and commit comment. - - Output may be to a file, in which case the name of the file is - given using a format string. The formatting rules are as follows: - - %% literal "%" character - %H changeset hash (40 bytes of hexadecimal) - %N number of patches being generated - %R changeset revision number - %b basename of the exporting repository - %h short-form changeset hash (12 bytes of hexadecimal) - %n zero-padded sequence number, starting at 1 - %r zero-padded changeset revision number - - Without the -a option, export will avoid generating diffs of files - it detects as binary. With -a, export will generate a diff anyway, - probably with undesirable results. - - options: - -a, --text treat all files as text - -o, --output print output to file with formatted name - -forget [options] [files]:: - Undo an 'hg add' scheduled for the next commit. - - options: - -I, --include include names matching the given patterns - -X, --exclude exclude names matching the given patterns - -grep [options] pattern [files]:: - Search revisions of files for a regular expression. - - This command behaves differently than Unix grep. It only accepts - Python/Perl regexps. It searches repository history, not the - working directory. It always prints the revision number in which - a match appears. - - By default, grep only prints output for the first revision of a - file in which it finds a match. To get it to print every revision - that contains a change in match status ("-" for a match that - becomes a non-match, or "+" for a non-match that becomes a match), - use the --all flag. - - options: - -0, --print0 end fields with NUL - -I, --include include names matching the given patterns - -X, --exclude exclude names matching the given patterns - --all print all revisions that match - -i, --ignore-case ignore case when matching - -l, --files-with-matches print only filenames and revs that match - -n, --line-number print matching line numbers - -r , --rev search in given revision range - -u, --user print user who committed change - -heads:: - Show all repository head changesets. - - Repository "heads" are changesets that don't have children - changesets. They are where development generally takes place and - are the usual targets for update and merge operations. - - options: - -b, --branches show branches - -r, --rev show only heads which are descendants of rev - --style