On 19/03/12 05:19, skeept wrote:
On Mar 18, 11:15 pm, Tony Mechelynck <[email protected]>
wrote:
Hi Tony,
your answer makes a lot of sense, except that I don't run hg pull
directly, I run it in a script that
also tries to get updates for other programs and scripts so I don't
get an opportunity to choose if I want to
discard the changes.
I added the file to .hgignore, so I guess the only time I will have
problems in the future is when some change to
.hgignore occurs.
Best Regards,
Jorge.
Well, I suppose you can add the hg in command to your script. You might
then get a chance to backtrack and see what happened if the script seems
to hang.
With the fetch extension enabled, I would use (under the bash shell)
(hg in && hg fetch --switch-parent || echo 'exit status' $? ; date) \
2>&1 |tee -a ../hg-vim.log
Since hg in ends with exit status 1 when no changes are found, this
would omit the fetch step when there are no changes, or when something
wrong happens causing hg in to signal an error. The ";date" step lets me
see how much time has elapsed since the latest run.
Best regards,
Tony.
--
When danger reared its ugly head,
He bravely turned his tail and fled
Yes, Brave Sir Robin turned about
And gallantly he chickened out
Bravely taking to his feet
He beat a very brave retreat
Bravest of the brave Sir Robin
Petrified of being dead
Soiled his pants then brave Sir Robin
Turned away and fled.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php