Mercurial Commit multiple change sets as one change set

I have the following question. Now suppose we have two repositories: a stable one and one developer (that is, a child of the central). Suppose I made a few commits (about ten) in the developer repository while debugging and cleaning up the function I'm working on.

Suppose I have finished working with this function and I dragged it to a central repository. Everything is in order, however, I would like to be able to somehow filter the central repository log. As far as I understand, it will show information about all the commits that I made in the developers repository. Is there any way to somehow filter out this information and display information only about clicking in the history log? I mean, this is the only big fix - stable.

I understand that inside the central repository, the changes will not be merged into one, what I would like to see is the history of clicks, not changes.

+6
source share
4 answers
  • You cannot have a local repo and push-target with a different story . You will need to create an intermediate local repo for the strip story.
  • In addition to the link provided by Raghuram, I will recall the Histedit extension .
+4
source

The push history is not recorded anywhere as far as I know. The only thing you can do is use the hook in the central repository to register them yourself, but it will be separate and not part of the regular stream.

The only thing slightly related is hg log -m , which only shows merges. Considering that there is a merger at the end of any development branch, this can be useful, but only if people add a useful commit message to their merge, and not just a "Merge", which, apparently, people do.

+1
source

There may be two solutions that I could think of. However, both have their drawbacks.

Assuming your development tip is ā€œDā€ and the steady tip is ā€œSā€.

1) For this you can use the forwarding extension. First, clone your repo developer and run:

 hg -b <D> -d <S> --collapse --detach 

Make sure you are using the latest version of Mercurial (stable tip). Recently, several fixes have been fixed that affect this particular use of rebase. The disadvantage is that you have to merge with each revision in a separate development branch.

2) You can merge your repositories as usual, but instead of merging, use the following hack. ss

 hg update <S> hg merge <D> ...resolve conflicts if necessary... ...but do not commit!... hg debugsetparents <S> hg commit -m "Squash merge from devel branch" 

Thus, we force only one parent to be committed. This is a hack and therefore not recommended. But it works great for me.

+1
source

I think you are looking at how to merge a set of changes . The link contains several parameters.

0
source

Source: https://habr.com/ru/post/902364/


All Articles