diff mercurial/commands.py @ 3669:f4dc02d7fb71

unduplicate bundle writing code from httprepo
author Matt Mackall <mpm@selenic.com>
date Wed, 15 Nov 2006 23:37:45 -0600
parents 8500a13ec44b
children b4903debbe3b
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -332,7 +332,7 @@ def bundle(ui, repo, fname, dest=None, *
         cg = repo.changegroupsubset(o, revs, 'bundle')
     else:
         cg = repo.changegroup(o, 'bundle')
-    changegroup.writebundle(cg, fname, False)
+    changegroup.writebundle(cg, fname, "HG10")
 
 def cat(ui, repo, file1, *pats, **opts):
     """output the latest or given revisions of files
@@ -1292,7 +1292,8 @@ def incoming(ui, repo, source="default",
         if fname or not other.local():
             # create a bundle (uncompressed if other repo is not local)
             cg = other.changegroup(incoming, "incoming")
-            fname = cleanup = changegroup.writebundle(cg, fname, other.local())
+            type = other.local() and "HG10" or "HG10UN"
+            fname = cleanup = changegroup.writebundle(cg, fname, type)
             # keep written bundle?
             if opts["bundle"]:
                 cleanup = None