# HG changeset patch
# User Chris Cannam
# Date 1314035166 -3600
# Node ID 21aa41b62c3a701b48ad4f7c462db61f3b7e5757
# Parent a9032181c37d1ef27e332687d724ba36ccb78cbe
Add back/forward/home to Help window, and some Help edits
diff -r a9032181c37d -r 21aa41b62c3a easyhg.qrc
--- a/easyhg.qrc Mon Aug 22 15:19:00 2011 +0100
+++ b/easyhg.qrc Mon Aug 22 18:46:06 2011 +0100
@@ -24,6 +24,9 @@
Provided the clone has been successful, you should now have a local repository to start working in.
Just open it:
+To start using version control for an initially empty project, just +initialise a repository in an empty folder:
1. Click the Open toolbar button or use File -> Open
-2. Select “Local repository” as the thing you want to open
+2. Select “File folder” as the thing you want to open
-3. Browse to the working folder for your local repository
+3. Make a new folder in the file dialog and browse to it
4. Click OK
-A new repository will be created, stowed into the empty working folder +you selected. At first, it will have an empty history. You can then +start to add and commit changes to your files. +
Just open it:
+ +1. Click the Open toolbar button or use File -> Open
+ +2. Select “Local repository” as the thing you want to open
+ +3. Browse to the working folder for your local repository
+ +4. Click OK
+ diff -r a9032181c37d -r 21aa41b62c3a help/a-20.html --- a/help/a-20.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-20.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,5 +1,4 @@ -No problem.
- -Any files that the version control system knows about but that can't -be found in your working copy are shown as “Missing” under “My -work”. All you need to do is:
+Any files that the version control system thinks should be there, but +that can't be found in your working copy are shown as “Missing” +under “My work”. All you need to do is:
1. Find your file in the “Missing” list and select it
@@ -20,9 +17,3 @@ - - - - - -There are two common general approaches:
+ +Permit your colleagues to “pull” your changes directly from the local repository in your working folder, or
+ +“Push” your changes to a remote repository which you can all use as a master copy.
+ diff -r a9032181c37d -r 21aa41b62c3a help/a-31.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/a-31.html Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,21 @@ + + + +You can do this on a temporary basis using EasyMercurial, for +occasional ad-hoc transfers:
+ +1. In EasyMercurial on your computer, go to File -> Share Repository and make a note of the URL shown in the window that is opened
+ +2. In EasyMercurial on your colleague's computer, either open a new empty folder, or reopen a repository that has been pulled from your repository in the past
+ +3. Go to Remote -> Set Remote Location on your colleague's computer and enter the URL you made a note of in the first step
+ +4. Click Pull in the main toolbar on your colleague's EasyMercurial program.
+ +There are various ways to set this relationship on a less temporary +footing if you have shared access to your local folder, through +network filesystems or via remote login to the computer you are using. +Configuring this is outside the scope of this help document.
+ diff -r a9032181c37d -r 21aa41b62c3a help/a-32.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/a-32.html Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,5 @@ + + + +Someone gave me a repository URL and asked me to clone it
-I have a Mercurial repository on my local computer and I want to use it with EasyMercurial
+I want to start a completely new project using version control
+I have a Mercurial repository on my local computer already and I want to use it with EasyMercurial
I've added a new file: what do I do with it?
I have changed some files and I want to record the changes
I want to remove, rename, or copy a file
+I have committed some changes – how do I share them with my colleagues?
+I want to let my colleagues pull changes from my local repository
+I want to push my changes to a master repository shared with my colleagues
diff -r a9032181c37d -r 21aa41b62c3a help/topics/12.txt --- a/help/topics/12.txt Mon Aug 22 15:19:00 2011 +0100 +++ b/help/topics/12.txt Mon Aug 22 18:46:06 2011 +0100 @@ -1,16 +1,22 @@ {Opening and initialising things} -I have a Mercurial repository on my local computer and I want to use it with EasyMercurial +I want to start a completely new project using version control -Just open it: +To start using version control for an initially empty project, just +initialise a repository in an empty folder: *1. Click the Open toolbar button or use File -> Open* -#openlocal50 +#openfolder50 -*2. Select "Local repository" as the thing you want to open* +*2. Select "File folder" as the thing you want to open* -*3. Browse to the working folder for your local repository* +*3. Make a new folder in the file dialog and browse to it* *4. Click OK* +A new repository will be created, stowed into the empty working folder +you selected. At first, it will have an empty history. You can then +start to add and commit changes to your files. + + * Note: the equivalent Mercurial command for this is *hg init* diff -r a9032181c37d -r 21aa41b62c3a help/topics/13.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/topics/13.txt Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,16 @@ +{Opening and initialising things} + +I have a Mercurial repository on my local computer already and I want to use it with EasyMercurial + +Just open it: + +*1. Click the Open toolbar button or use File -> Open* + +#openlocal50 + +*2. Select "Local repository" as the thing you want to open* + +*3. Browse to the working folder for your local repository* + +*4. Click OK* + diff -r a9032181c37d -r 21aa41b62c3a help/topics/30.txt --- a/help/topics/30.txt Mon Aug 22 15:19:00 2011 +0100 +++ b/help/topics/30.txt Mon Aug 22 18:46:06 2011 +0100 @@ -1,4 +1,10 @@ {Sharing changes} -I have committed a few changes -- how do I share them with my colleagues? +I have committed some changes -- how do I share them with my colleagues? +There are two common general approaches: + +[[31|Permit your colleagues to "pull" your changes]] directly from the local repository in your working folder, _or_ + +[[32|"Push" your changes to a remote repository]] which you can all use as a master copy. + diff -r a9032181c37d -r 21aa41b62c3a help/topics/31.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/topics/31.txt Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,20 @@ +{Sharing changes} + +I want to let my colleagues pull changes from my local repository + +You can do this on a temporary basis using EasyMercurial, for +occasional ad-hoc transfers: + +*1. In EasyMercurial on your computer, go to File -> Share Repository and make a note of the URL shown in the window that is opened* + +*2. In EasyMercurial on your colleague's computer, either [[12|open a new empty folder]], or [[13|reopen a repository]] that has been pulled from your repository in the past* + +*3. Go to Remote -> Set Remote Location on your colleague's computer and enter the URL you made a note of in the first step* + +*4. Click Pull in the main toolbar on your colleague's EasyMercurial program.* + +There are various ways to set this relationship on a less temporary +footing if you have shared access to your local folder, through +network filesystems or via remote login to the computer you are using. +Configuring this is outside the scope of this help document. + diff -r a9032181c37d -r 21aa41b62c3a help/topics/32.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/topics/32.txt Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,4 @@ +{Sharing changes} + +I want to push my changes to a master repository shared with my colleagues + diff -r a9032181c37d -r 21aa41b62c3a images/back.png Binary file images/back.png has changed diff -r a9032181c37d -r 21aa41b62c3a images/forward.png Binary file images/forward.png has changed diff -r a9032181c37d -r 21aa41b62c3a images/home.png Binary file images/home.png has changed diff -r a9032181c37d -r 21aa41b62c3a src/mainwindow.cpp --- a/src/mainwindow.cpp Mon Aug 22 15:19:00 2011 +0100 +++ b/src/mainwindow.cpp Mon Aug 22 18:46:06 2011 +0100 @@ -56,10 +56,10 @@ MainWindow::MainWindow(QString myDirPath) : m_myDirPath(myDirPath), + m_helpDialog(0), m_fsWatcherGeneralTimer(0), m_fsWatcherRestoreTimer(0), - m_fsWatcherSuspended(false), - m_helpDialog(0) + m_fsWatcherSuspended(false) { setWindowIcon(QIcon(":images/easyhg-icon.png")); @@ -2658,8 +2658,6 @@ QDir localRepoDir; QDir workFolderDir; - bool workFolderExist = true; - bool localRepoExist = true; m_remoteRepoActionsEnabled = true; if (m_remoteRepoPath.isEmpty()) { @@ -2669,19 +2667,14 @@ m_localRepoActionsEnabled = true; if (m_workFolderPath.isEmpty()) { m_localRepoActionsEnabled = false; - workFolderExist = false; } if (m_workFolderPath == "" || !workFolderDir.exists(m_workFolderPath)) { m_localRepoActionsEnabled = false; - workFolderExist = false; - } else { - workFolderExist = true; } if (!localRepoDir.exists(m_workFolderPath + "/.hg")) { m_localRepoActionsEnabled = false; - localRepoExist = false; } bool haveDiff = false; @@ -3098,13 +3091,32 @@ m_helpDialog = new QDialog; QGridLayout *layout = new QGridLayout; m_helpDialog->setLayout(layout); + QPushButton *home = new QPushButton; + home->setIcon(QIcon(":images/home.png")); + layout->addWidget(home, 0, 0); + QPushButton *back = new QPushButton; + back->setIcon(QIcon(":images/back.png")); + layout->addWidget(back, 0, 1); + QPushButton *fwd = new QPushButton; + fwd->setIcon(QIcon(":images/forward.png")); + layout->addWidget(fwd, 0, 2); QTextBrowser *text = new QTextBrowser; text->setOpenExternalLinks(true); - layout->addWidget(text, 0, 0); + layout->addWidget(text, 1, 0, 1, 4); text->setSource(QUrl("qrc:help/topics.html")); QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Close); connect(bb, SIGNAL(rejected()), m_helpDialog, SLOT(hide())); - layout->addWidget(bb, 1, 0); + connect(text, SIGNAL(backwardAvailable(bool)), + back, SLOT(setEnabled(bool))); + connect(text, SIGNAL(forwardAvailable(bool)), + fwd, SLOT(setEnabled(bool))); + connect(home, SIGNAL(clicked()), text, SLOT(home())); + connect(back, SIGNAL(clicked()), text, SLOT(backward())); + connect(fwd, SIGNAL(clicked()), text, SLOT(forward())); + back->setEnabled(false); + fwd->setEnabled(false); + layout->addWidget(bb, 2, 0, 1, 4); + layout->setColumnStretch(3, 20); m_helpDialog->resize(450, 500); } QTextBrowser *tb = m_helpDialog->findChild