by
Changes to 15 files · Browse files at 00b74a958085 Showing diff from parent 1c1b3d9b47d0 0f11d315b025 Diff from another changeset...
@@ -1,11 +1,7 @@ Update context menu screenshot
-Changelog needs much more detail
-Commit needs more detail
Add links to BB wiki and Mercurial wiki
Describe path editing and [auth] hgrc section
-Need a page explaining merges and merge undo
-debugging hgtk on Windows and Linux
-debugging shell extension on Windows and Linux
+Need a page explaining merges and merge undo (tie together various parts)
nautilus cmenu configuration
hgignore dialog (including screenshot)
guess renames dialog (including screenshot)
|
|
@@ -25,10 +25,13 @@ The changelog tool is primarily used to visualize the revision history
of your repository. It presents a graph of the revision history, showing
the parent/child relationship of each change. At each revision you can
-view the files that it modified and the contents of those changes. These
-are the obvious features that a revision history browser provides.
+view the files that were modified and the contents of those changes.
+These are the features that nearly all revision history browsers provide.
-This changelog browser offers much more.
+The TortoiseHg changelog browser offers much more. Since it is our best
+tool for viewing and selecting changesets, we use it to perform nearly
+all our tasks that involve changeset manipulation.
+
Revision Graph Details
----------------------
@@ -49,6 +52,9 @@:guilabel:`all revisions`
load all remaining revisions into the graph
+The column visibility toggles are sticky settings.
+
+
Revision Context Menus
----------------------
@@ -86,8 +92,9 @@ repository [#rcm4]_
-If you right-click on a row other than the one that was currently selected, you get a different context menu.
-This one is for visualizing diffs between two arbitrary revisions.
+If you right-click on a row other than the one that was currently
+selected, you get a different context menu. This context menu has
+commands that deal with arbitrary revision ranges.
:guilabel:`diff with selected`
Description
@@ -106,7 +113,7 @@.. [#rcm4] The strip command will store the stripped revisions in a bundle file
that can later be reapplied.
See `also <http://mercurial.selenic.com/wiki/EditingHistory>`_.
-.. [#rcm5] :menuselection:`Settings --> Global --> TortoiseHg --> Visual Diff Command`
+.. [#rcm5] :menuselection:`Global Settings --> TortoiseHg --> Visual Diff Command`
.. [#rcm6] Only sensitive if the selected revision is your current working
directory parent
@@ -131,15 +138,21 @@:guilabel:`revert file contents`
Checkout this specific revision of this file [#flcm3]_
-.. [#flcm1] :menuselection:`Settings --> Global --> TortoiseHg --> Visual Editor`
+.. [#flcm1] :menuselection:`Global Settings --> TortoiseHg --> Visual Editor`
.. [#flcm2] Does not show revisions where a file was deleted, as this is only a
- manifest change, it does not modify the file's history.
+ manifest change, it does not modify the file's history.
.. [#flcm3] The new contents will appear as local changes and must be committed.
Changeset browser
-----------------
+The changeset browser will only show a single file's diffs at a time, as
+a performance optimization. If you would like to see all of the file
+diffs at once, click on the :guilabel:`[All Files]` row. The changeset
+browser will also skip displaying diffs for files which are above a
+maximum limit. See :menuselection:`Global Settings --> TortoiseHg --> Max Diff Size`
+
The changelog and datamine tools can open the changeset browser to view
a single revision or the combined effect of a range of revisions. The
changeset browser is very similar to the commit and shelve tools. It has
@@ -147,17 +160,18 @@pane on the right with the changes to each file.
In release 0.7 of TortoiseHg, the 'diff change with' changeset browser
-now supports change selection. You can select files and hunks that you
-wish to extract from the changeset(s) you are browsing and write them to
-a patch file using the :guilabel:`Save as` toolbar button. This is a very
-efficient way to cherry pick changes made to a repository.
+acquired the same change selection feature as the commit tool. You can
+select files and hunks that you wish to extract from the changeset(s)
+you are browsing and write them to a patch file using the
+:guilabel:`Save as` toolbar button. This is a very efficient way to
+cherry pick changes from a repository. This changeset browser also
+supports the :kbd:`Ctrl-C` keyboard accelerator to copy hightlighted
+diff hunks to the clipboard.
+
Unfortunately, TortoiseHg still does not have a dialog for importing
changes into a repository, so this must be done on the command line with
the :command:`hg import` command.
-This changeset browser also supports the :kbd:`Ctrl-C` keyboard
-accelerator to copy hightlighted diff hunks to the clipboard.
-
Configurables
-------------
@@ -189,7 +203,7 @@:guilabel:`Bottom Diffs`
Show diffs below file list
-
+
From command line
-----------------
@@ -203,11 +217,11 @@
The syntax is ::
- hgtk log [OPTIONS]
+ hgtk log [OPTIONS] [FILES]
Valid [OPTIONS] are:
``-l``, ``--limit``
Specify the limit number of changes displayed.
-
+
.. vim: noet ts=4
|
|
@@ -0,0 +1,11 @@ + Clone a repository
+=======================
+
+.. module:: clone.dialog
+ :synopsis: Dialog used to clone a repository
+
+To clone a repository you have to run the clone dialog.
+From the explorer context menu select :guilabel:`Clone a repository`
+or type :command:`hgtk clone`.
+
+.. TODO
\ No newline at end of file |
|
@@ -65,11 +65,26 @@ commit tool into 'QNew' mode where the working directory changes
will be applied to a new patch.
-Below the file list are checkboxes that toggle the inclusion of the
+
+The file list has four columns:
+
+1) A checkbox that indicates whether the file is selected for an
+ operation. The toolbar buttons only operate on checked files.
+ "Partially" selected files have a special check state. This column
+ header is checkable, it will toggle the file selection states.
+2) The :guilabel:`st` column holds the status of the file, defined by
+ Mercurial's status command, one of 'MARD?IC'.
+3) The :guilabel:`ms` column holds the merge state of the file, defined
+ by Mercurial's resolve command, one of ' RU'. See the merge section
+ below.
+4) The canonical path of the file (relative to the repository root)
+
+Below the file list are checkboxes that toggle the display of the
various classes of files {modified, added, removed, deleted, unknown,
-clean, ignored}.
+clean, ignored}. These check boxes will be disabled if the commit tool
+was given a specific set of files and/or directories.
-Removed means a revisioned file has been marked as removed. Deleted
+*Removed* means a revisioned file has been marked as removed. *Deleted*
means a revisioned file is missing but Mercurial has not been told to
quit tracking that file. For instance, if you rename a revisioned file
in the explorer, the original filename will show up as deleted and the
@@ -79,10 +94,24 @@and the new file as added while recording the whole operation as a
rename.
+*Unknown* files are not tracked by Mercurial, but they also do not match
+any ignore filters you have configured. Unknown files are shown by
+default because they are usually files that need to be added to revision
+control. It is recommended that you keep your ignore filters up to date
+to ensure that is the case. The context menu of unknown files has an
+option open the ignore pattern tool.
+
+*Clean* files are tracked files that have not been modified, while
+*Ignored* files are untracked files that match a configured ignore
+pattern. Neither of those file types are shown by default, unless a the
+user includes such a file in a selection (explorer) or provides the file
+on the command line.
+
+
Change Selection (record)
-------------------------
-So what does that mean when it says the commit button will commit the
+So what does it mean when we say the commit button will commit the
selected diffs in checked files? Simple, the native TortoiseHg commit
tool supports change selection instrinsically in the diff browser. This
means that all of the changes you make to versioned files can be
@@ -166,13 +195,15 @@
By right clicking on files in the file list, you will get a context menu
of commands that are applicable to the selected file. If you configure a
-visual editor in
-:menuselection:`Settings --> Global --> TortoiseHg --> Visual Editor`
-there will be an option to open the file in your editor. For unknown **?**
-files, the context menu will allow you to detect renames (if you think
-the unknown file was a copy or rename of a revisioned file) or configure
-the repository's ignore filter (if the file should never be revisioned
-and you want Mercurial to ignore it).
+visual editor (in
+:menuselection:`Global Settings --> TortoiseHg --> Visual Editor`)
+there will be a menu option to open the file in your editor.
+
+For unknown **?** files, the context menu will allow you to detect
+renames (if you think the unknown file is a copy or rename of a
+revisioned file) or to configure the repository's ignore filter (if the
+unknown file should never be revisioned and you want Mercurial to ignore
+it).
Merges
@@ -182,8 +213,8 @@that is in a merged state (technically, this means the current working
directory has two parent revisions). The file list has no checkboxes and
the diff pane does not allow selections. The commit 'manifest' is
-essentially immutable, you must commit the entire working directory
-after a merge.
+essentially immutable, since you must commit the entire working
+directory after a merge.
The merge state *ms* column is especially useful in this mode. Files
that are marked with *R* are files where Mercurial and/or the user have
@@ -200,6 +231,15 @@For your reference, *local* is the revision you had checked out when you
started the merge and *other* is the revision you merged with.
+To undo a failed merge attempt, you must tell Mercurial to remove the
+second parent from your working directory. This usually means
+performing a clean update of the first parent. The merge tool has an
+:guilabel:`Undo` button which does exactly that. The recovery tool also
+has a :guilabel:`Clean` button that does the same thing.
+
+Once you have your working directory back at one parent revision, you
+may start the merge process again.
+
Commit Message Format
---------------------
@@ -232,10 +272,10 @@
The :guilabel:`Commit` button, which has been renamed :guilabel:`QRefresh`
in this context, it will refresh the top patch with just the changes you
-have selected (including the patch description). This may be a bit confusing at first
-because the changes you leave out of the patch are still going to be in
-the working directory after the refresh, so it will look like nothing
-has changed.
+have selected (including the patch description). This may be a bit
+confusing at first because the changes you leave out of the patch are
+still going to be in the working directory after the refresh, so it will
+look like nothing has changed.
So, in summary, using MQ with TortoiseHg is still almost entirely a
command line operation, but you can use :command:`hgtk ci` to refresh your
@@ -255,10 +295,10 @@change into a :guilabel:`QNew` button as well, to make the mode switch
more obvious.
-When the :guilabel:`QNew` button is pressed, the selected change hunks are written
-into a new patch (given the filename you specified), and the dialog is
-refreshed. At refresh, the commit tool will obviously switch to
-*qrefresh* mode since there will now be at least one applied patch.
+When the :guilabel:`QNew` button is pressed, the selected change hunks
+are written into a new patch (given the filename you specified), and the
+dialog is refreshed. At refresh, the commit tool will obviously switch
+to *qrefresh* mode since there will now be at least one applied patch.
You may give the new patch a commit message at the initial *qnew* event,
or you can do it now by using the *qrefresh* feature.
|
@@ -7,12 +7,14 @@
common
explorer
+ start
+ init
+ clone
commit
shelve
changelog
datamine
synchronize
serve
- recovery
.. vim: noet ts=4
|
|
@@ -0,0 +1,91 @@ + TortoiseHg Debugging
+====================
+
+.. module:: debugging
+ :synopsis: Debug problems in shell extension or dialogs
+
+Debugging Dialogs
+-----------------
+
+Stderr is being captured to a buffer that is being inspected at program
+exit. If any serious errors (tracebacks, etc) are found in the stderr
+buffer the entire contents are sent to the bug report tool so the user
+can (should) report a bug. If you suspect there are errors that are not
+being reported, you can set the environment variable **THGDEBUG** to any
+value to disable the stderr buffering.
+
+If you have a bit of Python knowledge, you can also use::
+
+ hgtk --debugger <command>
+
+To disable the forking behavior of hgtk, you can either set an
+environment variable **THG_HGTK_SPAWN**, or add the command line
+parameter '--nofork'.
+
+
+Windows
+~~~~~~~
+
+To debug the changelog viewer, for instance, enter these commands
+into a :command:`cmd.exe` window, while inside the repository::
+
+ set THGDEBUG=1
+ hgtk log
+
+Linux/MacOSX
+~~~~~~~~~~~~
+
+To debug the changelog viewer, for instance, enter these commands
+into your shell window, while inside the repository::
+
+ export THGDEBUG=1
+ hgtk log
+
+
+
+Debugging Shell Extension
+-------------------------
+
+The debugging mechanisms depend on your platform.
+
+Windows
+~~~~~~~
+
+See also http://msdn.microsoft.com/en-us/library/cc144064(VS.85).aspx
+for some info bits about Running and Testing Shell Extensions on Windows
+
+The :command:`DbgView` tool from the SysInternals suite will capture
+debug messages from the shell extension.
+
+The :command:`ThgTaskbar` application's options dialog has an error
+logging tab. If you have this dialog open while you are browsing
+folders, you will get info and error level messages from the icon
+overlay refresh process.
+
+Nautilus
+~~~~~~~~
+
+Debugging is done via the environment variable DEBUG_THG
+
+* to test in a separate process::
+
+ DEBUG_THG=Ne TMPDIR=/tmp/anydir/ --no-desktop nautilus [path]
+
+* to test in the main instance::
+
+ nautilus -q
+ DEBUG_THG=NOe nautilus
+
+* permanent debugging, set DEBUG_THG in a file which is read on session
+ start (~/.profile, ~/.xprofile)
+
+Upper case characters in DEBUG_THG specify modules. Only *O* and *N*
+for *OverlayCache* and *Nautilus*, respecively, are supported module
+names. Lower case characters imply parts. Only *e* is supported,
+implying *error* messages.
+
+To restart nautilus, chose either
+
+1) killall nautilus (the session restarts nautilus automatically, stdin and stdout go to ~/.xsession-errors)
+
+2) nautilus -q; nautilus (stdin and stdout are on the console)
|
@@ -1,5 +1,5 @@ Windows Explorer Integration
-----------------------------
+============================
.. module:: explorer
:synopsis: Windows explorer integration
|
@@ -17,7 +17,9 @@ quick
daily
settings
+ recovery
faq
+ debugging
Indices and tables
==================
|
|
@@ -0,0 +1,47 @@ + Create a new repository
+=======================
+
+.. module:: init.dialog
+ :synopsis: Dialog used to create a repository
+
+To create a new repository into an existing directory (project) you
+have to run the init dialog. From the explorer context menu select
+:guilabel:`Create Repository Here` over the directory, or, within
+the folder, type :command:`hgtk init`.
+
+.. figure:: figures/init.png
+ :alt: Init dialog
+
+:guilabel:`Destination`
+ Is the directory where the repository will be created. It is
+ always filled with the current directory, so if you launch the
+ dialog from the right directory there is no reason to change it.
+:guilabel:`Add special files (.hgignore, ...)`
+ If selected TortoiseHg creates an empty :file:`.hgignore` file
+ in the working directory.
+:guilabel:`Make repo compatible with Mercurial 1.0`
+ If selected TortoiseHg creates an old type Mercurial repository.
+ Do not check unless you have a strong reason to do, and you know
+ what you are doing.
+
+Creating a new repository means create a subdirectory called :file:`.hg`.
+In this subdirectory Mercurial keeps all versioning information.
+
+.. warning::
+ Never touch the files in :file:`.hg` directory, otherwise a repository
+ corruption can happen.
+
+From command line
+-----------------
+
+The init tool can be started from command line ::
+
+ hgtk init
+
+The syntax is ::
+
+ hgtk init [DEST]
+
+where [DEST] is the path to destination folder.
+
+.. vim: noet ts=4
|
@@ -10,20 +10,29 @@ The buttons all equate to a single Mercurial command (save stop, obviously)
:guilabel:`clean`
- :command:`hg update --clean` - performs a clean checkout of the existing
- working directory parent revision. Undoes a partially completed
- merge.
+ :command:`hg update --clean` - performs a clean checkout of the
+ current (first) working directory parent revision. Undoes an
+ aborted or partially completed merge. This will destroy all
+ changes, please use carefully. You should shelve any changes you
+ wish to keep before using this command.
+
:guilabel:`rollback`
- :command:`hg rollback` - undo operation for most recent repository
- transaction. Can undo a commit or pull.
+ :command:`hg rollback` - undo operation for the most recent
+ repository transaction, which is usually a commit or a pull. There
+ is no way to know for certain what operation will be rolled back, so
+ only use this in situations where you know what the last transaction
+ was.
+
:guilabel:`recover`
- :command:`hg recover` - recover from a badly aborted operation. Rarely
- necessary, Mercurial will tell you if it needs to be performed.
+ :command:`hg recover` - recover from a badly aborted transaction.
+ This is rarely necessary, and Mercurial will inform you if it ever
+ needs to be performed.
+
:guilabel:`verify`
:command:`hg verify` - perform a consistency check of the contents of your
- repository
+ repository. Completely safe.
.. vim: noet ts=4
|
|
@@ -0,0 +1,40 @@ + Start on a project
+==================
+
+There are many ways to start with Mercurial/TortoiseHg on a project.
+
+1. The project already exists and is unrevisioned. You have to *create*
+ a new repository.
+2. You want to hack on a project already revisioned with Mercurial. You
+ have to *clone* a repository.
+3. The project already exists and is revisioned under a different
+ SCM. You have to *convert* the repository.
+
+.. note::
+ Other cases, like *an existing project under a different SCM, you
+ want to keep this SCM but use Mercurial as client*, are out of the
+ scope of this manual, and TortoiseHg can not help you in any way.
+
+In the first two cases TortoiseHg can help you with a specific tool, see
+the next two sections.
+
+Convert a project
+-----------------
+
+TortoiseHg has not a specific tool to do the conversion, but after the
+conversion done with Mercurial you can use TortoiseHg as usually in
+this converted project.
+
+How to do the conversion is not in the scope of this manual, please
+refer to http://mercurial.selenic.com/wiki/RepositoryConversion for
+more details.
+
+Normally a conversion is done by enabling the *convert* extension and,
+from the parent directory of the checked-out project type::
+
+ hg convert myproject
+
+After the conversion you have a sibling directory of :file:`myproject`
+called :file:`myproject-hg`. Start to play on it.
+
+.. vim: noet ts=4
|
@@ -518,9 +518,8 @@ os.remove(result)
q = Queue.Queue()
- cpath = util.canonpath(self.repo.root, self.cwd, self.curfile)
hgcmd_toq(self.repo.root, q, 'cat', '--rev',
- str(self.currev), '--output', fromutf(result), cpath)
+ str(self.currev), '--output', fromutf(result), self.curfile)
def diff_to_local(self, menuitem):
if not self.curfile:
|
@@ -698,6 +698,7 @@ self.qnew = False
elif self.qheader is None:
self.text.set_buffer(gtk.TextBuffer())
+ self.msg_cbbox.set_active(-1)
self.last_commit_id = self.get_tip_rev(True)
if self.notify_func:
self.notify_func(self.notify_args)
|
@@ -1127,7 +1127,8 @@ dlg = gdialog.Confirm(_('Confirm Revert'), files, self,
_('Revert files to revision %s?') % revertopts['rev'])
elif self.merging:
- resp = gdialog.CustomPrompt(_('Which parent to revert to?'),
+ resp = gdialog.CustomPrompt(
+ _('Uncommited merge - please select a parent revision'),
_('Revert file(s) to local or other parent?'),
self, (_('&local'), _('&other')), 0).run()
if resp == 0:
|
@@ -337,33 +337,39 @@ }
while (found != std::string::npos);
- // check if target directory is a Mercurial repository
+ // Select menu to show
+ bool fileMenu = myFiles.size() > 0;
+ bool isHgrepo = false;
std::string cwd;
if (!myFolder.empty())
{
cwd = myFolder;
}
- else if (myFiles.size() == 1 && IsDirectory(myFiles[0]))
- {
- myFolder = myFiles[0];
- cwd = myFolder;
- myFiles.clear();
- }
else if (!myFiles.empty())
{
cwd = IsDirectory(myFiles[0])? myFiles[0] : DirName(myFiles[0]);
}
- bool isHgrepo = false;
+
if (!cwd.empty())
- isHgrepo = IsHgRepo(cwd);
+ {
+ // check if target directory is a Mercurial repository
+ std::string root = GetHgRepoRoot(cwd);
+ isHgrepo = !root.empty();
+ if (myFiles.size() == 1 && root == myFiles[0])
+ {
+ fileMenu = false;
+ myFolder = cwd;
+ myFiles.clear();
+ }
+ }
/* We have three menu types: files-selected, no-files-selected, no-repo */
menuDescListEntries *entries;
if (isHgrepo)
- if (myFiles.empty())
+ if (fileMenu)
+ entries = RepoFilesMenu;
+ else
entries = RepoNoFilesMenu;
- else
- entries = RepoFilesMenu;
else
entries = NoRepoMenu;
@@ -655,16 +661,19 @@ {
cwd = myFolder;
}
- else if (myFiles.size() == 1 && IsDirectory(myFiles[0]))
- {
- // Treat single selected directory as if cmenu were opened
- // within that directory without files selected
- cwd = myFiles[0];
- }
else if (!myFiles.empty())
{
- cwd = IsDirectory(myFiles[0])? myFiles[0] : DirName(myFiles[0]);
+ cwd = IsDirectory(myFiles[0]) ? myFiles[0] : DirName(myFiles[0]);
+ }
+ else
+ {
+ TDEBUG_TRACE("DoHgtk: can't get cwd");
+ return;
+ }
+
+ if (!myFiles.empty())
+ {
const std::string tempfile = GetTemporaryFile();
if (tempfile.empty())
{
@@ -698,11 +707,6 @@ CloseHandle(tempfileHandle);
hgcmd += " --listfile " + Quote(tempfile);
}
- else
- {
- TDEBUG_TRACE("DoHgtk: can't get cwd");
- return;
- }
if (cmd == "thgstatus")
{
|
Loading...