##// END OF EJS Templates
rename: add support for --at-rev, which marks as copy and removes the source...
Martin von Zweigbergk -
r45928:5178dd22 default
parent child Browse files
Show More
@@ -5781,6 +5781,13 b' def remove(ui, repo, *pats, **opts):'
5781 [
5781 [
5782 (b'A', b'after', None, _(b'record a rename that has already occurred')),
5782 (b'A', b'after', None, _(b'record a rename that has already occurred')),
5783 (
5783 (
5784 b'',
5785 b'at-rev',
5786 b'',
5787 _(b'(un)mark renames in the given revision (EXPERIMENTAL)'),
5788 _(b'REV'),
5789 ),
5790 (
5784 b'f',
5791 b'f',
5785 b'force',
5792 b'force',
5786 None,
5793 None,
@@ -1,5 +1,9 b''
1 == New Features ==
1 == New Features ==
2
2
3 * `hg mv -A` can now be used with `--at-rev`. It behaves just like
4 `hg cp -A --at-rev`, i.e. it marks the destination as a copy of the
5 source whether or not the source still exists (but the source must
6 exist in the parent revision).
3
7
4
8
5 == New Experimental Features ==
9 == New Experimental Features ==
@@ -353,7 +353,7 b' Show all commands + options'
353 push: force, rev, bookmark, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure
353 push: force, rev, bookmark, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure
354 recover: verify
354 recover: verify
355 remove: after, force, subrepos, include, exclude, dry-run
355 remove: after, force, subrepos, include, exclude, dry-run
356 rename: after, force, include, exclude, dry-run
356 rename: after, at-rev, force, include, exclude, dry-run
357 resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template
357 resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template
358 revert: all, date, rev, no-backup, interactive, include, exclude, dry-run
358 revert: all, date, rev, no-backup, interactive, include, exclude, dry-run
359 rollback: dry-run, force
359 rollback: dry-run, force
@@ -43,7 +43,7 b' Test single file'
43 A d1/d
43 A d1/d
44 d1/b
44 d1/b
45
45
46 Test moved file (not copied)
46 Test moved file (not copied) using 'hg cp' command
47
47
48 $ hg co 0
48 $ hg co 0
49 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
49 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
@@ -59,10 +59,40 b' Test moved file (not copied)'
59 d1/b
59 d1/b
60 R d1/b
60 R d1/b
61
61
62 Test moved file (not copied) using 'hg mv' command
63
64 $ hg co 0
65 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 $ mv d1/b d1/d
67 $ hg rm -A d1/b
68 $ hg add d1/d
69 $ hg ci -m 'move d1/b to d1/d'
70 created new head
71 $ hg mv -A --at-rev . d1/b d1/d
72 saved backup bundle to $TESTTMP/.hg/strip-backup/519850c3ea27-153c8fbb-copy.hg
73 $ hg st -C --change .
74 A d1/d
75 d1/b
76 R d1/b
77
78 Test moved file (not copied) for which source still exists
79
80 $ hg co 0
81 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 $ cp d1/b d1/d
83 $ hg add d1/d
84 $ hg ci -m 'copy d1/b to d1/d'
85 created new head
86 $ hg mv -A --at-rev . d1/b d1/d
87 saved backup bundle to $TESTTMP/.hg/strip-backup/c8d0f6bcf7ca-1c9bb53e-copy.hg
88 $ hg st -C --change .
89 A d1/d
90 d1/b
91
62 Test using directory as destination
92 Test using directory as destination
63
93
64 $ hg co 0
94 $ hg co 0
65 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
95 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
66 $ cp -R d1 d3
96 $ cp -R d1 d3
67 $ hg add d3
97 $ hg add d3
68 adding d3/a
98 adding d3/a
General Comments 0
You need to be logged in to leave comments. Login now