Commits

Patrick Mézard committed a1fb18a

evolve: avoid duplication in graft wrapper

  • Participants
  • Parent commits 22f348c
  • Branches stable

Comments (0)

Files changed (1)

         lock.release()
 
 def graftwrapper(orig, ui, repo, *revs, **kwargs):
+    obsoleted = kwargs.setdefault('obsolete', [])
     lock = repo.lock()
     try:
         if kwargs.get('old_obsolete'):
-            obsoleted = kwargs.setdefault('obsolete', [])
             if kwargs['continue']:
                 obsoleted.extend(repo.opener.read('graftstate').splitlines())
             else:
                 obsoleted.extend(revs)
         # convert obsolete target into revs to avoid alias joke
-        obsoleted = kwargs.setdefault('obsolete', [])
         obsoleted[:] = [str(i) for i in repo.revs('%lr', obsoleted)]
         if obsoleted and len(revs) > 1: