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

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Tue Oct 17 17:01:03 EDT 2017


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!

> ryanmce wrote in cmdutil.py:733-734
> In theory, the phase boundary could move after our check but before we take the repolock. Can we guard against that please?
> 
> Two ways to accomplish this:
> 
> 1/ Take the repo lock earlier
> 2/ Check before repo lock (fast path) and again after the repo lock is held (in case something changed)

Improved the implementation by taking lock earlier. Thanks!

> ryanmce wrote in test-branch-change.t:10
> This test needs to include a case where we strip commits, especially with a merge, just so the behavior is clear in this change.
> 
> That will probably (in my understanding of the current code) expose an issue that needs to be fixed.

Oh, I didn't know that. Just banned merge revisions for now.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1074

To: pulkit, #hg-reviewers, dlax, ryanmce
Cc: ryanmce, dlax, mercurial-devel


More information about the Mercurial-devel mailing list