D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-14 Thread pulkit (Pulkit Goyal)
pulkit created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This patch adds a new --rev flag to hg branch which can be used to change branch of revisions. This is motivated from topic extension where you can change topic

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-15 Thread dlax (Denis Laxalde)
dlax added inline comments. INLINE COMMENTS > cmdutil.py:749 > +if len(heads) < 1: > +raise error.Abort(_("cannot change branch in betwen the stack")) > + typo: betwen Also, I'm not sure "between" is appropriate here. Maybe "cannot change branch in the middle of a stack"? > cmduti

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-15 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 2789. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1074?vs=2736&id=2789 REVISION DETAIL https://phab.mercurial-scm.org/D1074 AFFECTED FILES mercurial/cmdutil.py mercurial/commands.py tests/test-branch-change.

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-16 Thread dlax (Denis Laxalde)
dlax requested changes to this revision. dlax added a comment. This revision now requires changes to proceed. This looks correct to me overall. I use this feature with topics a lot and find it pretty convenient so I guess it might make sense for named branches in some workflows. INLINE COMM

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-16 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 2807. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1074?vs=2789&id=2807 REVISION DETAIL https://phab.mercurial-scm.org/D1074 AFFECTED FILES mercurial/cmdutil.py mercurial/commands.py tests/test-branch-change.

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-17 Thread ryanmce (Ryan McElroy)
ryanmce requested changes to this revision. ryanmce added inline comments. This revision now requires changes to proceed. INLINE COMMENTS > cmdutil.py:722-731 > +revs = scmutil.revrange(repo, revs) > +roots = repo.revs('roots(%ld)', revs) > +if len(roots) > 1: > +raise error.A

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-17 Thread pulkit (Pulkit Goyal)
pulkit added inline comments. INLINE COMMENTS > ryanmce wrote in cmdutil.py:791-792 > Seems like we need a refactor? (out of scope for this change though) Yeah, I will be happy to do that in next cycle. Can you suggest a name for file in which we can split cmdutil.py. > ryanmce wrote in test-b

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-17 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 2944. pulkit edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1074?vs=2807&id=2944 REVISION DETAIL https://phab.mercurial-scm.org/D1074 AFFECTED FILES mercurial/cmdutil.py mercu

D1074: branch: add a --rev flag to change branch name of given revisions

2017-10-17 Thread pulkit (Pulkit Goyal)
pulkit marked 4 inline comments as done. pulkit added inline comments. INLINE COMMENTS > ryanmce wrote in cmdutil.py:722-731 > What about an unclean working copy? It looks like that's supported -- could > we make sure it's tested? It's not supported. Handled that case and added a test. Thanks!

D1074: branch: add a --rev flag to change branch name of given revisions

2017-11-02 Thread pulkit (Pulkit Goyal)
pulkit added a comment. Re-requesting review since the freeze is over. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1074 To: pulkit, #hg-reviewers, dlax, ryanmce Cc: ryanmce, dlax, mercurial-devel ___ Mercurial-devel

D1074: branch: add a --rev flag to change branch name of given revisions

2017-11-17 Thread lothiraldan (Boris Feld)
lothiraldan added a comment. Looking good, should we allow changing the branch if any changeset is unstable or obsolete? INLINE COMMENTS > cmdutil.py:723 > +with repo.wlock(), repo.lock(), repo.transaction('branches'): > +# abort incase in uncommitted merger of dirty wdir > +

D1074: branch: add a --rev flag to change branch name of given revisions

2017-11-28 Thread pulkit (Pulkit Goyal)
pulkit added a comment. In https://phab.mercurial-scm.org/D1074#23972, @lothiraldan wrote: > Looking good, should we allow changing the branch if any changeset is unstable or obsolete? For unstable `yes`, for obsolete `no`. Will add a check and test for obsolete case. INLINE COM

D1074: branch: add a --rev flag to change branch name of given revisions

2017-12-02 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 4082. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1074?vs=2944&id=4082 REVISION DETAIL https://phab.mercurial-scm.org/D1074 AFFECTED FILES mercurial/cmdutil.py mercurial/commands.py tests/test-branch-change.

D1074: branch: add a --rev flag to change branch name of given revisions

2017-12-04 Thread pulkit (Pulkit Goyal)
pulkit added a comment. This was send before the code freeze of last major release but since it was late in the release, it was not taken. Let's iterate on it now. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1074 To: pulkit, #hg-reviewers, dlax, ryanmce Cc:

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-15 Thread pulkit (Pulkit Goyal)
pulkit added subscribers: indygreg, yuja, krbullock, durin42. pulkit added a comment. @durin42 @yuja @indygreg @krbullock this one is lying here for months. Does this conflict with anything or is a BC or something else, or was just missed for the review? REPOSITORY rHG Mercurial REVISION

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-16 Thread lothiraldan (Boris Feld)
lothiraldan added a comment. Apart from my review, it looks good to me. Also I don't think you have a test when trying to change the branch of several changesets on different branches. If not, could you add one? INLINE COMMENTS > cmdutil.py:731 > +if repo.revs('merge() and %ld',

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-18 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > cmdutil.py:720 > +with repo.wlock(), repo.lock(), repo.transaction('branches'): > +# abort incase in uncommitted merger of dirty wdir > +bailifchanged(repo) "in case of uncommited merge or dirty wdir"? (note that there are 4

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-18 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 4934. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1074?vs=4082&id=4934 REVISION DETAIL https://phab.mercurial-scm.org/D1074 AFFECTED FILES mercurial/cmdutil.py mercurial/commands.py tests/test-branch-change.

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-18 Thread pulkit (Pulkit Goyal)
pulkit removed subscribers: durin42, krbullock, yuja, indygreg. pulkit marked 5 inline comments as done. pulkit added inline comments. INLINE COMMENTS > martinvonz wrote in commands.py:1051-1056 > Does this need to be modified to work with --rev? I've never used `hg > branch`, but it sounds like

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-19 Thread pulkit (Pulkit Goyal)
pulkit added inline comments. INLINE COMMENTS > cmdutil.py:739 > +if repo.revs('(%ld::head()) - %ld', revs, revs): > +raise error.Abort(_("cannot change branch in middle of a stack")) > + After some more testing, I found this is not correct and raise the error even in cases

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-19 Thread pulkit (Pulkit Goyal)
pulkit updated this revision to Diff 4935. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1074?vs=4934&id=4935 REVISION DETAIL https://phab.mercurial-scm.org/D1074 AFFECTED FILES mercurial/cmdutil.py mercurial/commands.py tests/test-branch-change.

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-19 Thread durin42 (Augie Fackler)
durin42 added a comment. Accepting this since it seems generally liked and is marked experimental. We can always rip it out if it turns out to be a mistake. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1074 To: pulkit, #hg-reviewers, dlax, ryanmce, lothiralda

D1074: branch: add a --rev flag to change branch name of given revisions

2018-01-19 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3bd8ab4c80a5: branch: add a --rev flag to change branch name of given revisions (authored by pulkit, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org