comparison 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
comparison
equal deleted inserted replaced
13:400cb1520834 14:e0d21c9db20b
179 revrange=None): 179 revrange=None):
180 args = cmdbuilder('clone', source, dest, b=branch, u=updaterev, r=revrange) 180 args = cmdbuilder('clone', source, dest, b=branch, u=updaterev, r=revrange)
181 self.rawcommand(args) 181 self.rawcommand(args)
182 182
183 def commit(self, message, addremove=False): 183 def commit(self, message, addremove=False):
184 args = cmdbuilder('commit', m=message, A=addremove) 184 # --debug will print the committed cset
185 185 args = cmdbuilder('commit', debug=True, m=message, A=addremove)
186 self.rawcommand(args) 186
187 187 out = self.rawcommand(args)
188 # hope the tip hasn't changed since we committed 188 rev, node = out.splitlines()[-1].rsplit(':')
189 return self.tip() 189 return self.log(node)[0]
190 190
191 def config(self, refresh=False): 191 def config(self, refresh=False):
192 if not self._config or refresh: 192 if not self._config or refresh:
193 self._config.clear() 193 self._config.clear()
194 194