contrib/synthrepo.py
changeset 41397 0bd56c291359
parent 41365 876494fd967d
child 41398 2ff8994ac71d
equal deleted inserted replaced
41396:3461814417f3 41397:0bd56c291359
   347 
   347 
   348     # Synthesize a single initial revision adding files to the repo according
   348     # Synthesize a single initial revision adding files to the repo according
   349     # to the modeled directory structure.
   349     # to the modeled directory structure.
   350     initcount = int(opts['initfiles'])
   350     initcount = int(opts['initfiles'])
   351     if initcount and initdirs:
   351     if initcount and initdirs:
   352         pctx = repo[None].parents()[0]
   352         pctx = repo[None].p1()
   353         dirs = set(pctx.dirs())
   353         dirs = set(pctx.dirs())
   354         files = {}
   354         files = {}
   355 
   355 
   356         def validpath(path):
   356         def validpath(path):
   357             # Don't pick filenames which are already directory names.
   357             # Don't pick filenames which are already directory names.