if self.edit_template(fileName):
# read the edited message and submit
+ ret = True
tmpFile = open(fileName, "rb")
message = tmpFile.read()
tmpFile.close()
else:
# skip this patch
+ ret = False
print "Submission cancelled, undoing p4 changes."
for f in editedFiles:
p4_revert(f)
os.remove(f)
os.remove(fileName)
- return True # success
+ return ret
# Export git tags as p4 labels. Create a p4 label and then tag
# with that.
cd "$git" &&
echo line >>file1 &&
git commit -a -m "change 3 (not really)" &&
- printf "bad response\nn\n" | git p4 submit &&
+ printf "bad response\nn\n" | test_expect_code 1 git p4 submit &&
p4 changes //depot/... >wc &&
test_line_count = 2 wc
)