Skip to content

Commit e7ef93b

Browse files
committed
Merge branch 'sw/git-p4-unshelve-branched-files'
"git p4" update. * sw/git-p4-unshelve-branched-files: git-p4: allow unshelving of branched files
2 parents a3e6b42 + 0108f47 commit e7ef93b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

git-p4.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ def processContent(self, git_mode, relPath, contents):
13091309

13101310
class Command:
13111311
delete_actions = ( "delete", "move/delete", "purge" )
1312-
add_actions = ( "add", "move/add" )
1312+
add_actions = ( "add", "branch", "move/add" )
13131313

13141314
def __init__(self):
13151315
self.usage = "usage: %prog [options]"

t/t9832-unshelve.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ test_expect_success 'init depot' '
2222
: >file_to_move &&
2323
p4 add file_to_delete &&
2424
p4 add file_to_move &&
25-
p4 submit -d "add files to delete"
25+
p4 submit -d "add files to delete" &&
26+
echo file_to_integrate >file_to_integrate &&
27+
p4 add file_to_integrate &&
28+
p4 submit -d "add file to integrate"
2629
)
2730
'
2831

@@ -40,6 +43,7 @@ test_expect_success 'create shelved changelist' '
4043
p4 delete file_to_delete &&
4144
p4 edit file_to_move &&
4245
p4 move file_to_move moved_file &&
46+
p4 integrate file_to_integrate integrated_file &&
4347
p4 opened &&
4448
p4 shelve -i <<EOF
4549
Change: new
@@ -53,6 +57,7 @@ Files:
5357
//depot/file_to_delete
5458
//depot/file_to_move
5559
//depot/moved_file
60+
//depot/integrated_file
5661
EOF
5762
5863
) &&
@@ -65,6 +70,7 @@ EOF
6570
test_path_is_file file2 &&
6671
test_cmp file1 "$cli"/file1 &&
6772
test_cmp file2 "$cli"/file2 &&
73+
test_cmp file_to_integrate "$cli"/integrated_file &&
6874
test_path_is_missing file_to_delete &&
6975
test_path_is_missing file_to_move &&
7076
test_path_is_file moved_file

0 commit comments

Comments
 (0)