Closed ghost closed 6 years ago
I'd love to see this one being merged since it's broken and really annoying. I have to use vc-push
from a file of my project (it doesn't work in Monky buffer) to push changes.
Good job @tddsg
@Bounga: Thanks for your interest! In the meantime, you can copy the patched function monky-push
to your Emacs init file. This will temporarily override the default function monky-push
.
(Note that if you see an error message like Hg returns an abnormally code 1
, it means there is nothing to push)
(defun monky-push ()
"Pushes current branch to the default path."
(interactive)
(let* ((branch (monky-current-branch))
(remote (if current-prefix-arg
(monky-read-remote
(format "Push branch %s to : " branch))
monky-outgoing-repository)))
(if (string= "" remote)
(monky-run-hg-async "push" "--branch" branch)
(monky-run-hg-async "push" "--branch" branch remote))))
@tddsg Yes I'm going to copy it in my config file for now.
Hi,
This commit fixes the issue that I raised earlier https://github.com/ananthakumaran/monky/issues/52.
In summary, the variable
monky-outgoing-repository
is set to empty string""
by default, which may make the variableremote
to become an empty string as well.Later on, a list of arguments to a
hg
command will be concatenated using a whitespace separator`. This makes the hg command contains an empty space at the end like:
(hg --config diff.git=Off push --branch branch-name ), which makes the
hg push` command fails.In my fix, when the variable
remote
is an empty string, I will not include it in the arguments of the hg command.