Mercurial > hg > config
annotate bin/hg-merge-branch.sh @ 901:d01703658029
gitconfig
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Thu, 09 Feb 2023 14:16:11 -0800 |
parents | cf793eb3811e |
children |
rev | line source |
---|---|
318
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 #!/bin/bash |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 # merge a hg branch repo |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 # from https://wiki.mozilla.org/User:Asasaki:Cedar |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 # TODO: inclusion in mercurial utilities package |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
7 if [[ "$#" != "3" ]] |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 then |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 echo "Usage: hg-merge-branch.sh scheme://hg/repository" |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 exit 1 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 fi |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
12 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
13 if ! hg root |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
14 then |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
15 exit 255 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
16 fi |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
17 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
18 # Update to latest |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
19 # the hg up -C will blow away any local changes! |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
20 #hg pull |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
21 #hg up -C -r default |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
22 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
23 # Pull latest branch changes in |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
24 #hg pull $1 |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
25 #hg merge |
cf793eb3811e
from https://wiki.mozilla.org/User:Asasaki:Cedar
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
26 #hg commit -m "Merge m-c -> cedar" |