require 'test/unit' class MoveTest < Test::Unit::TestCase include MirrorTest def testSimpleMove root = use_source file1 = File.join(root, "file1") File.open(file1, "w") do |f| f.puts("Some content") end @p4.run_add(file1) @p4.run_submit("-d", "File added") file2 = File.join(root, "file2") @p4.run_edit(file1) @p4.run_move(file1, file2) mirror_and_compare() root = use_target opened = @p4.run_opened("#{root}/...") assert(opened.length == 2, "Not two files open under target root") end def testMoveOldRevision root = use_source file1 = File.join(root, "file1") File.open(file1, "w") do |f| f.puts("Some content") end @p4.run_add(file1) @p4.run_submit("-d", "File added") # edit once @p4.run_edit(file1) File.open(file1, "a") do |f| f.puts("More content") end @p4.run_submit("-d", "File edited") # edit twice @p4.run_edit(file1) File.open(file1, "a") do |f| f.puts("More content") end @p4.run_submit("-d", "File edited") @p4.run_sync("#{file1}#1") @p4.run_edit(file1) # editing of old revision, will send out message that we need to resolve File.open(file1, "a") do |f| f.puts("Different content") end @p4.run_sync("#{file1}#2") @p4.run_resolve("-ay") file2 = File.join(root, "file2") @p4.run_move(file1, file2) @p4.run_sync(file2) # will bring up the request to resolve mirror_and_compare() root = use_target opened = @p4.run_opened("#{root}/...") assert(opened.length == 2, "Not two files open under target root") end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 8264 | Sven Erik Knop |
MirrorPending. All test cases work including integrating moves in various resolve stages. |
||
#2 | 8263 | Sven Erik Knop | Added capability to add with moved files and simple resolves. | ||
#1 | 8257 | Sven Erik Knop |
MirrorPending ... a ruby implementation of a shelving replacement Proof of concept, not production code. |