# 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 @@ images/fileopen.png images/star.png images/easyhg-icon.png + images/home.png + images/back.png + images/forward.png help/topics.html help/help.css help/a-04.html @@ -35,6 +38,8 @@ help/a-22.html help/a-23.html help/a-30.html + help/a-31.html + help/a-32.html help/images/openremote50.png help/images/openfolder50.png help/images/openlocal50.png diff -r a9032181c37d -r 21aa41b62c3a help/a-04.html --- a/help/a-04.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-04.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,5 +1,4 @@ -

Back to Topics


What is a repository?

@@ -37,4 +36,3 @@ each other's work, or which you can use to make your work public, or simply use as a private backup.

-

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-10.html --- a/help/a-10.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-10.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,5 +1,4 @@ -

Back to Topics


Someone gave me a repository URL and asked me to clone it

@@ -36,4 +35,3 @@

Provided the clone has been successful, you should now have a local repository to start working in.

-

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-11.html --- a/help/a-11.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-11.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,5 +1,4 @@ -

Back to Topics


I have a folder of source code or documents on my computer and I want to use version control to manage it

@@ -26,4 +25,3 @@ them. The default is for all files in the folder to be treated as “untracked”, i.e. not included in the history.) -

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-12.html --- a/help/a-12.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-12.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,19 +1,22 @@ -

Back to Topics


-

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

-

+

-

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

-

Back to Topics

+

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. +

diff -r a9032181c37d -r 21aa41b62c3a help/a-13.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/a-13.html Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,17 @@ + + + +

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

+ +

+ +

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 @@ -

Back to Topics


I've added a new file: what do I do with it?

@@ -29,4 +28,3 @@ that such files don't show up in the Untracked list by right-clicking on them and choosing “Ignore...".

-

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-21.html --- a/help/a-21.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-21.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,5 +1,4 @@ -

Back to Topics


I have changed some files and I want to record the changes

@@ -21,4 +20,3 @@ and choose Commit from the context menu.

-

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-22.html --- a/help/a-22.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-22.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,5 +1,4 @@ -

Back to Topics


I want to remove, rename, or copy a file

@@ -32,4 +31,3 @@ -

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-23.html --- a/help/a-23.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/a-23.html Mon Aug 22 18:46:06 2011 +0100 @@ -1,14 +1,11 @@ -

Back to Topics


I just deleted a file using the system file manager – then remembered I hadn't told the version control tool about it – what now?

-

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 @@ - - - - - -

Back to Topics

diff -r a9032181c37d -r 21aa41b62c3a help/a-30.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/help/a-30.html Mon Aug 22 18:46:06 2011 +0100 @@ -0,0 +1,11 @@ + + + +

I have committed some changes – how do I share them with my colleagues?

+ +

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 @@ + + + +

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 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 @@ + + + +

I want to push my changes to a master repository shared with my colleagues

+ diff -r a9032181c37d -r 21aa41b62c3a help/generate.sh --- a/help/generate.sh Mon Aug 22 15:19:00 2011 +0100 +++ b/help/generate.sh Mon Aug 22 18:46:06 2011 +0100 @@ -1,7 +1,6 @@ #!/bin/bash css='' -backlink='

Back to Topics

' echo "$css" > topics.html cat intro.html >> topics.html @@ -14,7 +13,6 @@ out="a-$b.html" echo "$css" > "$out" - echo "$backlink
" >> "$out" cat "$x" | perl -e ' $_ = join "", <>; @@ -42,8 +40,6 @@ print; ' >> "$out" - echo "
$backlink" >> "$out" - category=`grep '^{.*}$' "$x" | sed 's/[{}]//g'` if [ "$category" != "$pcat" ]; then diff -r a9032181c37d -r 21aa41b62c3a help/topics.html --- a/help/topics.html Mon Aug 22 15:19:00 2011 +0100 +++ b/help/topics.html Mon Aug 22 18:46:06 2011 +0100 @@ -8,9 +8,14 @@

Opening and initialising things

Someone gave me a repository URL and asked me to clone it

I have a folder of source code or documents on my computer and I want to use version control to manage 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

Making changes

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 just deleted a file using the system file manager – then remembered I hadn't told the version control tool about it – what now?

+

Sharing changes

+

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();