- Dec 03, 2015
-
-
Pierre-Yves David authored
Before this change, asking for file from history (eg: 'hg cat -r 42 foo/bar') could fail because of the current content of the working copy (eg: current "foo" being a symlink). As the working copy state have no influence on the content of the history, we can safely skip these checks. The working copy context class have a different 'match' implementation. That implementation still use the repo.auditor will still catch symlink traversal. I've audited all stuff calling "match" and they all go through a ctx in a sensible way. The most unclear case was diff which still seemed okay. You raised my paranoid level today and I double checked through tests. They behave properly. The odds of someone using the wrong (matching with a changectx for operation that will eventually touch the file system) is non-zero because you are never sure of what people will do. But I dunno if we can fight against that. So I would not commit to "never" for "at this level" and "in the future" if someone write especially bad code. However, as a last defense, the vfs itself is running path auditor in all cases outside of .hg/. So I think anything passing the 'matcher' for buggy reason would growl at the vfs layer.
-
- Jan 30, 2013
-
-
Mads Kiilerich authored
-
- Jan 10, 2013
-
-
kiilerix authored
Audit will handle this in a more elegant way.
-
- Jan 07, 2013
-
-
kiilerix authored
Mercurial would sometimes exit with: abort: No such file or directory where str of the actual OSError exception was the more helpful: [Errno 2] No such file or directory: '' The exception will now always show the filename and quote it: abort: No such file or directory: ''
-
- Jun 10, 2012
-
-
kiilerix authored
Many tests didn't change back from subdirectories at the end of the tests ... and they don't have to. The missing 'cd ..' could always be added when another test case is added to the test file. This change do that tests (99.5%) consistently end up in $TESTDIR where they started, thus making it simpler to extend them or move them around.
-
kiilerix authored
This will enable some tests for windows.
-
- Apr 03, 2012
-
-
Thomas Arendsen Hein authored
With this quoting tests will work e.g. in "/tmp/foo bar/mercurial/".
-
- Nov 16, 2011
-
-
kiilerix authored
Windows will use a different and localized message.
-
- Nov 07, 2011
- Apr 30, 2011
-
-
Nicolas Dumazet authored
-
- Apr 07, 2011
-
-
Matt Mackall authored
-
- Oct 09, 2010
-
-
kiilerix authored
Many globs now just match $TESTTMP and is no longer needed.
-
- Sep 30, 2010
-
-
Erik Zielke authored
The name of the test files is replaced with a glob * expression, thereby the tests does not depend on the filename of the file they are in.
-
- Sep 22, 2010
-
-
Brodie Rao authored
This adds a " (glob)" marker that works like a simpler version of (re): "*" is converted to ".*", and "?" is converted to ".". Both special characters can be escaped using "\", and the backslash itself can be escaped as well. Other glob-style syntax, like "**", "[chars]", or "[!chars]", isn't supported.
-
Brodie Rao authored
Consider this test: $ hg glog --template '{rev}:{node|short} "{desc}"\n' @ 2:20c4f79fd7ac "3" | | o 1:38f24201dcab "2" |/ o 0:2a18120dc1c9 "1" Because each line beginning with "|" can be compiled as a regular expression (equivalent to ".*|"), they will match any output. Similarly: $ echo foo The blank output line can be compiled as a regular expression and will also match any output. With this patch, none of the above output lines will be matched as regular expressions. A line must end in " (re)" in order to be matched as one. Lines are still matched literally first, so the following will pass: $ echo 'foo (re)' foo (re)
-
Brodie Rao authored
-
- Sep 17, 2010
-
-
Matt Mackall authored
-
- Sep 16, 2010
-
-
Matt Mackall authored
-
- Aug 14, 2010
-
-
Martin Geisler authored
-
- Jan 22, 2009
-
-
Dirkjan Ochtman authored
-
- Jan 04, 2009
-
-
Peter Arrenbrecht authored
-
- Dec 30, 2008
-
-
Peter Arrenbrecht authored
-
- Aug 10, 2007
-
-
Bryan O'Sullivan authored
The following properties of a path are now checked for: - under top-level .hg - starts at the root of a windows drive - contains ".." - traverses a symlink (e.g. a/symlink_here/b) - inside a nested repository If any of these is true, the path is rejected. The check for traversing a symlink is arguably stricter than necessary; perhaps we should be checking for symlinks that point outside the repository.
-