diff --git a/doc/images/qtcreator-vcs-commit.png b/doc/images/qtcreator-vcs-commit.png index 12ad4345217b2203f496d2a004d2f2d8675e0a0c..80a913f6b74c9179e77cf6464e415e1d4bf88279 100644 Binary files a/doc/images/qtcreator-vcs-commit.png and b/doc/images/qtcreator-vcs-commit.png differ diff --git a/doc/images/qtcreator-vcs-gitbranch.png b/doc/images/qtcreator-vcs-gitbranch.png index 398de10ee6595f196b5dac31407a310c1b201f31..ccf292dc9b02658c535681314f3f8e3aa0f5e433 100644 Binary files a/doc/images/qtcreator-vcs-gitbranch.png and b/doc/images/qtcreator-vcs-gitbranch.png differ diff --git a/doc/images/qtcreator-vcs-pane.png b/doc/images/qtcreator-vcs-pane.png index faea0cf32e1a20cfceb71e79274d694cfdb04354..5179240384467b1fa8952ec73d6f1ead767331df 100644 Binary files a/doc/images/qtcreator-vcs-pane.png and b/doc/images/qtcreator-vcs-pane.png differ diff --git a/doc/qtcreator.qdoc b/doc/qtcreator.qdoc index efaabcf658b0db564d544ca95a571e8ef6899c07..192100816294934b2cf8d70e72944a44bf33bd01 100644 --- a/doc/qtcreator.qdoc +++ b/doc/qtcreator.qdoc @@ -389,6 +389,8 @@ \o \gui{Search Results} \o \gui{Application Output} \o \gui{Compile Output} + \o \gui{General Messages} + \o \gui{Version Control} \endlist Output panes are available in all \l{Qt Creator modes}{modes}. @@ -396,6 +398,9 @@ an open output pane, click the \gui {Maximize Output Pane} button or press \key {Alt+9}. + To open the \gui{General Messages} and \gui{Version Control} + panes, select \gui {Window > Output Panes}. + \section2 Build Issues @@ -884,7 +889,7 @@ \gui{Pastebin.com}. For example, you might ask colleagues to review a change that you plan to - submit to a version control system. If you use the git version control system, + submit to a version control system. If you use the Git version control system, you can create a \e{diff} view by selecting \gui{Tools} > \gui{Git} > \gui{Diff Repository}. You can then upload its contents to the server by choosing \gui{Tools} > \gui{Code Pasting} > \gui{Paste Snippet...}. The reviewers can retrieve @@ -2835,7 +2840,7 @@ \i \bold{Address} \i \bold{Notes} \row - \i \bold{git} + \i \bold{Git} \i \l{http://git-scm.com/} \i \row @@ -2860,20 +2865,21 @@ \section1 Setting Up Version Control Systems Qt Creator uses the version control system's command line clients to access - your repositories. To set up the version control system's command line - clients to access your repositories, make sure that the command line clients + your repositories. To allow access, make sure that the command line clients can be located using the \c{PATH} environment variable or specify the path to - the command line client executables, in the settings pages shown by - \gui{Tools} > \gui{Options...}. + the command line client executables in \gui{Tools} > \gui{Options...} > + \gui {Version Control}. + After you set up the version control system, use the command line to check + that everything works (for example, use the status command). If no issues arise, + you should be ready to use the system also from Qt Creator. \section1 Setting Up Common Options Select \gui{Tools} > \gui{Options...} > \gui{Version Control} > \gui{Common} - to view the common settings for version control systems. The following are - the options present in \gui{Common}: + to specify settings for submit messages: \list - \o \gui{Submit message checking script} is a script or program that + \o \gui{Submit message check script} is a script or program that can be used to perform checks on the submit message before submitting. The submit message is passed in as the script's first parameter. If there is an error, the script should output a @@ -2912,20 +2918,20 @@ Qt Creator allows for creating VCS repositories for version control systems that support local repository creation, such as - \bold{git} or \bold{hg}. + Git or Mercurial. When creating a new project by selecting \gui File > \gui{New File or Project...}, you can choose a version control system in the final wizard page. \section1 Using Version Control Systems - The version control sub-menus are in \gui{Tools} > \gui{Options...}. - The \gui{Version Control} page also displays the - version control system managing the current project + The \gui{Tools} menu contains a sub-menu for each supported version + control system. - Under \gui{Application Output} > \gui{Version Control}, there is an output - pane showing the commands that are executed, prepended by a - timestamp and the relevant output. + The \gui{Version Control} output pane displays the commands + that are executed, a timestamp, and the relevant output. + Select \gui {Window > Output Panes > Version Control} to open + the pane. \image qtcreator-vcs-pane.png @@ -2937,10 +2943,10 @@ asking whether the files should be added to a version control system. This happens when the parent directory or the project is already under version control and the system supports the concept of adding files, - for example, \bold{Perforce} and \bold{Subversion}. Alternatively, you can + for example, Perforce and Subversion. Alternatively, you can add files later by using the version control tool menus. - With \bold{git}, there is no concept of adding files. Instead, all modified + With Git, there is no concept of adding files. Instead, all modified files must be staged for a commit. @@ -2959,15 +2965,14 @@ \section2 Viewing Versioning History and Change Details Display the versioning history of a file by selecting \gui{Log} - (for \bold{git}) or \gui{Filelog}(for \bold{Perforce} and - \bold{Subversion}). Typically, the log output contains the date, the commit + (for Git and Mercurial) or \gui{Filelog} (for CVS, Perforce, and + Subversion). Typically, the log output contains the date, the commit message, and a change or revision identifier. Click on the identifier to display a description of the change including the diff. Right-clicking on an identifier brings up a context menu that lets you show annotation views of previous versions (see \l{Annotating Files}). \image qtcreator-vcs-log.png - \image qtcreator-vcs-describe.png \section2 Annotating Files @@ -2981,7 +2986,7 @@ version identifier at the beginning of a line and choose one of the revisions shown at the bottom of the context menu. This allows you to navigate through the history of the file and obtain previous versions of - it. It also works for \gui git/hg using SHA's. + it. It also works for Git and Mercurial using SHA's. The same context menu is available when right-clicking on a version identifier in the file log view of a single file. @@ -2994,6 +2999,8 @@ commit page containing a text editor where you can enter your commit message and a checkable list of modified files to be included. + \image qtcreator-vcs-commit.png + When you have finished filling out the commit page information, click on \gui{Commit} to start committing. @@ -3002,29 +3009,48 @@ editor, you can go back to it by closing the diff view. You can also check a diff view from the editor combo box showing the \gui{Opened files}. - \image qtcreator-vcs-commit.png + \section2 Reverting Changes + + To discard local changes to a file or project, use the \gui Revert + function or the \gui {Undo Changes/Undo Repository Changes} function + (for Git). The changes discarded depend on the version control system. + For example, in Perforce, select \gui{Revert File/Revert Project} + to discard changes made to open files, reverting them to the + revisions last synchronized from the repository. Select + \gui{Revert Unchanged} to revert files if their contents or file + type have not changed after they were opened for editing. - \section2 Using git-specific Menu Entries + \section2 Using Additional Git Functions - The git sub-menu contains additional entries: + The \gui Git sub-menu contains the following additional items: \table + + \row + \i \gui {Apply Patch/Apply Patch...} + \i Apply changes to a file or project from a diff file. You can + either apply a patch file that is open in Qt Creator or select + the patch file to apply from the file system. \row \i \gui{Stash Snapshot...} - \i Allows you to save a snapshot of your current + \i Save a snapshot of your current work under a name for later reference. For example, if you want to try out something and find out later that it does not work, you can discard it and return to the state of the snapshot. \row \i \gui{Stash} - \i Stash local changes prior to executing a \bold{pull}. + \i Stash local changes prior to executing a \gui{Pull}. + \row + \i \gui{Stash Pop} + \i Remove a single stashed state from the stash list and apply it on + top of the current working tree state. \row \i \gui{Pull} \i Pull changes from the remote repository. If there are locally modified files, you are prompted to stash those changes. - The \bold{git} settings page contains an option to do + The \gui Git options page contains an option to do a rebase operation while pulling. \row @@ -3050,7 +3076,85 @@ \i Displays a dialog showing the stashes created by \gui{Stash Snapshot...} with options to restore, display or delete them. + \row + \i \gui {Stage File for Commit} + \i Mark new or modified files for committing to the repository. + To undo this function, select \gui {Unstage File from Commit}. + \row + \i \gui{Show Commit...} + \i Select a commit to view. Enter the SHA of the commit + in the \gui Change field. + \endtable + + \section2 Using Additional Mercurial Functions + + The \gui Mercurial sub-menu contains the following additional items: + + \table + \row + \i \gui{Import} + \i Apply changes from a patch file. + \row + \i \gui{Incoming} + \i Monitor the status of a remote repository by listing + the changes that will be pulled. + \row + \i \gui{Outgoing} + \i Monitor the status of a remote repository by listing + the changes that will be pushed. + \row + \i \gui{Pull} + \i Pull changes from the remote repository. + \row + \i \gui{Update} + \i Look at an earlier version of the code. + \endtable + + \section2 Using Additional Perforce Functions + + When you start Qt Creator, it looks for the executable specified + in the \gui{P4 command} field in \gui{Tools > Options... > Version + Control > Perforce}. If you do not use Perforce and want to turn + off the check, clear this field. + + The \gui Perforce sub-menu contains the following additional items: + + \table + \row + \i \gui{Describe...} + \i View information about changelists and the files in them. + \row + \i \gui{Edit File} + \i Open a file for editing. + \row + \i \gui{Opened} + \i List files that are open for editing. + \row + \i \gui{Pending Changes...} + \i Group files for commit. + \row + \i \gui{Update All/Update Current Project} + \i Fetch the current version of the current project or all + projects from the repository. + \endtable + + + \section2 Using Additional Subversion Functions + + The \gui Subversion sub-menu contains the following additional items: + + \table + \row + \i \gui{Describe...} + \i Display commit log messages for a revision. + \row + \i \gui{Update Project/Update Repository} + \i Update your working copy. + \endtable + + + */ @@ -4640,7 +4744,7 @@ is modified externally, you have to restart Qt Creator for the changes to take effect. - To update the \tt{.files} on the \gui git repository use the following + To update the \tt{.files} on the \gui Git repository use the following script: \code git ls-files *.cpp *.h > MyProject.files