Revision 98df1105

b/fabfile.py
151 151
def co(c):
152 152
    current_branch = branch();
153 153
    git("checkout %s" % c)
154
    yield
155
    git("checkout %s" % current_branch)
154
    # Use a try block to make sure we checkout the original branch.
155
    try:
156
        yield
157
    finally:
158
        git("checkout %s" % current_branch)
156 159

  
157 160

  
158 161
#

Also available in: Unified diff