[PATCH 2 of 3 v4] tests: add and update tests for issue4028

Gábor Stefanik gabor.stefanik at nng.com
Wed Aug 3 16:23:17 EDT 2016


# HG changeset patch
# User Gábor Stefanik <gabor.stefanik at nng.com>
# Date 1470253973 -7200
#      Wed Aug 03 21:52:53 2016 +0200
# Node ID 465b34b0657f87b63c9fe2b36670f540eda45dea
# Parent  aa1f05a3ecdc720ddfd62821784c30d1f1f698cf
tests: add and update tests for issue4028

diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -179,6 +179,11 @@
   committing changelog
   grafting 5:97f8bfe72746 "5"
     searching for copies back to rev 1
+    unmatched files new in both:
+     b
+    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+     src: 'c' -> dst: 'b' *
+    checking for directory renames
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746
@@ -193,6 +198,11 @@
   scanning for duplicate grafts
   grafting 4:9c233e8e184d "4"
     searching for copies back to rev 1
+    unmatched files new in both:
+     b
+    all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+     src: 'c' -> dst: 'b' *
+    checking for directory renames
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d
@@ -842,3 +852,24 @@
   |/
   o  0
   
+Graft from behind a move or rename
+
+  $ hg init graftmove
+  $ cd graftmove
+  $ echo c1 > f1
+  $ hg ci -qAm 0
+  $ hg mv f1 f2
+  $ hg ci -qAm 1
+  $ echo c2 > f2
+  $ hg ci -qAm 2
+  $ hg up -q 0
+  $ hg graft -r 2
+  grafting 2:8a20493ece2a "2" (tip)
+  merging f1 and f2 to f1
+  $ hg status --change .
+  M f1
+  $ hg cat f1
+  c2
+  $ hg cat f2
+  f2: no such file in rev ee1f64f8088b
+  [1]


More information about the Mercurial-devel mailing list