Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tortoisehg one step commit push - how to and where is the log file

Iam using win xp with Tortoisehg 2.3. I use bit bucket to backup my personal source code. (rarely for true version control, more as a source backup store). Right now I have to right click on my repo, select commit, then enter a commit message ( i choose to just copy the same message I used last time, there is a drop down to do this), then click commit. Then I again right click and select synchronize and go thru this option to finally push. I could use the workbench and do something similar. I want to optimize this process so I decided to just write a dos bat script to commit and push. When I push Tortoisehg spits out the hg command to the window and you can see it and cut and paste from here. For the commit it does not show what it is really doing under the hood. When I used TortoiseSVN long back I recall there was a logfile where all svn commands executed were stored for debugging. So I started searching for a TortoiseHg logfile.

Does anybody know:

1) Does Tortoisehg have a logfile somewhere where it stores all mercurial commands executed complete with all the command line options ?

2) Is there a better way to do a one step commit push (via Tortoisehg gui or bat or some addon/extension etc)?

regards

like image 539
Gullu Avatar asked Apr 19 '12 15:04

Gullu


People also ask

How do you commit in TortoiseHg?

Once all the conflicts are resolved you can close TortoiseHg's resolve conflicts dialog and click next on the merge window. On this next screen you can enter the commit message and then click Commit Now . You are now done.

What does HG update do?

Use the command hg update to switch to an existing branch. Use hg commit --close-branch to mark this branch head as closed.


2 Answers

There's actually an option in TortoiseHg to do this:

  1. From your Commit window click on the "Options" button next to the "Copy message" button you've been using.
  2. This pops up a window with a few options - the third one down is "Push After Commit". Tick that.
  3. Enter "default" into the box next to the option
  4. Click "Save in Repo" so that it is saved for next time

Now it will push to the default push target every time you commit from TortoiseHg. One thing to note is that this won't result in an automatic push if you commit from the command line whereas Martin's solution will.

like image 137
Steve Kaye Avatar answered Apr 29 '23 12:04

Steve Kaye


1) Does Tortoisehg have a logfile somewhere where it stores all mercurial commands executed complete with all the command line options ?

TortoiseHg is actually not very related to TortoiseSVN — the two projects share almost no code and are developed by different groups. So I don't think that there is a log file for TortoiseHg even though TortoiseSVN has one.

2) Is there a better way to do a one step commit push (via Tortoisehg gui or bat or some addon/extension etc)?

You could setup a post-commit hook. Add this to the .hg\hgrc file for your repository (create the file as needed):

[hooks]
post-commit = hg push

That way you will run hg push after every commit, even when the commit is done from TortoiseHg.

like image 35
Martin Geisler Avatar answered Apr 29 '23 12:04

Martin Geisler