pulkit added a comment.
Nice work, I have left some inline comments. Can you also add a test where we pushing multiple branches and not every branch is a closed branch? INLINE COMMENTS > discovery.py:348 > + # Makes a list of closed branches > + closedbranches = [] > + for tag, heads, tip, isclosed in repo.branchmap().iterbranches(): How about having this as a set so that we don't need to convert it later. > discovery.py:350 > + for tag, heads, tip, isclosed in repo.branchmap().iterbranches(): > + if isclosed == True: > + closedbranches.append((tag)) `if isclosed` will work. > discovery.py:352 > + closedbranches.append((tag)) > + closedbranches = list(set(closedbranches) & set(newbranches)) > # 1. Check for new branches on the remote. No need to convert `closedbranches` back to list. > discovery.py:356 > branchnames = ', '.join(sorted(newbranches)) > - raise error.Abort(_("push creates new remote branches: %s!") > - % branchnames, > - hint=_("use 'hg push --new-branch' to create" > - " new remote branches")) > + if len(closedbranches) > 0: > + errmsg = (_("push creates new remote branches: %s (%d closed)!") `if closedbranches` will work here. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6038 To: taapas1128, #hg-reviewers Cc: pulkit, mharbison72, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel