Mercurial > hg
comparison mercurial/hg.py @ 11299:05ac42e56452 stable
push/pull: fix bug in "--branch ." handling
The branch wasn't expanded, so only the tip was operated on.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Mon, 07 Jun 2010 16:28:23 +0200 |
parents | e4dbaa40096d |
children | 24eeca1f2791 deaeb2d84d8a |
comparison
equal
deleted
inserted
replaced
11267:d3ebb1a0bc49 | 11299:05ac42e56452 |
---|---|
28 branchmap = repo.branchmap() | 28 branchmap = repo.branchmap() |
29 for branch in branches: | 29 for branch in branches: |
30 if branch == '.': | 30 if branch == '.': |
31 if not lrepo or not lrepo.local(): | 31 if not lrepo or not lrepo.local(): |
32 raise util.Abort(_("dirstate branch not accessible")) | 32 raise util.Abort(_("dirstate branch not accessible")) |
33 revs.append(lrepo.dirstate.branch()) | 33 branch = lrepo.dirstate.branch() |
34 butf8 = encoding.fromlocal(branch) | |
35 if butf8 in branchmap: | |
36 revs.extend(node.hex(r) for r in reversed(branchmap[butf8])) | |
34 else: | 37 else: |
35 butf8 = encoding.fromlocal(branch) | 38 revs.append(branch) |
36 if butf8 in branchmap: | |
37 revs.extend(node.hex(r) for r in reversed(branchmap[butf8])) | |
38 else: | |
39 revs.append(branch) | |
40 return revs, revs[0] | 39 return revs, revs[0] |
41 | 40 |
42 def parseurl(url, branches=None): | 41 def parseurl(url, branches=None): |
43 '''parse url#branch, returning url, branches+[branch]''' | 42 '''parse url#branch, returning url, branches+[branch]''' |
44 | 43 |