Commit Graph

11 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
1bf1db0503 Enable path validation for copy, rename, debugwalk and other canonpath users.
This fixed the last bit of issue134.
Added some tests to test-rename and test-walk.
2006-03-19 14:53:58 +01:00
Thomas Arendsen Hein
1b244c77c7 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Some systems show "Thu Jan 01" instead of "Thu Jan  1", which breaks tests.
Using "1000000" yields "Mon Jan 12 13:46:40 1970", which looks the same on
all systems.
2006-03-13 13:05:41 +01:00
Robin Farine
954a141878 copy/rename to a removed destination file
When the destination of a copy or rename operation has been
marked for removal, we need to restore it before we overwrite
it with the new content. This also handles the case of
idempotent renames, i.e.

    hg rename "a" "b"
    hg rename "b" "a"
2006-02-28 23:47:40 -08:00
Robin Farine
cd5d5db3e2 transitive copy/rename
Add support for transitive copy or rename operations, e.g.

    hg rename a b
    ... (possibly edit b)
    hg rename b c
    hg commit ...

by actually renaming "b" as "c" while recording a copy of
"a" to "c" and a removal of "a".
2006-02-18 07:37:59 -08:00
Robin Farine
bf07bbbd01 copy & rename can ignore removed source files
As mercurial now distinguishes deleted files from removed files,
we can skip removed source files while copying or renaming.
2006-01-24 13:59:01 +13:00
Robin Farine
76456b288f copy/rename '.' or '..' correctly 2006-01-24 13:57:09 +13:00
Robin Farine
1ad6c4c7e4 fix rename --after 2005-12-01 10:48:35 -06:00
Matt Mackall
763f80e0dc Fix up test-help, mark test-rename +x 2005-11-08 10:36:23 -08:00
Robin Farine
8870c8c85a avoid to copy more than one file to the same destination file 2005-11-08 10:35:13 -08:00
Robin Farine
af91f5f15b copy & rename don't overwrite unless --force is specified 2005-11-08 10:35:09 -08:00
Robin Farine
7eb6f65c8b generalize copy/rename to handle more than one source directory 2005-11-08 10:35:05 -08:00