diff mercurial/commands.py @ 3662: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	Wed Nov 15 15:51:58 2006 -0600
+++ b/mercurial/commands.py	Wed Nov 15 23:37:45 2006 -0600
@@ -332,7 +332,7 @@
         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 @@
         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