changeset 20983:2778616de7ce

shelve: add "writebundle()" to invoke "writebundle()" with relative path and vfs
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Sun, 09 Mar 2014 01:03:28 +0900
parents 1df99f1ea28d
children f4a87d1ee1aa
files hgext/shelve.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Sun Mar 09 01:03:28 2014 +0900
+++ b/hgext/shelve.py	Sun Mar 09 01:03:28 2014 +0900
@@ -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 = changegroup.changegroupsubset(repo, 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))