Hi guys,

I tried to find some common use cases with regards to mercurial and
branches. I thought that it might be useful to wider audience.

* path_to_component can be for example '.' if you are in the component
  directory. If you don't specify the path, the operation applies to
  whole Userland repository, which is something you probably don't want

* In the examples I'm using s11-sru as branch name. Just use default
  instead if you need to

* Show commits which happened on default since we branched SRU branch
  hg log -r s11:tip -b default path_to_component
  Please note that the s11 is the place where branching happened.

* To programatically find where the branching happened run
  hg parents -r $(hg log -b s11-sru -l 1 -r 0:tip --template '{rev}\n')

* Changed files between Update and SRU branch
  hg status --rev s11-sru --rev default path_to_component

* Display diff between Update and SRU branch
  hg diff --rev s11-sru --rev default path_to_component
  (apply this diff to SRU to be on the same level as Update)

* Display diff between my working copy and SRU branch
  hg diff --rev s11-sru path_to_component

* Show log on a given branch
  hg log -b s11-sru path_to_component

* Copy changeset X from default to SRU.
  hg log -p -r X | hg import --no-commit -
  Then normally hg diff/hg commit/....


It's available on internal sustaining docs
https://rpe.us.oracle.com/bin/view/Procbible/SustainingUserland
-- 
        Vlad
_______________________________________________
userland-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/userland-discuss

Reply via email to