changeset 17270:32246faba53a stable

largefiles: fix a traceback introduced with recent peer changes Changeset 1ac628cd7113 broke 'outgoing --large' ... File "hgext\largefiles\lfutil.py", line 56, in findoutgoing remote.local(), force=force) File "mercurial\discovery.py", line 31, in findcommonincoming if not remote.capable('getbundle'): AttributeError: 'lfilesrepo' object has no attribute 'capable' This restores the previous functionality, though I'm not sure if there's a better way to do this- that changeset introduces a hunk in debugdiscovery that does this: if not util.safehasattr(remote, 'branches'): # enable in-client legacy support remote = localrepo.locallegacypeer(remote.local()) Is there a legacy support issue here too?
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 20 Jul 2012 23:50:52 -0400
parents acfab0754584
children a09cc6aeed4a
files hgext/largefiles/lfutil.py tests/test-largefiles.t
diffstat 2 files changed, 31 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Fri Jul 20 19:14:41 2012 -0400
+++ b/hgext/largefiles/lfutil.py	Fri Jul 20 23:50:52 2012 -0400
@@ -53,7 +53,7 @@
 def findoutgoing(repo, remote, force):
     from mercurial import discovery
     common, _anyinc, _heads = discovery.findcommonincoming(repo,
-        remote, force=force)
+        remote.peer(), force=force)
     return repo.changelog.findmissing(common)
 
 # -- Private worker functions ------------------------------------------
--- a/tests/test-largefiles.t	Fri Jul 20 19:14:41 2012 -0400
+++ b/tests/test-largefiles.t	Fri Jul 20 23:50:52 2012 -0400
@@ -545,6 +545,36 @@
   $ hg addremove --config largefiles.patterns=**large --traceback
   adding large as a largefile
 
+Test that outgoing --large works
+  $ hg outgoing --rev 12 --large
+  comparing with $TESTTMP/a (glob)
+  searching for changes
+  changeset:   8:c02fd3b77ec4
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add foo
+  
+  changeset:   9:289dd08c9bbb
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     used to say nothing changed
+  
+  changeset:   10:34f23ac6ac12
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     added
+  
+  changeset:   12:710c1b2f523c
+  parent:      10:34f23ac6ac12
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     removed large
+  
+  searching for changes
+  largefiles to upload:
+  large
+  foo
+  
   $ cd ../a
 
 Clone a largefiles repo.