hgext/evolve.py
changeset 1120 9bc4857f573b
parent 1118 fbc400c1b022
child 1122 c8750f4388c8
equal deleted inserted replaced
1119:7068ccfed963 1120:9bc4857f573b
  2152 
  2152 
  2153     roots = repo.revs('roots(%ld)', revs)
  2153     roots = repo.revs('roots(%ld)', revs)
  2154     if len(roots) > 1:
  2154     if len(roots) > 1:
  2155         raise util.Abort(_("cannot fold non-linear revisions "
  2155         raise util.Abort(_("cannot fold non-linear revisions "
  2156                            "(multiple roots given)"))
  2156                            "(multiple roots given)"))
  2157     root = repo[roots[0]]
  2157     root = repo[roots.first()]
  2158     if root.phase() <= phases.public:
  2158     if root.phase() <= phases.public:
  2159         raise util.Abort(_("cannot fold public revisions"))
  2159         raise util.Abort(_("cannot fold public revisions"))
  2160     heads = repo.revs('heads(%ld)', revs)
  2160     heads = repo.revs('heads(%ld)', revs)
  2161     if len(heads) > 1:
  2161     if len(heads) > 1:
  2162         raise util.Abort(_("cannot fold non-linear revisions "
  2162         raise util.Abort(_("cannot fold non-linear revisions "
  2163                            "(multiple heads given)"))
  2163                            "(multiple heads given)"))
  2164     head = repo[heads[0]]
  2164     head = repo[heads.first()]
  2165     wlock = lock = None
  2165     wlock = lock = None
  2166     try:
  2166     try:
  2167         wlock = repo.wlock()
  2167         wlock = repo.wlock()
  2168         lock = repo.lock()
  2168         lock = repo.lock()
  2169         tr = repo.transaction('touch')
  2169         tr = repo.transaction('touch')