Patchwork D8493: tests: show that `hg cp -A --at-rev .` doesn't work for renames

login
register
mail settings
Submitter phabricator
Date May 6, 2020, 7:01 p.m.
Message ID <differential-rev-PHID-DREV-wcpydbmvv4x4gqn64soi-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46259/
State Superseded
Headers show

Comments

phabricator - May 6, 2020, 7:01 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I clearly forgot to implement (and test) support for marking of
  renames when I added support for marking of copies :(

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D8493

AFFECTED FILES
  tests/test-rename-rev.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-rename-rev.t b/tests/test-rename-rev.t
--- a/tests/test-rename-rev.t
+++ b/tests/test-rename-rev.t
@@ -38,10 +38,28 @@ 
   A d1/d
     d1/b
 
+Test moved file (not copied)
+
+  $ hg co 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mv d1/b d1/d
+  $ hg rm -A d1/b
+  $ hg add d1/d
+  $ hg ci -m 'move d1/b to d1/d'
+  created new head
+BROKEN: this should work
+  $ hg cp -A --at-rev . d1/b d1/d
+  d1/b: no such file in rev 519850c3ea27
+  abort: --at-rev requires a single source
+  [255]
+  $ hg st -C --change .
+  A d1/d
+  R d1/b
+
 Test using directory as destination
 
   $ hg co 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ cp -R d1 d3
   $ hg add d3
   adding d3/a