I am building an app where the commit push happens in the back ground. I am able to commit – push to remote server.
Now i am going to make my app do the commit – push asynchronously. So whenever i do a push in the command line i need to get a response (saying it is successfully pushed or not)
As of now this is the message for successful push
pushing to http://...
1 changesets found
remote:adding changesets
remote:adding manifests
remote adding file changes
remote added 1 changesets with 1 changes to 1 files
It would be really helpful if i got something like successful or failed or 0 / 1
One of my friends told me to run echo %errorvariable% immediately after you execute the push command
That is returning 0 for success (successful push or no changes) and -1 for error.
Is this correct?
Using the Windows command prompt, the command to echo the return code would actually be
echo %errorlevel%. I just did a quick test and got three values of%errorlevel%:Depending upon how you launch Mercurial, you should be able to get access to the return code without doing
echo %errorlevel%. You’d need to look into the documentation for the function that you are calling to launch it for details.