Commit Graph

19 Commits

Author SHA1 Message Date
Patrick Mezard
e043450e1d rename: do not overwrite existing broken symlinks 2010-09-20 21:46:39 +02:00
Matt Mackall
1cf1295d6e summary: report copies and renames 2010-06-09 16:39:25 -05:00
Peter Arrenbrecht
10bda79606 rename: make --after work if source is already in R state
I routinely want to use `hg addrem` and then fix up missed renames
manually using `hg mv -A`. This patch allows me to record such
renames from a source in state R to a target in state A.
2010-05-26 16:16:47 +02:00
Steve Losh
cbd3276a2b cmdutil: Warn when trying to copy/rename --after to a nonexistant file.
Currently running 'hg rename --after foo.txt bar.typo' is a silent no-op.  This patch adds a warning.  It also updates the copy and rename tests.

No actual functionality is changed.

fixes issue 1822
2010-05-01 18:39:40 -04:00
Wagner Bruna
ce83d27cac patch: separate reverse copy data (issue1959) 2010-02-11 11:22:57 -02:00
Benoit Boissinot
fc43ae9519 update --clean: do not unlink added files (issue575) 2009-05-19 03:59:58 +02:00
Alexis S. L. Carvalho
bcee2981c6 copy: if destination ends with "/", make sure it's a directory
Fixes issue724.
2007-09-24 19:00:11 -03:00
Alexis S. L. Carvalho
d69c63e916 test-rename: use hg status -C; don't use hg debugstate | grep copy 2007-07-03 03:06:40 -03:00
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