Home | History | Annotate | Download | only in git

Lines Matching refs:from_path

43 def MakeDestinationPath(from_path, to_path):
49 if not IsHandledFile(from_path):
52 from_path)
54 to_path = os.path.join(to_path, os.path.basename(from_path))
63 def MoveFile(from_path, to_path):
64 """Performs a git mv command to move a file from |from_path| to |to_path|.
66 if not os.system('git mv %s %s' % (from_path, to_path)) == 0:
70 def UpdatePostMove(from_path, to_path):
71 """Given a file that has moved from |from_path| to |to_path|,
77 from_path = from_path.replace('\\', '/')
80 if os.path.splitext(from_path)[1] in ['.h', '.hh']:
81 UpdateIncludeGuard(from_path, to_path)
85 r'(#(include|import)\s*["<])%s([>"])' % re.escape(from_path),
101 r'(//.*)%s' % re.escape(from_path),
114 r'([\'"])%s([\'"])' % re.escape(PathMinusFirstComponent(from_path)),
157 parser = optparse.OptionParser(usage='%prog FROM_PATH... TO_PATH')
182 for from_path in from_paths:
183 if not opts.error_for_non_source_file and not IsHandledFile(from_path):
184 print '%s does not appear to be a source file, skipping' % (from_path)
186 to_path = MakeDestinationPath(from_path, orig_to_path)
188 MoveFile(from_path, to_path)
189 UpdatePostMove(from_path, to_path)