changeset 10380:ee72d89c0d9f

addbranchrevs: fallback for older servers
author Sune Foldager <cryo@cyanite.org>
date Sun, 07 Feb 2010 15:57:16 +0100
parents a78bfaf988e1
children a7df048b6a0d
files mercurial/hg.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Sun Feb 07 15:23:46 2010 +0100
+++ b/mercurial/hg.py	Sun Feb 07 15:57:16 2010 +0100
@@ -21,8 +21,11 @@
 def addbranchrevs(lrepo, repo, branches, revs):
     if not branches:
         return revs or None, revs and revs[0] or None
+    revs = revs and list(revs) or []
+    if not repo.capable('branchmap'):
+        revs.extend(branches)
+        return revs, revs[0]
     branchmap = repo.branchmap()
-    revs = revs and list(revs) or []
     for branch in branches:
         if branch == '.':
             if not lrepo or not lrepo.local():