In mercurial, find all revision commands that have a parent that is not outgoing

I have a large number of separate lists of changes that I pulled from a colleague. I want to take them off.

I can identify all changes with:

hg log -r "outgoing() and not author('Brandon Leiran')" 

I could use the template to print only the node names, and then use it for my list of stripes, but I would really like to find only the "base" of each outgoing line of change sets. Can I do this with a rollback request? Or something similar?

+4
source share
2 answers

Starting with version 1.7, the strip command allows you to specify multiple sets of changes for markup and allows you to use revsets. So

 $ hg strip "outgoing() and not author('Brandon Leiran')" 

will delete all changes in one team. In other words, you do not need to search for the base (s) yourself, the strip will process it for you.

However, if you want the databases to be used in some other context, use the roots function to calculate them:

 $ hg log -r "roots(outgoing() and not author('Brandon Leiran'))" 
+4
source

I assume that you do not have β€œimportant” (i.e. yours) change sets on top of any of the branches you pulled.

Now, if so, and the number of individual branches (or lists, as you called them) is small, you may need to delete the result of this selector several times until it makes any changes:

 min(outgoing() and not author('Brandon Leiran')) 

Since min returns the changeset with the lowest revision number in the set, it will be the base of one of the branches you split.

0
source

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


All Articles