Lines Matching refs:file

6 # you may not use this file except in compliance with the License.
61 # Max size of patch or base file.
68 The last used email address is saved to a file and offered up as a suggestion
380 # Create an empty cookie file with mode 600
383 # Always chmod the cookie file
429 help="Optional path of a file that contains "
626 """Get the content of the upstream version of a file.
630 base_content: The contents of the base file.
632 the contents of the new file, since the diff output won't contain
633 information to reconstruct the current file.
634 is_binary: True iff the file is binary.
635 status: The status of the file.
643 """Helper that calls GetBase file for each file in the patch.
654 # On Windows if a file has property changes its filename uses '\'
666 """Uploads a file to the server."""
673 print ("Not uploading the %s file for %s because it's too large." %
679 print "Uploading %s file for %s" % (type, filename)
845 """Returns the contents of a file."""
846 file = open(filename, 'rb')
849 result = file.read()
851 file.close()
855 """Returns the status of a file."""
861 # If file is in a cl, the output will begin with
872 # the correct status for a file.
903 # If a file is copied its status will be "A +", which signifies
905 # upload the original file or else diff parsing will fail if the file was
908 # We'll need to upload the new content if we're adding a binary file
917 (status[0] == "A" and status[3] == "+") or # Copied file.
990 # Map of filename -> hash of base file.
1012 # We want to save the left hash, as that identifies the base file.
1031 if hash == "0" * 40: # All-zero hash indicates no base file.
1059 """Get relative path of a file according to the current directory,
1065 # If no file specified, restrict to the current subdir
1113 # HACK: strip error message about missing file/directory if it isn't in
1142 """Splits a patch into separate pieces for each file.
1161 # When a file is modified, paths use '/' between directories, however
1163 # otherwise the file shows up twice.
1182 """Uploads a separate patch for each file in the diff output.
1184 Returns a list of [patch_key, filename] for each file.
1191 " because the file is too large.")
1282 logging.info("Enabled upload of base file")
1319 file = open(options.description_file, 'r')
1320 description = file.read()
1321 file.close()
1324 # Send a hash of all the base file so the server can determine if a copy
1327 for file, info in files.iteritems():
1332 base_hashes += checksum + ":" + file
1335 # that it contains the file status.
1341 print "Patch is large, so uploading file patches separately."