mercurial/commands.py
changeset 1106 95a044b73bd5
parent 1105 a906b018eaef
child 1108 7a75d8fbbdaf
equal deleted inserted replaced
1105:a906b018eaef 1106:95a044b73bd5
  1346                    ('added', 'A', a),
  1346                    ('added', 'A', a),
  1347                    ('removed', 'R', d),
  1347                    ('removed', 'R', d),
  1348                    ('unknown', '?', u)]
  1348                    ('unknown', '?', u)]
  1349 
  1349 
  1350     end = opts['print0'] and '\0' or '\n'
  1350     end = opts['print0'] and '\0' or '\n'
  1351     
  1351 
  1352     for opt, char, changes in ([ct for ct in changetypes if opts[ct[0]]]
  1352     for opt, char, changes in ([ct for ct in changetypes if opts[ct[0]]]
  1353                                or changetypes):
  1353                                or changetypes):
  1354         if opts['no_status']:
  1354         if opts['no_status']:
  1355             format = "%%s%s" % end
  1355             format = "%%s%s" % end
  1356         else:
  1356         else:
  1357             format = "%s %%s%s" % (char, end);
  1357             format = "%s %%s%s" % (char, end);
  1358             
  1358 
  1359         for f in changes:
  1359         for f in changes:
  1360             ui.write(format % f)
  1360             ui.write(format % f)
  1361 
  1361 
  1362 def tag(ui, repo, name, rev=None, **opts):
  1362 def tag(ui, repo, name, rev=None, **opts):
  1363     """add a tag for the current tip or a given revision"""
  1363     """add a tag for the current tip or a given revision"""