Only attempt to verify heads hg has, too

In the git repo there may be any number branches that are not hg
imported branches, so it doesn't make sense to print warnings when a
non-hg head isn't at what it was last time.

Now we get a list of branchtags hg has and only verify these.

Signed-off-by: Rocco Rutte <pdmef@gmx.net>
This commit is contained in:
Rocco Rutte
2007-03-10 14:28:45 +00:00
parent 796fa5f4cb
commit af3810ae2f

View File

@@ -57,11 +57,12 @@ def fixup_user(user,authors):
name=m2.group(1)
return '%s %s' % (name,mail)
def get_branch(name):
if name=='HEAD':
name=cfg_master
return name
def get_changeset(ui,repo,revision,authors):
def get_branch(name):
if name=='HEAD':
name=cfg_master
return name
node=repo.lookup(revision)
(manifest,user,(time,timezone),files,desc,extra)=repo.changelog.read(node)
tz="%+03d%02d" % (-timezone / 3600, ((-timezone % 3600) / 60))
@@ -290,7 +291,13 @@ def verify_heads(ui,repo,cache):
f.close()
return sha1
for b in cache.keys():
# get list of hg's branches to verify, don't take all git has
branches=repo.branchtags()
l=[(-repo.changelog.rev(n), n, t) for t, n in branches.items()]
l.sort()
for _,_,b in l:
b=get_branch(b)
sys.stderr.write('Verifying branch [%s]\n' % b)
sha1=getsha1(b)
c=cache.get(b)