diff -r d1f4657f55e4 -r ca739acf1a98 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Apr 19 16:47:44 2010 -0500 +++ b/mercurial/localrepo.py Mon Apr 12 19:33:25 2010 -0400 @@ -455,6 +455,14 @@ pass raise error.RepoLookupError(_("unknown revision '%s'") % key) + def lookupbranch(self, key, remote=None): + repo = remote or self + if key in repo.branchmap(): + return key + + repo = (remote and remote.local()) and remote or self + return repo[key].branch() + def local(self): return True