Changeset e12087422420…
Parent 1f18453ba26a…
by William Zimrin
Changes to 5 files · Browse files at e12087422420 Showing diff from parent 1f18453ba26a Diff from another changeset...
@@ -16,7 +16,7 @@
'''automatically push large repositories in chunks'''
-from mercurial import cmdutil, commands, hg, extensions
+from mercurial import cmdutil, commands, hg, extensions, exchange
from mercurial.i18n import _
max_push_size = 1000
@@ -47,7 +47,13 @@ fci = discovery.findcommonincoming(repo, other, force=force)
outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs, commoninc=fci, force=force)
if not force:
- discovery.checkheads(repo, other, outgoing, fci[2], False)
+ try:
+ discovery.checkheads(repo, other, outgoing, fci[2], False)
+ except TypeError:
+ pushop = exchange.pushoperation(repo, other, newbranch=False)
+ pushop.outgoing = outgoing
+ pushop.remoteheads = fci[2]
+ discovery.checkheads(pushop)
return [True]
except ImportError:
# Mercurial 1.5 and lower
|
@@ -23,7 +23,10 @@ hgt.hg(['commit', '-m', 'add file'])
hgt.hg(['push'], stdout='''pushing to %s
searching for changes
-remote: kiln: successfully pushed one changeset
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 1 changesets with 1 changes to 1 files
''' % hgt.test_url())
hgt.writefile('n2', 'n2')
hgt.hg(['add', 'n2'])
@@ -32,7 +35,10 @@searching for changes
searching for changes
searching for changes
-remote: kiln: successfully pushed one changeset
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 1 changesets with 1 changes to 1 files
''' % hgt.test_url())
for i in range(3, 25):
hgt.writefile('n%d' % i, 'dummy')
@@ -42,15 +48,30 @@searching for changes
searching for changes
searching for changes
-remote: kiln: successfully pushed one changeset
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 1 changesets with 1 changes to 1 files
searching for changes
-remote: kiln: successfully pushed 2 changesets
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 2 changesets with 2 changes to 2 files
searching for changes
-remote: kiln: successfully pushed 4 changesets
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 4 changesets with 4 changes to 4 files
searching for changes
-remote: kiln: successfully pushed 8 changesets
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 8 changesets with 8 changes to 8 files
searching for changes
-remote: kiln: successfully pushed 7 changesets
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 7 changesets with 7 changes to 7 files
''' % hgt.test_url())
hgt.hg(['pull'], stdout='''pulling from %s
searching for changes
|
@@ -16,7 +16,9 @@ hgt.hg(['logout'])
hgt.hg(['pull'], stdin='\n\n', status=-1,
- stderr='abort: http authorization required for %s' % hgt.test_url())
+ stderr='abort: http authorization required for %s' % hgt.test_url(),
+ stdout='''pulling from %s
+''' % hgt.test_url())
hgt.hg(['pull'], auth=True,
stdout='''pulling from %s
@@ -31,4 +33,6 @@hgt.hg(['logout'])
hgt.hg(['pull'], stdin='\n\n', status=-1,
- stderr='abort: http authorization required for %s' % hgt.test_url())
+ stderr='abort: http authorization required for %s' % hgt.test_url(),
+ stdout='''pulling from %s
+''' % hgt.test_url())
|
@@ -24,7 +24,10 @@ hgt.hg(['commit', '-m', 'add file'])
hgt.hg(['push'], stdout='''pushing to %s
searching for changes
-remote: kiln: successfully pushed one changeset
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 1 changesets with 1 changes to 1 files
''' % hgt.test_url())
testbranch = hgt.createtestbranch(token, ixParent)
hgt.hg(['kiln', '-t'], '''The following Kiln targets are available for this repository:
@@ -43,7 +46,10 @@''' % (hgt.test_url(), hgt.test_branch_url()))
hgt.hg(['push'], stdout='''pushing to %s
searching for changes
-remote: kiln: successfully pushed one changeset
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 1 changesets with 1 changes to 1 files
''' % hgt.test_url())
hgt.writefile('n3', 'n3')
hgt.hg(['add', 'n3'])
@@ -66,7 +72,10 @@
hgt.hg(['push', 'TestBranch'], stdout='''pushing to %s
searching for changes
-remote: kiln: successfully pushed 2 changesets
+remote: adding changesets
+remote: adding manifests
+remote: adding file changes
+remote: added 2 changesets with 2 changes to 2 files
''' % hgt.test_branch_url())
os.chdir('..')
hgt.hg(['clone', hgt.test_url(), 'repo2'], log=False,
|
Loading...