Teach walk code about absolute paths.
The first consequence of this is that absolute and relative paths now
all work in the same way. The second is that paths that lie outside
the repository now cause an error to be reported, instead of something
arbitrary and expensive being done.
Internally, all of the serious work is in the util package. The new
canonpath function takes an arbitrary path and either returns a
canonical path or raises an error. Because it needs to know where the
repository root is, it must be fed a repository or dirstate object, which
has given commands.matchpats and friends a new parameter to pass along.
The util.matcher function uses this to canonicalise globs and relative
path names.
Meanwhile, I've moved the Abort exception from commands to util, and
killed off the redundant util.CommandError exception.
+ hg help
basic hg commands (use "hg help -v" for more):
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff working directory (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the current directory
log show the revision history of the repository or a single file
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert modified files or dirs back to their unmodified states
serve export the repository via HTTP
status show changed files in the working directory
update update or merge working directory
+ hg -q help
basic hg commands (use "hg help -v" for more):
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff working directory (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the current directory
log show the revision history of the repository or a single file
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert modified files or dirs back to their unmodified states
serve export the repository via HTTP
status show changed files in the working directory
update update or merge working directory
+ hg add -h
hg add: option -h not recognized
hg add [FILE]...
-I --include
include path in search
-X --exclude
exclude path from search
add the specified files on the next commit
+ hg add --skjdfks
hg add: option --skjdfks not recognized
hg add [FILE]...
-I --include
include path in search
-X --exclude
exclude path from search
add the specified files on the next commit
+ hg help diff
hg diff [-r REV1 [-r REV2]] [FILE]...
-r --rev
revision
-I --include
include path in search
-X --exclude
exclude path from search
diff working directory (or selected files)
+ hg help foo
hg: unknown command foo
+ hg -q commands
hg: unknown command 'commands'
basic hg commands (use "hg help -v" for more):
add add the specified files on the next commit
annotate show changeset information per file line
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff working directory (or selected files)
export dump the header and diffs for one or more changesets
init create a new repository in the current directory
log show the revision history of the repository or a single file
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
revert revert modified files or dirs back to their unmodified states
serve export the repository via HTTP
status show changed files in the working directory
update update or merge working directory