hgext/simple4server.py
branchmercurial-3.5
changeset 1750 1dbb8fdb725a
parent 1730 346de2c1b0e9
child 1757 86e71a0b3319
equal deleted inserted replaced
1707:981d895d69cf 1750:1dbb8fdb725a
     6 /!\ THIS EXTENSION IS INTENDED FOR SERVER SIDE ONLY USAGE /!\
     6 /!\ THIS EXTENSION IS INTENDED FOR SERVER SIDE ONLY USAGE /!\
     7 
     7 
     8 For client side usages it is recommended to use the evolve extension for
     8 For client side usages it is recommended to use the evolve extension for
     9 improved user interface.'''
     9 improved user interface.'''
    10 
    10 
    11 testedwith = '3.3.3 3.4-rc'
    11 testedwith = '3.3 3.4-rc'
    12 buglink = 'http://bz.selenic.com/'
    12 buglink = 'https://bz.mercurial-scm.org/'
    13 
    13 
    14 import mercurial.obsolete
    14 import mercurial.obsolete
    15 
    15 
       
    16 import hashlib
    16 import struct
    17 import struct
    17 from mercurial import util
    18 from mercurial import util
    18 from mercurial import wireproto
    19 from mercurial import wireproto
    19 from mercurial import extensions
    20 from mercurial import extensions
    20 from mercurial import obsolete
    21 from mercurial import obsolete
   190     unfi = repo.unfiltered()
   191     unfi = repo.unfiltered()
   191     markercache = {}
   192     markercache = {}
   192     for i in unfi:
   193     for i in unfi:
   193         ctx = unfi[i]
   194         ctx = unfi[i]
   194         entry = 0
   195         entry = 0
   195         sha = util.sha1()
   196         sha = hashlib.sha1()
   196         # add data from p1
   197         # add data from p1
   197         for p in ctx.parents():
   198         for p in ctx.parents():
   198             p = p.rev()
   199             p = p.rev()
   199             if p < 0:
   200             if p < 0:
   200                 p = node.nullid
   201                 p = node.nullid