hgext3rd/topic/__init__.py
branchstable
changeset 4522 001eb0f11bcd
parent 4519 e23f85bc43ed
child 4524 f6099a171a9d
equal deleted inserted replaced
4521:5303b9128714 4522:001eb0f11bcd
   565         else:
   565         else:
   566             # Empty key will be dropped from extra by another hack at the changegroup level
   566             # Empty key will be dropped from extra by another hack at the changegroup level
   567             self._extra[constants.extrakey] = ''
   567             self._extra[constants.extrakey] = ''
   568 
   568 
   569 def wrapadd(orig, cl, manifest, files, desc, transaction, p1, p2, user,
   569 def wrapadd(orig, cl, manifest, files, desc, transaction, p1, p2, user,
   570             date=None, extra=None):
   570             date=None, extra=None, p1copies=None, p2copies=None):
   571     if constants.extrakey in extra and not extra[constants.extrakey]:
   571     if constants.extrakey in extra and not extra[constants.extrakey]:
   572         extra = extra.copy()
   572         extra = extra.copy()
   573         del extra[constants.extrakey]
   573         del extra[constants.extrakey]
       
   574     # hg <= 4.9 (0e41f40b01cc)
       
   575     kwargs = {}
       
   576     if p1copies is not None:
       
   577         kwargs['p1copies'] = p1copies
       
   578     if p2copies is not None:
       
   579         kwargs['p2copies'] = p2copies
   574     return orig(cl, manifest, files, desc, transaction, p1, p2, user,
   580     return orig(cl, manifest, files, desc, transaction, p1, p2, user,
   575                 date=date, extra=extra)
   581                 date=date, extra=extra, **kwargs)
   576 
   582 
   577 # revset predicates are automatically registered at loading via this symbol
   583 # revset predicates are automatically registered at loading via this symbol
   578 revsetpredicate = topicrevset.revsetpredicate
   584 revsetpredicate = topicrevset.revsetpredicate
   579 
   585 
   580 @command('topics', [
   586 @command('topics', [