Patchwork [9,of,9] shelve: add "writebundle()" to invoke "writebundle()" with relative path and vfs

login
register
mail settings
Submitter Katsunori FUJIWARA
Date March 8, 2014, 4:07 p.m.
Message ID <f66c5c61839ad3972bd9.1394294834@juju>
Download mbox | patch
Permalink /patch/3899/
State Accepted
Commit 2778616de7ce64e92c1e6611b3493734be586f35
Headers show

Comments

Katsunori FUJIWARA - March 8, 2014, 4:07 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1394294608 -32400
#      Sun Mar 09 01:03:28 2014 +0900
# Node ID f66c5c61839ad3972bd91af87dcf4e0ab7a564bf
# Parent  8db5796fef8c9d7d4e5329c96c6e7c692d91922e
shelve: add "writebundle()" to invoke "writebundle()" with relative path and vfs
Matt Mackall - April 11, 2014, 9:34 p.m.
On Sun, 2014-03-09 at 01:07 +0900, FUJIWARA Katsunori wrote:
> # HG changeset patch
> # User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
> # Date 1394294608 -32400
> #      Sun Mar 09 01:03:28 2014 +0900
> # Node ID f66c5c61839ad3972bd91af87dcf4e0ab7a564bf
> # Parent  8db5796fef8c9d7d4e5329c96c6e7c692d91922e
> shelve: add "writebundle()" to invoke "writebundle()" with relative path and vfs

These are queued for default, thanks for your patience. I've fixed up
the various collisions with the ongoing bundle refactoring.

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -77,6 +77,9 @@ 
         finally:
             fp.close()
 
+    def writebundle(self, cg):
+        changegroup.writebundle(cg, self.fname, 'HG10UN', self.vfs)
+
 class shelvedstate(object):
     """Handle persistence during unshelving operations.
 
@@ -237,8 +240,7 @@ 
 
         bases = list(publicancestors(repo[node]))
         cg = repo.changegroupsubset(bases, [node], 'shelve')
-        changegroup.writebundle(cg, shelvedfile(repo, name, 'hg').filename(),
-                                'HG10UN')
+        shelvedfile(repo, name, 'hg').writebundle(cg)
         cmdutil.export(repo, [node],
                        fp=shelvedfile(repo, name, 'patch').opener('wb'),
                        opts=mdiff.diffopts(git=True))