# HG changeset patch # User Chris Cannam # Date 1292580062 0 # Node ID bf366e0b90507ced4046b288a38a1f9038dc6756 # Parent 731aef59d5f4c9f50ef1e64cee065a6b7e0a1adb * Fix "Serve by HTTP"; stub out "Change Remote Location" diff -r 731aef59d5f4 -r bf366e0b9050 easyhg_en.qm Binary file easyhg_en.qm has changed diff -r 731aef59d5f4 -r bf366e0b9050 easyhg_en.ts --- a/easyhg_en.ts Fri Dec 17 09:36:39 2010 +0000 +++ b/easyhg_en.ts Fri Dec 17 10:01:02 2010 +0000 @@ -154,37 +154,37 @@ HgRunner - + User name: - + User name for "%1": - + Enter user name - + Password: - + Password for "%1" at "%2": - + Password for user "%1": - + Enter password @@ -226,61 +226,61 @@ MainWindow - - + + EasyMercurial - + About EasyMercurial - + <qt><h2>About EasyMercurial</h2><p>EasyMercurial is a simple user interface for the Mercurial version control system.</p><p>EasyMercurial is based on hgExplorer by Jari Korhonen, with thanks.<br>EasyMercurial development carried out by Chris Cannam for soundsoftware.ac.uk at the Centre for Digital Music, Queen Mary, University of London.<ul><li>Copyright &copy; 2010 Jari Korhonen</li><li>Copyright &copy; 2010 Chris Cannam</li><li>Copyright &copy; 2010 Queen Mary, University of London</li></ul><p> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file COPYING included with this distribution for more information. - + Commit files - + Tag - + Enter tag: - + Revert files - - - - + + + + <h3>%1</h3><p>%2 - + You are about to commit the following files: - + You are about to <b>revert</b> the following files to their previous committed state.<br><br>This will <b>throw away any changes</b> that you have made to these files but have not committed: - + You are about to <b>revert</b> %n file(s).<br><br>This will <b>throw away any changes</b> that you have made to these files but have not committed. You are about to <b>revert</b> %n files.<br><br>This will <b>throw away any changes</b> that you have made to these files but have not committed. @@ -289,200 +289,218 @@ - + Merge from the default branch - + Merge from branch "%1" - + Merge from %1 - + Confirm pull - + Confirm pull from remote repository - + You are about to pull from the following remote repository: - + Confirm push - + Confirm push to remote repository - + You are about to push to the following remote repository: - + + + Serve + + + + + Failed to identify an active IPv4 address + + + + Starting server at %n address(es): + + Starting server at this address: + Starting server at %n addresses: + + + + Open Repository - + <qt><big>What would you like to open?</big></qt> - + <qt><center><img src=":images/browser-64.png"><br>Remote repository</center></qt> - + Open a remote Mercurial repository, by cloning from its URL into a local folder. - + <qt><center><img src=":images/hglogo-64.png"><br>Local repository</center></qt> - + Open an existing local Mercurial repository. - + <qt><center><img src=":images/hdd_unmount-64.png"><br>File folder</center></qt> - + Open a local folder, by creating a Mercurial repository in it. - + File chosen - + <qt><b>Folder required</b><br><br>You asked to open "%1".<br>This is a file; to open a repository, you need to choose a folder.</qt> - - + + Folder does not exist - + <qt><b>Folder does not exist</b><br><br>You asked to open "%1".<br>This folder does not exist, and it cannot be created because its parent does not exist either.</qt> - - + + Path is in existing repository - + <qt><b>Path is in an existing repository</b><br><br>You asked to initialise a repository at "%1".<br>This path is already inside an existing repository.</qt> - - + + Path is a file - + <qt><b>Path is a file</b><br><br>You asked to initialise a repository at "%1".<br>This is an existing file; it is only possible to initialise in folders.</qt> - + <qt><b>Local path is in an existing repository</b><br><br>You asked to open a remote repository by cloning it to the local path "%1".<br>This path is already inside an existing repository.<br>Please provide a new folder name for the local repository.</qt> - + <qt><b>Local path is a file</b><br><br>You asked to open a remote repository by cloning it to the local path "%1".<br>This path is an existing file.<br>Please provide a new folder name for the local repository.</qt> - + Folder exists - + <qt><b>Local folder already exists</b><br><br>You asked to open a remote repository by cloning it to the local path "%1".<br>This is the path of an existing folder.<br>Please provide a new folder name for the local repository.</qt> - + Path is inside a repository - + <qt><b>Open the repository that contains this path?</b><br><br>You asked to open "%1".<br>This is not the root folder of a repository.<br>But it is inside a repository, whose root is at "%2". <br><br>Would you like to open that repository instead?</qt> - + Folder has no repository - + <qt><b>Initialise a repository here?</b><br><br>You asked to open "%1".<br>This folder does not contain a Mercurial repository.<br><br>Would you like to initialise a repository here?</qt> - + <qt><b>Initialise a new repository?</b><br><br>You asked to open "%1".<br>This folder does not yet exist.<br><br>Would you like to create the folder and initialise a new empty repository in it?</qt> - + Repository exists - + <qt><b>Open existing repository?</b><br><br>You asked to initialise a new repository at "%1".<br>This folder already contains a repository. Would you like to open it?</qt> - + Ok - + Mercurial command did not return any output. - + Pushed %n changeset(s) Pushed %n changeset @@ -490,22 +508,22 @@ - + No changes to push - + Push complete - + The push command output was: - + Pulled %n changeset(s) Pulled %n changeset @@ -513,383 +531,374 @@ - + No changes to pull - + Pull complete - + The pull command output was: - + + + + + Push failed + + + + + Your local repository could not be pushed to the remote repository.<br><br>You may need to merge the changes locally first.<br><br>The output of the push command was: + + + + + Your local repository could not be pushed to the remote repository.<br><br>The remote repository may have been changed by someone else since you last pushed. Try pulling and merging their changes into your local repository first.<br><br>The output of the push command was: + + + + + + Failed to run Mercurial + + + + + The Mercurial program either could not be found or failed to run.<br>This may indicate a problem with the Mercurial installation, or with the EasyHg interaction extension.<br><br>The test command said: + + + + <qt><h3>Command failed</h3><p>The following command failed:</p><code>%1</code>%2</qt> - + <p>Its output said:</p><code>%1</code> - + Command failed - + Change summary - + Summary of uncommitted changes - - - + + + Update - - - + + Open a repository + + + + + Quit + + + + + Quit EasyMercurial + + + + + Refresh the window to show the current state of the working folder + + + + + See what changes are available in the remote repository waiting to be pulled + + + + + Pull changes from the remote repository to the local repository + + + + + Push changes from the local repository to the remote repository + + + + + See what has changed in the working folder compared with the last committed state + + + + + Throw away your changes and return to the last committed state + + + + + Mark the selected file(s) to be added on the next commit + + + + + Mark the selected file(s) to be removed from version control on the next commit + + + + + Update the working folder to the head of the current repository branch + + + + + Commit your changes to the local repository + + + + + Merge the two independent sets of changes in the local repository into the working folder + + + + + Edit .hgignore File + + + + + Edit the .hgignore file, containing the names of files that should be ignored by Mercurial + + + + + Serve via HTTP + + + + + + Merge - + the default branch - + branch "%1" - + On %1. Not at the head of the branch: consider updating - + <b>Awaiting merge</b> on %1 - + You are about to commit %n file(s). You are about to commit %n file. You are about to commit %n files. + + + Running temporary server at %n address(es): + + Running temporary server at this address: + Running temporary server at %n addresses: + + - + + <p>Press Close to stop the server and return.</p> + + + + <qt><h3>Update successful</h3><p>%1</p> - + <qt><h3>Merge successful</h3><p>%1</p> - + Resolved - + <qt><h3>Merge resolved</h3><p>Merge resolved successfully.</p> - + + (Examining repository) + + + + Nothing committed to this repository yet - + Have unresolved files following merge on %1 - + Have merged but not yet committed on %1 - + On %1. Not at the head of the branch - + At one of %n heads of %1 - - + At the head of %1 - - Init local repository - - - - - Create an empty local repository in selected folder - - - - - Clone from remote - - - - - Clone from remote repository into local repository in selected folder - - - - + Open... - - Open repository - - - - + Settings... - + View and change application settings - - Exit - - - - - Exit application - - - - + Refresh - - Refresh (info of) status of workfolder files - - - - + Preview - - View info of changesets incoming to us from remote repository (on pull operation) - - - - + Pull - - Pull changesets from remote repository to local repository - - - - + Push - - Push local changesets to remote repository - - - - + Diff - - Folderdiff: View all differences between working folder files and local repository files - - - - - View changesetdiff - - - - - Change set diff: View differences between all files of 2 repository changesets - - - - + Revert - - Undo selected working folder file changes (return to local repository version) - - - - + Add - - Add working folder file(s) (selected or all yet untracked) to local repository (on next commit) - - - - + Remove - - Remove selected working folder file from local repository (on next commit) - - - - - Update working folder from local repository - - - - + Commit - - Save selected file(s) or all changed files in working folder (and all subfolders) to local repository - - - - - Merge two local repository changesets to working folder - - - - + Annotate - + Show line-by-line version information for selected file - - Tag revision - - - - - Give decsriptive name (tag) to current workfolder parent revision. - - - - - Edit .hgignore - - - - - Edit .hgignore file (file contains names of files that should be ignored by mercurial) - - - - - Serve (via http) - - - - + Serve local repository via http for workgroup access - + About - - Show the application's About box - - - - - About Qt - - - - - Show the Qt library's About box - - - - + Clear selections - - + + File - + Advanced - + Help - + Ready @@ -985,6 +994,98 @@ + SettingsDialog + + + Settings + + + + + User details + + + + + Name: + + + + + Email address: + + + + + System application locations + + + + + Mercurial (hg) program: + + + + + + + + + Browse... + + + + + External diff program: + + + + + External file-merge program: + + + + + External text editor: + + + + + EasyHg Mercurial extension: + + + + + Use EasyHg Mercurial extension + + + + + Mercurial program + + + + + External diff program + + + + + External file-merge program + + + + + External text editor + + + + + EasyHg Mercurial extension + + + + StartupDialog @@ -1026,7 +1127,8 @@ - Show summary + Summarise changes + Show summary diff -r 731aef59d5f4 -r bf366e0b9050 hgrunner.cpp --- a/hgrunner.cpp Fri Dec 17 09:36:39 2010 +0000 +++ b/hgrunner.cpp Fri Dec 17 10:01:02 2010 +0000 @@ -313,6 +313,12 @@ checkQueue(); } +void HgRunner::killCurrentActions() +{ + m_queue.clear(); + killCurrentCommand(); +} + void HgRunner::killCurrentCommand() { if (m_isRunning) { diff -r 731aef59d5f4 -r bf366e0b9050 hgrunner.h --- a/hgrunner.h Fri Dec 17 09:36:39 2010 +0000 +++ b/hgrunner.h Fri Dec 17 10:01:02 2010 +0000 @@ -37,6 +37,7 @@ ~HgRunner(); void requestAction(HgAction action); + void killCurrentActions(); // kill anything running; clear the queue signals: void commandCompleted(HgAction action, QString stdOut); diff -r 731aef59d5f4 -r bf366e0b9050 mainwindow.cpp --- a/mainwindow.cpp Fri Dec 17 09:36:39 2010 +0000 +++ b/mainwindow.cpp Fri Dec 17 10:01:02 2010 +0000 @@ -779,27 +779,19 @@ } } -QString MainWindow::listAllUpIpV4Addresses() +QStringList MainWindow::listAllUpIpV4Addresses() { - QString ret; + QStringList ret; QList ifaces = QNetworkInterface::allInterfaces(); - for (int i = 0; i < ifaces.count(); i++) - { + for (int i = 0; i < ifaces.count(); i++) { QNetworkInterface iface = ifaces.at(i); - - if (iface.flags().testFlag(QNetworkInterface::IsUp) && !iface.flags().testFlag(QNetworkInterface::IsLoopBack)) - { - for (int j=0; j

%1

") + .arg(tr("Running temporary server at %n address(es):", "", addrs.size())); + foreach (QString addr, addrs) { + ts << QString("
  http://%1:8000
").arg(xmlEncode(addr)); + } + ts << tr("

Press Close to stop the server and return.

"); + ts.flush(); + params << "serve"; runner->requestAction(HgAction(ACT_SERVE, workFolderPath, params)); - QMessageBox::information(this, "Serve", msg, QMessageBox::Close); -//!!! runner -> killCurrentCommand(); + QMessageBox::information(this, tr("Serve"), msg, QMessageBox::Close); + + runner->killCurrentActions(); } void MainWindow::startupDialog() @@ -903,6 +913,11 @@ } } +void MainWindow::changeRemoteRepo() +{ + //!!! so we want a "multi-choice" thingy but with remote only? and then we rewrite the local hgrc?? +} + void MainWindow::open(QString local) { if (openLocal(local)) { @@ -1666,6 +1681,7 @@ connect(settingsAct, SIGNAL(triggered()), this, SLOT(settings())); connect(openAct, SIGNAL(triggered()), this, SLOT(open())); + connect(changeRemoteRepoAct, SIGNAL(triggered()), this, SLOT(changeRemoteRepo())); connect(hgIncomingAct, SIGNAL(triggered()), this, SLOT(hgIncoming())); connect(hgPullAct, SIGNAL(triggered()), this, SLOT(hgPull())); @@ -1864,6 +1880,9 @@ openAct = new QAction(QIcon(":/images/fileopen.png"), tr("Open..."), this); openAct -> setStatusTip(tr("Open a repository")); + changeRemoteRepoAct = new QAction(tr("Change Remote Location..."), this); + changeRemoteRepoAct->setStatusTip(tr("Change the default remote repository for pull and push actions")); + settingsAct = new QAction(QIcon(":/images/settings.png"), tr("Settings..."), this); settingsAct -> setStatusTip(tr("View and change application settings")); @@ -1913,10 +1932,10 @@ hgAnnotateAct = new QAction(tr("Annotate"), this); hgAnnotateAct -> setStatusTip(tr("Show line-by-line version information for selected file")); - hgIgnoreAct = new QAction(tr("Edit .hgignore"), this); + hgIgnoreAct = new QAction(tr("Edit .hgignore File"), this); hgIgnoreAct -> setStatusTip(tr("Edit the .hgignore file, containing the names of files that should be ignored by Mercurial")); - hgServeAct = new QAction(tr("Serve (via http)"), this); + hgServeAct = new QAction(tr("Serve via HTTP"), this); hgServeAct -> setStatusTip(tr("Serve local repository via http for workgroup access")); //Help actions @@ -1932,6 +1951,7 @@ fileMenu = menuBar()->addMenu(tr("File")); fileMenu -> addAction(openAct); + fileMenu -> addAction(changeRemoteRepoAct); fileMenu -> addAction(settingsAct); fileMenu -> addSeparator(); fileMenu -> addAction(exitAct); diff -r 731aef59d5f4 -r bf366e0b9050 mainwindow.h --- a/mainwindow.h Fri Dec 17 09:36:39 2010 +0000 +++ b/mainwindow.h Fri Dec 17 10:01:02 2010 +0000 @@ -68,6 +68,7 @@ void about(); void settings(); void open(); + void changeRemoteRepo(); void startupDialog(); void clearSelections(); @@ -119,7 +120,7 @@ void reportNewRemoteHeads(QString); void presentLongStdoutToUser(QString stdo); - QString listAllUpIpV4Addresses(); + QStringList listAllUpIpV4Addresses(); QString filterTag(QString tag); QString getUserInfo() const; @@ -161,6 +162,7 @@ //File menu actions QAction *openAct; + QAction *changeRemoteRepoAct; QAction *settingsAct; QAction *exitAct; diff -r 731aef59d5f4 -r bf366e0b9050 settingsdialog.cpp --- a/settingsdialog.cpp Fri Dec 17 09:36:39 2010 +0000 +++ b/settingsdialog.cpp Fri Dec 17 10:01:02 2010 +0000 @@ -139,10 +139,6 @@ connect(bbox, SIGNAL(accepted()), this, SLOT(accept())); mainLayout->addWidget(bbox, 2, 0); m_ok = bbox->button(QDialogButtonBox::Ok); -// m_ok->setEnabled(false); - -//!!! m_ok->setEnabled(m_name != ""); -// updateExample(); } void