comparison mercurial/cmdutil.py @ 24476:1378f20c8564

record: change return value of recording code It makes it easier to include interactive mode to more commands that require to get a reference to the newly created node
author Laurent Charignon <lcharignon@fb.com>
date Wed, 25 Mar 2015 15:51:57 -0700
parents 06cbff4674a3
children 871485bd03fd
comparison
equal deleted inserted replaced
24475:06cbff4674a3 24476:1378f20c8564
184 # patch. Now is the time to delegate the job to 184 # patch. Now is the time to delegate the job to
185 # commit/qrefresh or the like! 185 # commit/qrefresh or the like!
186 186
187 # Make all of the pathnames absolute. 187 # Make all of the pathnames absolute.
188 newfiles = [repo.wjoin(nf) for nf in newfiles] 188 newfiles = [repo.wjoin(nf) for nf in newfiles]
189 commitfunc(ui, repo, *newfiles, **opts) 189 return commitfunc(ui, repo, *newfiles, **opts)
190
191 return 0
192 finally: 190 finally:
193 # 5. finally restore backed-up files 191 # 5. finally restore backed-up files
194 try: 192 try:
195 for realname, tmpname in backups.iteritems(): 193 for realname, tmpname in backups.iteritems():
196 ui.debug('restoring %r to %r\n' % (tmpname, realname)) 194 ui.debug('restoring %r to %r\n' % (tmpname, realname))