Mercurial > python-hglib
diff hglib/client.py @ 14:e0d21c9db20b
client: use --debug when committing to get the new node info
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 10 Aug 2011 19:59:03 +0300 |
parents | 400cb1520834 |
children | f1af31960414 |
line wrap: on
line diff
--- a/hglib/client.py Wed Aug 10 00:42:43 2011 +0300 +++ b/hglib/client.py Wed Aug 10 19:59:03 2011 +0300 @@ -181,12 +181,12 @@ self.rawcommand(args) def commit(self, message, addremove=False): - args = cmdbuilder('commit', m=message, A=addremove) + # --debug will print the committed cset + args = cmdbuilder('commit', debug=True, m=message, A=addremove) - self.rawcommand(args) - - # hope the tip hasn't changed since we committed - return self.tip() + out = self.rawcommand(args) + rev, node = out.splitlines()[-1].rsplit(':') + return self.log(node)[0] def config(self, refresh=False): if not self._config or refresh: