# HG changeset patch # User Idan Kamara # Date 1312995543 -10800 # Node ID e0d21c9db20b692c76024dac7cf4ea27c04b8193 # Parent 400cb1520834e7a6c1e5be88b59238acfa037339 client: use --debug when committing to get the new node info diff -r 400cb1520834 -r e0d21c9db20b hglib/client.py --- 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: