TortoiseHg with TortoiseSvn Diff - tortoisesvn

I recently switched over from SVN to Hg. I used to use TortoiseSVN, and now I'm using TortoiseHg. One thing I really miss, though, are the TortoiseSVN style diffs; the Hg ones are just harder to read and understand.
Is there some way to tell TortoiseHg to use the TortoiseSVN diff tool?

Right Click -> TortoiseHg -> Global Settings -> TortoiseHg -> Visual Diff tool -> Choose TortoiseMerge

No idea why TortoiseHg doesn't come with this built in, because both TortoiseSVN and TortoiseGIT do.
So we have to somehow download TortoiseIDiff.exe from either project, add it to our TortoiseHg folder and add something along those lines into Mercurial.ini, which currently can be found under Windows Explorer's contextual menu (right mouse click) > TortoiseHg > Global Settings > Edit File:
[extdiff]
cmd.tortoisediff = C:\Program Files\TortoiseHg\TortoiseIDiff.exe
opts.tortoisediff = /left:"$parent" /lefttitle:"$plabel1" /right:"$child" /righttitle:"$clabel" /showinfo

Put following into Mercurial.ini:
[tortoisehg]
vdiff = tortoisediff
[extdiff]
cmd.tortoisediff = C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe
opts.tortoisediff = /base:"$parent" /basename:"$plabel1" /theirs:"$child" /theirsname:"$clabel"

Related

TortoiseSVN diff on directory only shows propinfo - what gives?

I just merged a directory and am doing a TortoiseSVN diff to check for changes before committing. I can see from the file explorer that I have modified several files, but I can't see anything from the diff, only the propinfo. It seems I modified svn:mergeinfo while merging, and that is all the diff is showing me.
How do I see the actual files that have changed??? Using Kdiff3 vs TortoiseMerge doesn't make a difference.
TortoiseSVN version 1.9.7
When propinfo is modified, TortoiseSVN apparently only shows this propinfo when diffing a directory, if you use "SVN diff" from the context menu.
You can work around this by using Check for Updates from the context menu rather than SVN diff.
This works because "Check for Updates" appears (?) to be equivalent to the command TortoiseProc.exe /command:diff /path:. /ignoreprops, while "SVN diff" does not pass the ignoreprops flag.

Unable to find Emmet in package control in Sublime Text 3

I'm trying to install Emmet via Package Control in Sublime Text 3 but whenever I search for it it just doesn't show up.
Any ideas? Am I missing a repository maybe?
It may be that you've already installed Emmet. First, go to Preferences -> Package Settings and see if there's an Emmet submenu there. Alternatively, Preferences -> Package Settings -> Package Control -> Settings-User has a list of all installed packages. Finally, you can check your Installed Packages folder for an Emmet.sublime-package file - go to Preferences -> Browse Packages... to open your Packages directory, navigate one level up, and Installed Packages should be right there.
If you find Emmet at one of those locations, but for some reason it's not working for you, go to Preferences -> Package Control to open up that section of the Command Palette, select Package Control: Remove Package, then type in emmet and hit Enter to remove it. You should then be able to select Package Control: Install Package from the Command Palette and pick Emmet from the list.
I experienced a similar issue where it appeared emmet was installed, but it wasn't.
Maybe for quicker verification do this:
click sublime test > pref > package control (from sublime) > and type emmet
If emmet is not listed:
click pref > pack control > "install package" > emmet

sublime text 3 sidebar autoupdating not working

I was wondering if anyone could tell me how to make it so that sublime text 3 automatically updates the sidebar when i add a new folder/file to the current project in finder (osx).
Right now, I have to manually go to Project -> Refresh Folders
My user preferences are probably not the issue as they are very basic:
{
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",
"font_size": 18,
"tab_size": 2,
"translate_tabs_to_spaces": true
}
If anyone could help that would be great as I have tried googling, searching for an answer to this but havent found anything that works.
Thanks in advance.
I recently began experiencing this issue and it turned out to be DropBox related. Once I removed DropBox and restarted my machine the folder refreshing began working as before. Also, DropBox was affecting several other apps, specifically SourceTree and Transmit as well as Sublime Text 3.
I had this same issue. You could always bind the folder refresh to a hotkey. While this is not a complete fix for auto-updating, it still saves you from a more lengthy manual refresh. I believe this is how Dreamweaver works as well.
I had the same issue with ST3 (OSX 10.9.2). It was something wrong with the root folder of my projects. I created new folder Code1, moved all of my projects there, removed old Code folder and renamed new Code1 to Code. This bit of magic returned things back to normal.
Open the console and see if there are any errors. It logs when there are changes to the filesystem.
I've had this problem when I used disks that where mounted with samba. My best guess is that this has something to do with the OS or filesystem not triggering the correct events for sublime to realize that there's new stuff in the folders.
I'm guessing that the disk on which the project you're working on belongs to a mounted disk, that might have a different filesystem. Try moving the project and see if that helps. If that is the case maybe you ought to see over which flags and stuff you're using when mounting the disk on which the project was originally stored.
How you would go about fixing that however I have no clue about since I don't have any experience with OSX.
This could be the result of an error with the plugin SidebarEnhancements, as was the case for me. Using package control I removed the plugin. I couldn't package install the plugin back as it would not show up on the list of available plugins. So instead I followed this github issue in the repo and got it cloned into the correct directory.
Another side note, in sublime I clicked "Sublime Text" -> "Preferences" -> "Browse Packages". to open up the correct location to clone the repo in finder. If you click on the folder icon in the top bar of the resulting finder window you can actually drag this into iTerm2 so that you are in the proper location before running the git clone command included below.
git clone https://github.com/titoBouzout/SideBarEnhancements.git "SideBarEnhancements"
cd "SideBarEnhancements"
Finally, quit ST3 and reopen worked for me. Hope this helps.
I'm using Windows, so not sure if my solution is relevant to the exact question, but since I found this on Google, I figured it might just help somebody. My problem was specifically with the SideBarEnhancements plugin.
The dumb solution (try this first):
Close Sublime Text, go to the Packages directory (in Windows that's in %HOMEDRIVE%%HOMEPATH%\AppData\Roaming\Sublime Text 3 (Win+R, paste that path, enter);
Rename SideBarEnhancements to something else and then back to its original name;
Reopen Sublime Text.
The nice solution (for Git Bash on Windows):
IF the dumb solution has not worked, there is no point in following on.
However, if it worked, you can automate the process.
Open %HOMEDRIVE%%HOMEPATH%\.bashrc, or in other words: User\.bashrc (create the file if you don't have it);
Paste the following at the end of the file (preferably on a new line):
touchme() {
echo 'Killing Sublime Text process..';
taskkill -IM "sublime_text.exe";
cd ~/AppData/Roaming/Sublime\ Text\ 3/Packages;
touch SideBarEnhancements;
echo 'SideBarEnhancements folder touched;';
echo 'Returning to original directory..';
cd -;
echo 'Reopening Sublime Text..';
"/L/Program Files/Sublime Text 3/sublime_text.exe"&
}
Change the path to your sublime_text.exe (last line of the function);
If Git Bash is opened, execute source ~/.bashrc and go to 6;
If Git Bash is not opened, open it and go to 6;
Execute touchme without any brackets;
In case you use the touchme command for something else, or simply don't like it, feel completely free to rename the function (I just found it the easiest to write and remember :P).
I guess the code above can be adapted for Unix systems, too, with some small tweaks.
I had this problem after reinstalling Sublime Text 2 and symlinking.
A workaround I found was binding the refresh_folder_list command with cmd+s, since that's usually when we see the sidebar updating.
For this to work you'll need to install run_multiple_commands plugin.
Then you'll have to update your User Keymap telling it to refresh folder list every time you save. The syntax is fairly simple.
I also ran across Synced Side Bar after fixing the issue. I am not sure if this is a solution but sounds promising.
Hope this helps.
I don't have a solution but a theory on why this is happening. I noticed as well recently that it stopped refreshing. I've also noticed that when I use the finder to open folders or use the 'open' within any program, the OS would just show an empty directory when I know there are files in it. I would then have to select a few different folders to get it to recognize that I'm asking it to show me the contents in the folder. It's almost like that function is asleep and I have to nudge it awake.
It seems Mavericks is using some strong sleep agent and turning off any functions behind the scene that's not needed and perhaps it's also affecting the sidebar refresh.
Same issue for me with ST2 on OSX 10.7.5. I started by opening Finder to the folder where I had the issue and navigated to that folder in terminal as well. Then:
Create a blank file and observe if Finder refreshed.
echo "" > test.txt
If Finder didn't refresh, navigate to the parent folder in both Finder and terminal. Repeat step 1.
If Finder did refresh, rename the child folder you came from to anything and then back to the original name.
mv folder_name new_folder_name
mv new_folder_name folder_name
Auto refresh in Finder started working again as well as the Sublime sidebar for that folder and all child folders.
I don't have an explanation as to why this issue started. Prior to this solution, I attempted the following trying to figure it out. I don't know if these steps were necessary in resolving this issue.
I removed .DS_Store files from the folders with this issue.
Remove the Finder preferences file and restart Finder. As described here.
rm ~/Library/Preferences/com.apple.finder.plist ; killall Finder
Exit Dropbox
Thanks to #peresleguine for the suggestion of renaming the folder.
I had the same issue with folders and files not showing up. No matter what folders I added it wouldn't work, refreshing folders didn't work, if I restarted Sublime, I would then see the folders I added but none of it's contents. I ended up going to File -> Close Window and then File -> New Window, after that when I added folders to the new window, it started working again. Seems like it's a corruption in the project file somehow. Anyways hope this helps someone.
Mac OSX Mavericks
Sublime 3 Build 3059
If you're using OS X with python version higher than 2.7.1, try downgrading python to 2.7. This fixed multiple issues for me:
brew update
brew install pyenv
echo 'if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bashrc
source ~/.bashrc
pyenv install 2.7
pyenv global 2.7
# now restart ST3
One of the sub-folders of my project contained a symlink to the project itself, making a loop. As soon as I've removed it and re-opened the project, the problem went away. However, that symlink was necessary for my project to function, so I created a simple .sublime-project file:
{
"folders": [{
"path": "/",
"folder_exclude_patterns": ["symlink-or-one-of-its-parents"]
}]
}
The exclusion pattern made Sublime ignore the loop, and the sidebar went back to normal right away. Just note that folder_exclude_patterns accepts folder names, not paths. That means that it might exclude something you didn't want to exclude (i.e. if you write lib it'll exclude all lib folders in your project, regardless of where they are). Hope this helps somebody.
I had this issue after symlinking my project files to another partition on the hard disk. I fixed it by editing the path for each project from Project > Edit Project to the new location.
A bit late to the conversation, but I resolved this by turning off DropBox's Finder integration. There is a known issue with Yosemite 10.10.x
https://www.dropbox.com/help/7144
Click on the dropbox icon in your tool bar, click the gear and then open preferences. Un-check Enable Finder integration. Then restart your computer.
Hope that helps.
I just fixed this issue and I think the reason is because I use dropbox to sync my ST3 settings.
Somedays before I restarted with 'reopen windows when logging back in', and found sublime opened earlier than dropbox finished its initialisation, which caused some settings couldn't load properly.
The result was when I used subl . to open project, I found the side bar not working properly. At the first beginning, I just closed ST3 windows and re-run subl, but it didn't work.
Finally I quitted ST3 (cmd+q), and made sure dropbox was properly loaded, then subl again. This time it worked.
Hope it helps.

How to start visual diff of working copy and last commit of a file from command line in mercurial TortoiseHg

Provided that I already know that a file has been modified in a mercurial repo,
Is there any way to start a diff tool in command line to show the visual diff of the file between working copy and commit.
Little background:
I`m trying to add a External Tool for QT which will help me see currently open file's working copy changes in a diff tool in click of a button without going and opening the repo in TortoiseHg, waiting for it to load (big repo, lot of time), then right clicking modified file to select view visual diff
To those who are NOT familiar with the setup,
I have: full path of the hg repo and modified file,
I need: a linux command to open the diff between working copy and last commit of the file in a diff tool
My setup:
Linux, QT, TortoiseHg, Sourcegear DiffMerge
Is this possible?
I assume you have the ability to edit one of the config files to enable extensions, such as the .hgrc file. If that is true, then as described here or here you can add the following (and ensure the path to diffmerge is correct):
[ui]
merge = diffmerge
[extensions]
hgext.extdiff =
[extdiff]
cmd.diffmerge = /usr/bin/diffmerge
[merge-tools]
diffmerge.executable = /usr/bin/diffmerge
diffmerge.args = -merge -result=$output -t1="Local Version" -t2=$output -t3="Other Version" -caption=$output $local $base $other
diffmerge.binary = False
diffmerge.symlinks = False
diffmerge.gui = True
Since you only asked to add it to diff between files and not for merging, you may only need the following sections (which excludes the merge functions) :
[extensions]
hgext.extdiff =
[extdiff]
cmd.diffmerge = /usr/bin/diffmerge

Saving merges using KDiff3 with TortoiseSVN

Wanting to use KDiff3 as my conflict resolution tool for TortoiseSVN I followed the instructions here and here to configure TortoiseSVN to use KDiff3. My merge tool settings in TortoiseSVN are thus:
C:\Program Files (x86)\KDiff3\kdiff3.exe %base %mine %theirs -o %merged --L1 %bname --L2 %yname --L3 %tname
When performing a merge a conflicts may be detected. If they are I hit the 'Edit Conflict' button to launch KDiff3 and reconcile the merge conflicts.
However, when I save my merge the result is saved to a temporary file in the .svn folders rather than within the actual working file C:\projects\my-new-project\src\mvags1.mxml. The temporary location can be seen in the KDiff3 output window as well.
Have I configured anything incorrectly or are my expectations for how KDiff3 works with TortoiseSVN incorrect?
I am using TortoiseSVN 1.7.5 and KDiff3 0.9.96.
My expectations for how KDiff3 would work with TortoiseSVN and Subversion were flawed. The behavior that I was experiencing is the correct behavior.
The proper process for using KDiff3 with TortoiseSVN is:
Click the edit conflicts button when conflicts are detected (in TortoiseSVN)
Resolve the merge with KDiff3
Click the save button in KDiff3
Close KDiff3
In TortoiseSVN mark the file as resolved
After merge to working copy of a branch (svn merge --quiet --accept postpone http://../trunk)
I go to TortoiseSVN extension menu and select "Resolve..."
The window with the list of conflicted items displayed.
Right click on the first item and then select "Edit conflicts". KDiff3 merge window appears.
Pressing B for selecting line source.
click Save. File will be saved with merge result.
Close KDiff3.
How to make conflict automatically marked as resolved in TortoiseSVN when I exiting KDiff3?
I am using:
Windows 10 x64
TortoiseSVN 1.9.5, Build 27581 - 64 Bit
kdiff3 Version 0.9.98 (64 bit)
Merge Tool setting in TortoiseSVN
C:\Program Files\KDiff3\kdiff3.exe %base %mine %theirs -o %merged --L1 Base --L2 Mine --L3 Theirs

Resources