-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
monky-status doesn't work #1
Comments
run |
|
i can't guess what's going wrong.(i am the only person using it as of now) can you run
|
Unfortunately there is no error per-se. Only this "File name too long" in the Messages buffer. One thing I forgot to mention is that I'm running emacs 24 compiled from the latest bzr head... |
Monky is running hg with There are three problems:
The problem here is that both (I guess) cycojesus and I don't have the "pager" extension enabled. I don't know how to solve the problem that stderr isn't shown, nor how to solve the problem of the exit status (I'm not that familiar with elisp's standard library) PS: Why is this extension hosted in git and not in mercurial? :( |
I have no idea how the hell to attach a patch-file here (god, I can't believe Github's issue tracker sucks even more than Bitbucket's!), so I'm just going to try inlining it:
|
Yeah, for that small patch that's too much work, especially with $^%&(*% Git. Anyway, I had a look at the Emacs docs and I think I've come up with a patch for catching the errors from the hg subprocess that mostly works. It's ugly and probably really clumsy elisp code, but like I said I'm not familiar with the emacs standard library ;)
(updated with cleaner code) |
I wasn't able to stage any changes yet to view a diff, but I think that second hunk in the diff is probably wrong. It should still check for errors though, so maybe it should be wrapped in (with-output-to-buffer ...) or something. |
Or perhaps make hg-insert do the error checking instead of monky-hg-output, that's probably better, come to think of it... |
This change doesn't seem address the handling of errors. If for whatever reason another unrecognised switch is passed or some other error occurs, monky won't detect that and will again re-use the error report as the root directory. See my earlier comment at #1 (comment) for a patch that should fix that. |
Of course github doesn't allow me to reopen this issue. $%^!^& |
if it happens for some reason, then there is problem some where in the code, not in the hg-output(which runs the hg command and returns the stdout). Handling error is a separate issue i guess.
I use git and github more than hg and bitbucket. The reason i wrote this mode is that i am so used to magit. |
Bugs happen, and the design of hg-output is wrong if it doesn't ever throw an error, because all information about the fact that an error occurred is lost by the time hg-output returns; at that point all you have is the stdout contents as a string. Stderr is lost. Fail early and fail noisily; it's no shame to let hg-output raise an error if the underlying hg operation returns an error. Yes, it's the calling code that caused the error situation (or not! For example, what happens if the hg binary is missing? Or what if it's a different program than you think it is? In that case it is hg-output that caused the error), but that doesn't matter. You want to be informed of it as soon as possible.
I can open another ticket if you prefer. |
agreed. |
When I invoke monky-status I get the help message from hg in the minibuffer and the status buffer is empty.
It might be because my system's in French.
It happens with both hg 1.8.2 and 1.9
Here's the message (it says "Setting current directory: filename too long, " and then the hg help message):
apply: Setting current directory: nom de fichier trop long, Mercurial, système de gestion de sources distribué
commandes de base :
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
serve start stand-alone webserver
status show changed files in the working directory
summary summarize working directory state
update update working directory (or switch revisions)
view start interactive history viewer
utiliser "hg help" pour la liste complète des commandes ou "hg -v" pour plus de détails/
EDIT: actually the status buffer is named with the whole help message...
The text was updated successfully, but these errors were encountered: