hgext/patchbomb.py
changeset 21055 dbff8c119cf6
parent 20790 49f2d5644f04
child 21282 697fba94dec9
equal deleted inserted replaced
21054:fffa9f17c3ef 21055:dbff8c119cf6
   289             ui.status(_("no changes found\n"))
   289             ui.status(_("no changes found\n"))
   290             return []
   290             return []
   291         return [str(r) for r in revs]
   291         return [str(r) for r in revs]
   292 
   292 
   293     def getpatches(revs):
   293     def getpatches(revs):
       
   294         prev = repo['.'].rev()
   294         for r in scmutil.revrange(repo, revs):
   295         for r in scmutil.revrange(repo, revs):
       
   296             if r == prev and (repo[None].files() or repo[None].deleted()):
       
   297                 ui.warn(_('warning: working directory has '
       
   298                           'uncommitted changes\n'))
   295             output = cStringIO.StringIO()
   299             output = cStringIO.StringIO()
   296             cmdutil.export(repo, [r], fp=output,
   300             cmdutil.export(repo, [r], fp=output,
   297                          opts=patch.diffopts(ui, opts))
   301                          opts=patch.diffopts(ui, opts))
   298             yield output.getvalue().split('\n')
   302             yield output.getvalue().split('\n')
   299 
   303