A Scalable, User-Friendly Source Control System.
Go to file
Matt Harbison 6b20f5bf8e add: check for the existence of a file matched inexactly before adding it
The change in 02ecc94fb657 created a problem on Windows and OS X:

    --- /usr/local/mercurial/tests/test-issue660.t
    +++ /usr/local/mercurial/tests/test-issue660.t.err
    @@ -47,6 +47,8 @@
     Should succeed - shadow removed:

       $ hg add b
    +  adding b/b
    +  b/b does not exist!

Prior to the failing 'hg add', the file 'b/b' was added and committed, then 'b'
was recursively deleted from the filesystem, file 'b' was created and the delete
was recorded with 'hg rm --after'.  This add is attempting to record the
existence of file 'b'.

A filesystem that is not case sensitive prevents dirstate.walk() from skipping
its step 3, and step 3 has the effect of inserting removed files into the walk
list.  The Linux code doesn't run through step 3, and didn't exhibit the
problem.  It's not clear why a non case sensitive filesystem triggers step 3,
given that the path normalization occurs in step 2.

Prior to 02ecc94fb657, part of the check here was 'f not in repo.dirstate'
instead of 'f not in wctx'.  Files in the 'r' state are filtered out of
context.__contains__() but not dirstate.__contains__().  Therefore the removed
file name wasn't added to the list of files to add when checking against
dirstate.  That change was to allow removed files to be readded, but adding a
file that doesn't exist is nonsensical.  If the user specifies a missing file,
it will be an exact match and will still fail.
2014-11-19 22:27:55 -05:00
contrib transaction: pass a vfs map to the transaction 2014-10-17 20:49:39 -07:00
doc gendoc: restore use of callable() since it was readded in Python 3.2 2014-06-23 09:23:57 -04:00
hgext mq: when adding headers in plain mode, separate them from message (issue4453) 2014-11-17 01:48:43 +01:00
i18n i18n-ja: synchronized with e47ebaad2ffc 2014-11-01 18:03:17 +09:00
mercurial add: check for the existence of a file matched inexactly before adding it 2014-11-19 22:27:55 -05:00
tests tests: choose the proper environment variable style for the platform 2014-11-20 22:33:40 -05:00
.hgignore hgignore: ignore the PyCharm workspace folder 2014-10-13 11:46:04 +02:00
.hgsigs Added signature for changeset 90c8254be0c0 2014-11-11 17:25:09 -06:00
CONTRIBUTORS Add note to CONTRIBUTORS file 2007-11-07 21:10:30 -06:00
COPYING COPYING: refresh with current address from fsf.org 2011-06-02 11:17:02 -05:00
hg hg: add support for HGUNICODEPEDANTRY environment variable 2014-06-23 09:33:07 -04:00
hgeditor Fixed a bashism with the use of $RANDOM in hgeditor. 2010-05-19 18:06:35 +02:00
hgweb.cgi mq: add a warning about uncommitted changes for qfinish 2011-11-10 15:40:34 -06:00
Makefile Makefile: update .PHONY 2014-11-01 20:00:31 +01:00
README readme: mention how to run in-place 2012-03-02 21:43:55 +02:00
setup.py config: introduce "built-in" default configuration settings in default.d 2014-09-04 21:36:35 +02:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install:

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing:

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See http://mercurial.selenic.com/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.