Mercurial > hg
view tests/test-symlinks @ 12083:ebfc46929f3e stable
help: refer to user configuration file more consistently
Currently, a number of commands and help topics mention the user hgrc
file in different ways. Among these are following:
1. .hgrc - "please specify your commit editor/username in your .hgrc
file", bookmarks, color, hgk, pager, hg help environment
2. $HOME/.hgrc - hg help paths, hgrc(5), hg(1)
3. ~/.hgrc - hgrc(5)
In addition to being inconsistent, none of these make sense on
Windows. This patch replaces the above with a more general term of
"[your] configuration file".
author | Brodie Rao <brodie@bitheap.org> |
---|---|
date | Fri, 27 Aug 2010 22:36:35 -0400 |
parents | c52057614c72 |
children |
line wrap: on
line source
#!/bin/sh #Test bug regarding symlinks that showed up in hg 0.7 #Author: Matthew Elder <sseses@gmail.com> "$TESTDIR/hghave" symlink || exit 80 #make and initialize repo hg init test; cd test; #make a file and a symlink touch foo; ln -s foo bar; #import with addremove -- symlink walking should _not_ screwup. hg addremove #commit -- the symlink should _not_ appear added to dir state hg commit -m 'initial' #add a new file so hg will let me commit again touch bomb #again, symlink should _not_ show up on dir state hg addremove #Assert screamed here before, should go by without consequence hg commit -m 'is there a bug?' cd .. ; rm -r test hg init test; cd test; mkdir dir touch a.c dir/a.o dir/b.o # test what happens if we want to trick hg hg commit -A -m 0 echo "relglob:*.o" > .hgignore rm a.c rm dir/a.o rm dir/b.o mkdir dir/a.o ln -s nonexist dir/b.o mkfifo a.c # it should show a.c, dir/a.o and dir/b.o deleted hg status hg status a.c echo '# test absolute path through symlink outside repo' cd .. p=`pwd` hg init x ln -s x y cd x touch f hg add f hg status "$p"/y/f echo '# try symlink outside repo to file inside' ln -s x/f ../z # this should fail hg status ../z && { echo hg mistakenly exited with status 0; exit 1; } || : cd .. ; rm -r test hg init test; cd test; echo '# try cloning symlink in a subdir' echo '1. commit a symlink' mkdir -p a/b/c cd a/b/c ln -s /path/to/symlink/source demo cd ../../.. hg stat hg commit -A -m 'add symlink in a/b/c subdir' echo '2. clone it' cd .. hg clone test testclone echo '# git symlink diff' cd testclone hg diff --git -r null:tip hg export --git tip > ../sl.diff echo '# import git symlink diff' hg rm a/b/c/demo hg commit -m'remove link' hg import ../sl.diff hg diff --git -r 1:tip