Changes between Version 13 and Version 14 of MercurialBranches
- Timestamp:
- Dec 3, 2010, 10:36:15 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MercurialBranches
v13 v14 86 86 87 87 print 88 branch = os.environ.get('DJANGO_BRANCH',None) 89 if branch is None: 90 branch = raw_input('Backport branch: ') 91 else: 92 print "Backport branch:", branch 93 88 94 msg_file = open(msg, 'r') 89 95 outlines = [] … … 97 103 firstline = False 98 104 print 'MERGING: %s' % line 99 outlines.append('[ 1.2.X] %s' % line)105 outlines.append('[%s] %s' % (branch, line)) 100 106 else: 101 107 outlines.append(line) … … 123 129 {{{ 124 130 #!sh 125 #!/bin/bash126 131 export SVNMERGE_REVISION=`hg svn info -r $1 | egrep '^Revision' | cut -f 2 -d ' '` 127 hg transplant $1 --filter /path/to/backport.py 132 export DJANGO_BRANCH=`hg branch | cut -f 2 -d '/'` 133 hg transplant $1 --filter commit.py 128 134 unset SVNMERGE_REVISION 135 unset DJANGO_BRANCH 129 136 }}} 130 137 … … 142 149 }}} 143 150 144 This script needs to be manually updated after every release, because the [1.2.X] string is hardcoded. This is mostly due to my (Russell's) own laziness -- it would be trivial to update the script to pull the branch identifier from the output of `hg branch`.145 146 151 === Gotchas === 147 152