addbranchrevs() error message suggestion
Patrick Mézard
pmezard at gmail.com
Mon Feb 8 14:08:48 CST 2010
Le 07/02/10 14:31, Mercurial Commits a écrit :
> New changeset in mercurial/crew:
>
> http://hg.intevation.org/mercurial/crew/rev/d757bc0c7865
> changeset: 10365:d757bc0c7865
> tag: tip
> user: Sune Foldager <cryo at cyanite.org>
> date: Sun Feb 07 14:29:07 2010 +0100
> summary: interpret repo#name url syntax as branch instead of revision
>
> diff --git a/mercurial/hg.py b/mercurial/hg.py
> --- a/mercurial/hg.py
> +++ b/mercurial/hg.py
> @@ -9,7 +9,7 @@
> from i18n import _
> from lock import release
> import localrepo, bundlerepo, httprepo, sshrepo, statichttprepo
> -import lock, util, extensions, error, encoding
> +import lock, util, extensions, error, encoding, node
> import merge as _merge
> import verify as _verify
> import errno, os, shutil
> @@ -18,15 +18,31 @@
> return (os.path.isfile(util.drop_scheme('file', path)) and
> bundlerepo or localrepo)
>
> -def parseurl(url, revs=[]):
> - '''parse url#branch, returning url, branch + revs'''
> +def addbranchrevs(lrepo, repo, branches, revs):
> + if not branches:
> + return revs or None, revs and revs[0] or None
> + branchmap = repo.branchmap()
> + revs = revs and list(revs) or []
> + for branch in branches:
> + if branch == '.':
> + if not lrepo or not lrepo.local():
> + raise util.Abort(_("dirstate branch not accessible"))
What about something like "cannot get remote (repository?) working directory branch" or something like that? The dirstate reference may be a bit cryptic.
--
Patrick Mézard
More information about the Mercurial-devel
mailing list