annotate bin/hg-merge-branch.sh @ 706:0d4310d2fd1c

obselete twice over
author Jeff Hammel <k0scist@gmail.com>
date Wed, 03 Sep 2014 18:08:10 -0700
parents cf793eb3811e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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"