# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1245587854 -7200
# Node ID 779a60d9ac599a44f991c3da44e653354710fbe9
# Parent  8d695f3831da9059a8766bd78e98f0e556d4b82c
hgshelve: let change ee88384b8e24 work with old hg

diff -r 8d695f3831da -r 779a60d9ac59 hggtk/hgshelve.py
--- a/hggtk/hgshelve.py Mit Mai 27 14:48:15 2009 +0200
+++ b/hggtk/hgshelve.py Son Jun 21 14:37:34 2009 +0200
@@ -501,7 +501,12 @@
                 if dopatch:
                     ui.debug(_('applying patch\n'))
                     ui.debug(fp.getvalue())
-                    patch.internalpatch(fp, ui, 1, repo.root, eolmode=None)
+                    if hasattr(patch, 'linereader'):
+                        # Mercurial 1.3
+                        patch.internalpatch(fp, ui, 1, repo.root, eolmode=None)
+                    else:
+                        # Mercurial 1.2
+                        patch.internalpatch(fp, ui, 1, repo.root)
                 del fp
 
                 # 3c. apply filtered patch to clean repo (shelve)

------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to