mercurial/commands.py
changeset 1559 59b3639df0a9
parent 1552 7509fa02437f
child 1560 6efad1cc07de
equal deleted inserted replaced
1554:68ec7b9e09a4 1559:59b3639df0a9
   676     if os.path.exists(dest):
   676     if os.path.exists(dest):
   677         raise util.Abort(_("destination '%s' already exists"), dest)
   677         raise util.Abort(_("destination '%s' already exists"), dest)
   678 
   678 
   679     dest = os.path.realpath(dest)
   679     dest = os.path.realpath(dest)
   680 
   680 
   681     class Dircleanup:
   681     class Dircleanup(object):
   682         def __init__(self, dir_):
   682         def __init__(self, dir_):
   683             self.rmtree = shutil.rmtree
   683             self.rmtree = shutil.rmtree
   684             self.dir_ = dir_
   684             self.dir_ = dir_
   685             os.mkdir(dir_)
   685             os.mkdir(dir_)
   686         def close(self):
   686         def close(self):
  1186             lstart = body.rfind('\n', begin, mstart) + 1 or begin
  1186             lstart = body.rfind('\n', begin, mstart) + 1 or begin
  1187             lend = body.find('\n', mend)
  1187             lend = body.find('\n', mend)
  1188             yield linenum, mstart - lstart, mend - lstart, body[lstart:lend]
  1188             yield linenum, mstart - lstart, mend - lstart, body[lstart:lend]
  1189             begin = lend + 1
  1189             begin = lend + 1
  1190 
  1190 
  1191     class linestate:
  1191     class linestate(object):
  1192         def __init__(self, line, linenum, colstart, colend):
  1192         def __init__(self, line, linenum, colstart, colend):
  1193             self.line = line
  1193             self.line = line
  1194             self.linenum = linenum
  1194             self.linenum = linenum
  1195             self.colstart = colstart
  1195             self.colstart = colstart
  1196             self.colend = colend
  1196             self.colend = colend
  1477     By default this command outputs: changeset id and hash, tags,
  1477     By default this command outputs: changeset id and hash, tags,
  1478     parents, user, date and time, and a summary for each commit. The
  1478     parents, user, date and time, and a summary for each commit. The
  1479     -v switch adds some more detail, such as changed files, manifest
  1479     -v switch adds some more detail, such as changed files, manifest
  1480     hashes or message signatures.
  1480     hashes or message signatures.
  1481     """
  1481     """
  1482     class dui:
  1482     class dui(object):
  1483         # Implement and delegate some ui protocol.  Save hunks of
  1483         # Implement and delegate some ui protocol.  Save hunks of
  1484         # output for later display in the desired order.
  1484         # output for later display in the desired order.
  1485         def __init__(self, ui):
  1485         def __init__(self, ui):
  1486             self.ui = ui
  1486             self.ui = ui
  1487             self.hunk = {}
  1487             self.hunk = {}