Skip to content

Commit

Permalink
graft: add test for xdir graft of current commit
Browse files Browse the repository at this point in the history
Summary: Add a failing test where the src and dst of the graft are the same commit. This should be allowed since the path mappings cause the src and dst to become different during the merge operation.

Reviewed By: sggutier

Differential Revision: D60027031

fbshipit-source-id: 6004b7dd90be08bc26967ae55597cc39b8ddf519
  • Loading branch information
muirdm authored and facebook-github-bot committed Jul 23, 2024
1 parent 62520de commit 163a62e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions eden/scm/tests/test-graft-xdir.t
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,26 @@ Can do multiple mappings in a single graft:
@@ -1,1 +1,1 @@
-A
+AA


Multiple mappings can all follow renames:
$ newclientrepo
$ drawdag <<EOS
> G # G/dir/rename = AA\n
> |
> F # F/dir/rename = A\n (renamed from dir/file)
> |
> E # E/dir3/rename3 = A\n (renamed from dir3/file)
> |
> D # D/dir3/file = A\n
> |
> C # C/dir2/rename2 = A\n (renamed from dir2/file)
> |
> B # B/dir2/file = A\n
> |
> A # A/dir/file = A\n
> EOS
$ hg go -q $G
$ hg graft -qr $G --from-path dir --to-path dir2 --from-path dir --to-path dir3
skipping ancestor revision 301f396cc76c
[255]

0 comments on commit 163a62e

Please sign in to comment.