Sublime Forum

New Mercurial plugin for Sublime Text 2

#7

Thanks for your answer, guillermooo.

Did you inform Jon about these bugs ?

0 Likes

#8

Yep - input focus related issues will be fixed in the next dev build

0 Likes

#9

Updated!

  • Fixed several issues
  • Updated README
  • Added “commit (this file)”

bitbucket.org/guillermooo/sublimehg/overview

0 Likes

#10

Updated!

  • Won’t disconnect on error or input request
  • More commands

github.com/SublimeText/SublimeHg

0 Likes

#11

Haha. I hadn’t realized the irony. But I actually push to both, now that hg-git’s sort fo working again with Mercurial 1.9.

0 Likes

#12

Updated!

  • Server is restarted if hg root isn’t a prefix of the current file’s path

The server should now always find the correct repository for the current file.

github.com/SublimeText/SublimeHg

0 Likes

#13

When I use this plugin, I can’t work out how to get the hg command line to persist. Every time I enter a command, it disappears. Unfortunately this makes the plugin unusable for me; it’s much more efficient to use an external command prompt.

For example, let’s say I want to run hg status. This is what happens:

  • I press Shift + Control + P
    and select “SublimeHg: Open Hg Command Prompt”

  • The command prompt opens in a new editor panel. (Yay!
    )

  • I type “status”

  • The command prompt panel disappears (Boo
    !) and is replaced by a results panel (which shows the response from hg)

Now I want to run hg commit, perhaps followed by hg push. For each command, I have to start all over again. And when I’m debugging, this cycle repeats a lot.

Am I just being dense, or is this something that could be improved? It would be fantastic to get a persistent hg command prompt – one less window for me to manage. :smile:

0 Likes

#14

Agreed, it’s very annoying. It used to be possible to reopen input panels on_done in ST1, but last time I tried in ST2 it wouldn’t work. I’ll be switching to Mercurial’s own python client for the command server soon, so I’ll take a look at this too. I suppose you know, but simple actions can be performed from the Command Palette too (Ctrl+Shift+P).

0 Likes

#15

This version will attempt to restore the cmdline when you focus the view where you started it first:

bitbucket.org/guillermooo/subli … me-package

Make sure to ignore or overwrite SublimeHg to avoid conflicts.

It seems to work ok-ish here, but I’ve just whipped it up, so I dunno. If it holds together, I will apply the change in the next version.

0 Likes

#16

Updated!

github.com/SublimeText/SublimeHg

  • Persistent shell to the commad server
  • Empty output is ignored instead of printed to output buffer
0 Likes

#17

Updated!

github.com/SublimeText/SublimeHg

  • Tab completion for top-level commands in the command line
  • Command history (!h and !mkh)
0 Likes

#18

Updated!

  • All commands run in the background
  • Highlighting for status, log reports, etc.

Issues

  • Mercurial server works only off the current dir Sublime Text was started from
0 Likes

#19

Updated!

  • should run regardless of how Sublime Text is started
  • cmdline will be restored every time a SublimeHg - Output buffer loses focus (and if you entered it from a cmdline)
0 Likes

#20

Updated!

  • Use buffer as CLI of sorts
  • Use private server for each distinct repo

github.com/SublimeText/SublimeHg

0 Likes

#21

Hey there, I implemented my suggested feature and it works more or less. Maybe you can reuse/incorporate some of my code.

0 Likes

#22

Updated!

  • serve command will run in its own console

Remember that as of dev build 2180 you can set Sublime Text to your editor in .hgrc to handle commit messages.

  • windows: sublime_text.exe --wait
  • other: sublime_text -w

This seems to work all right for me on Windows 7 and Linux Mint.

0 Likes

#23

Does it support mercurial queues?

0 Likes

#24

It does if you add this to your User Settings:

[code] “packages.sublime_hg.extensions”:

	"mq"
],[/code]
0 Likes

#25

[quote=“guillermooo”]It does if you add this to your User Settings:

[code] “packages.sublime_hg.extensions”:

	"mq"
],[/code][/quote]

Okay, thank you. So as far as I understood, this plugin has more features than hg4subl. Am I right? As for the user settings, what happens if I specify such mercurial extensions as color or pager?

0 Likes

#26

I wouldn’t know… Never used it.

The mercurial patch queue is the only one that’ll work right now.

0 Likes