PyCharm 3.1.0 Web Help

VCS | Apply Patch


Use the dialog box to restore changes that were preserved in a patch file in the specified directory.

Item Tooltip and Shortcut Description
Patch file name In this text box, specify the name of the *.patch file to be applied. Type the fully qualified name manually or click the Browse button browseButton.png and locate the desired patch file using Select Patch File dialog box, that opens.
groupByPackage Group by Directory
Ctrl+PCtrl+PCtrl+PCtrl+PCtrl+PCtrl+PCtrl+PCtrl+PCommand PCommand PCommand P
Use this button to toggle between the flat view and the directory tree view. Select the check boxes next to the changes that you want to be applied.
expandAll.png collapseAll Expand All/Collapse All
Ctrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCtrl+NumPad+ or Ctrl+EqualsCommand NumPad or Command EqualsCommand NumPad or Command EqualsCommand NumPad or Command Equals
Ctrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCtrl+NumPad - or Ctrl+MinusCommand NumPad - or Command MinusCommand NumPad - or Command MinusCommand NumPad - or Command Minus
Click this button to have all nodes expanded/collapsed.
iconSelectAll Select All
Ctrl+ACtrl+ACtrl+ACtrl+ACtrl+X, HCtrl+ACtrl+ACtrl+ACommand ACommand ACommand A
Click this button to select all the files in the list or directory tree.
icon_vcs_basic_directory.png Map base directory In the dialog that opens, select the directory relative to which file names in the patch file will be interpreted. You can map a base directory to a single file, directory, or to a selection.
icon_showDiff.png Show Differences
Ctrl+DCtrl+DCtrl+DCtrl+DMeta+DCtrl+DCtrl+D, Ctrl+Shift+Down or Ctrl+Shift+UpCtrl+DCommand DCommand DCommand D
Click this button to open the Differences Viewer that shows the differences between your local working copy, the repository version, and the patch. Use the buttons Compare Previous File comparePreviousFile.png and Compare Next File compareNextFile.png to have the files in patch compared in a chain.

Tip

If the patch cannot be applied without conflicts, the lines with conflicts are highlighted red.

icon_vcs_strip_directory.png Strip Directory Use this button to have the changes applied to files located in other directories than specified in the patch. Clicking this button removes one slash in the path to the target file. Click the button as many times as many leading directories you need to strip. The number of removed slashes is indicated in square brackets.
icon_vcs_restore_directory.png Restore Directory Use this button to revert the last strip directory action. Click the button as many times as many previously stripped leading directories you need to restore.
icon_vcs_reset_directories.png Reset Directories Use this button to revert all the strip directory actions in the selection.
icon_vcs_remove_directories.png Remove Directories Click this button to have all the leading directories stripped and have the changes applied to the file with the specified name in the base directory.
refresh Refresh Click this button to synchronize the tree with the current state of the file system.
Summary This section displays summary information for the currently selected change list (the number of modified, new, and deleted files).
Existing Changelist Select this option to have the patched files added to an existing changelist and select the desired changelist from the drop-down list.
New Changelist Select this option to have a new changelist created and add the patched files to it.
  • Name - in this text box, type the name of the new changelist. By default, the field is filled in with the name of the current patch.
  • Comment in in this text box, type the comment to the new changelist.
  • Make this changelist active - select this check box to have all the modified files automatically added the new changelist.
  • Track Context - select this check box to have PyCharm reload the context of the task associated with the new changelist, when the changelist is activated.

See Also

Concepts:

Procedures:

Web Resources: