I have been using PHP, Javascript, Jquery with codeignitor since 2009. I used to use and make many custom functions for development purpose of which some are noteworthy and may be useful for others also. I would like to share and discuss such custom functions with all enthusiasts.
Tuesday, November 28, 2017
Sunday, July 23, 2017
Mercurial: Tips and tricks
1. Usage: Completely remove a named branch.
$: hg strip "branch(${BRANCHNAME})"
$:hg pull -u
$:hg outgoing
4. Add, Remove tag
$:hg tag -r newrevisionhash stable
$:hg tag --remove stable
5. Incoming and Outgoing
$:hg incoming
$:hg incoming -p
$:hg incoming -b <branchname>
$:hg incoming -p -b <branchname>
6. Copy files across branches
$:hg update -r to-branch
$:hg revert -r from-branch file
$:hg ci -m 'copied single file from from-branch to to-branch
7. Dirty merge If both branches have made changes to a file that you want to keep, a dirty trick would be to create a merge of the two branches using hg merge, possibly/probably on still another branch, check that in, and then copy a single file between the merge and the to-branch(Reference: Stackoverflow)
$:hg update -r to-branch
$:branch merge-branch
$:hg merge -r from-branch
$:hg ci -m 'temp merge to be discarded"
$:hg update -r to-branch
$:hg revert -r merge-branch single-file
$:hg ci -m 'merged single-file from from-branch to to-branch"
$:hg strip merge-branch
8. To see heads in a particular branch <branch name>
$:hg heads <branch name>
9. To commit as a user <userDisplayName>
$:hg commit -u <userDisplayName>
Labels:
delete branch,
hg,
mercurial
Location:
Dubai - United Arab Emirates
Subscribe to:
Posts (Atom)