--- a/contrib/mercurial.spec Sat Aug 14 03:28:45 2010 +0200
+++ b/contrib/mercurial.spec Sat Aug 14 03:30:35 2010 +0200
@@ -17,7 +17,7 @@
# python-devel provides an adequate python-dev. The merge tool is a
# run-time dependency.
#
-BuildRequires: python >= 2.4, python-devel, make, gcc, python-docutils >= 0.5
+BuildRequires: python >= 2.4, python-devel, make, gcc, python-docutils >= 0.5, gettext
Provides: hg = %{version}-%{release}
Requires: python >= 2.4
# The hgk extension uses the wish tcl interpreter, but we don't enforce it
--- a/hgext/rebase.py Sat Aug 14 03:28:45 2010 +0200
+++ b/hgext/rebase.py Sat Aug 14 03:30:35 2010 +0200
@@ -110,7 +110,7 @@
raise util.Abort(
_('abort and continue do not allow specifying revisions'))
- (originalwd, target, state, collapsef, keepf,
+ (originalwd, target, state, skipped, collapsef, keepf,
keepbranchesf, external) = restorestatus(repo)
if abortf:
return abort(repo, originalwd, target, state)
@@ -419,8 +419,18 @@
else:
oldrev, newrev = l.split(':')
state[repo[oldrev].rev()] = repo[newrev].rev()
+ skipped = set()
+ # recompute the set of skipped revs
+ if not collapse:
+ seen = set([target])
+ for old, new in sorted(state.items()):
+ if new != nullrev and new in seen:
+ skipped.add(old)
+ seen.add(new)
+ repo.ui.debug('computed skipped revs: %s\n' % skipped)
repo.ui.debug('rebase status resumed\n')
- return originalwd, target, state, collapse, keep, keepbranches, external
+ return (originalwd, target, state, skipped,
+ collapse, keep, keepbranches, external)
except IOError, err:
if err.errno != errno.ENOENT:
raise
--- a/mercurial/url.py Sat Aug 14 03:28:45 2010 +0200
+++ b/mercurial/url.py Sat Aug 14 03:30:35 2010 +0200
@@ -570,6 +570,25 @@
return
raise
+class httpbasicauthhandler(urllib2.HTTPBasicAuthHandler):
+ def __init__(self, *args, **kwargs):
+ urllib2.HTTPBasicAuthHandler.__init__(self, *args, **kwargs)
+ self.retried_req = None
+
+ def reset_retry_count(self):
+ # Python 2.6.5 will call this on 401 or 407 errors and thus loop
+ # forever. We disable reset_retry_count completely and reset in
+ # http_error_auth_reqed instead.
+ pass
+
+ def http_error_auth_reqed(self, auth_header, host, req, headers):
+ # Reset the retry counter once for each request.
+ if req is not self.retried_req:
+ self.retried_req = req
+ self.retried = 0
+ return urllib2.HTTPBasicAuthHandler.http_error_auth_reqed(
+ self, auth_header, host, req, headers)
+
def getauthinfo(path):
scheme, netloc, urlpath, query, frag = urlparse.urlsplit(path)
if not urlpath:
@@ -615,7 +634,7 @@
ui.debug('http auth: user %s, password %s\n' %
(user, passwd and '*' * len(passwd) or 'not set'))
- handlers.extend((urllib2.HTTPBasicAuthHandler(passmgr),
+ handlers.extend((httpbasicauthhandler(passmgr),
httpdigestauthhandler(passmgr)))
handlers.extend([h(ui, passmgr) for h in handlerfuncs])
opener = urllib2.build_opener(*handlers)
--- a/tests/test-rebase-mq-skip Sat Aug 14 03:28:45 2010 +0200
+++ b/tests/test-rebase-mq-skip Sat Aug 14 03:30:35 2010 +0200
@@ -44,3 +44,33 @@
hg up -C qtip
hg rebase | hidebackup
hg glog --template '{rev} {desc} tags: {tags}\n'
+
+echo
+echo '% Now with --continue'
+cd ..
+hg init b
+cd b
+hg qinit -c # This must work even with a managed mq queue
+
+for i in r0 r1 r2 r3 r4 r5 r6;
+do
+ echo $i > $i
+ hg ci -Am $i
+done
+hg qimport -r 1:tip
+hg up 0
+for i in r1 r3 r7 r8;
+do
+ echo $i > $i
+ hg ci -Am branch2-$i
+done
+echo somethingelse > r4
+hg ci -Am branch2-r4
+echo r6 > r6
+hg ci -Am branch2-r6
+
+hg up qtip
+HGMERGE=internal:fail hg rebase | hidebackup
+HGMERGE=internal:local hg resolve --all
+hg rebase --continue | hidebackup
+hg glog --template '{rev} {desc} tags: {tags}\n'
--- a/tests/test-rebase-mq-skip.out Sat Aug 14 03:28:45 2010 +0200
+++ b/tests/test-rebase-mq-skip.out Sat Aug 14 03:30:35 2010 +0200
@@ -15,3 +15,43 @@
|
o 0 C1 tags:
+
+% Now with --continue
+adding r0
+adding r1
+adding r2
+adding r3
+adding r4
+adding r5
+adding r6
+0 files updated, 0 files merged, 6 files removed, 0 files unresolved
+adding r1
+created new head
+adding r3
+adding r7
+adding r8
+adding r4
+adding r6
+3 files updated, 0 files merged, 2 files removed, 0 files unresolved
+abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
+saved backup bundle to
+@ 9 r5 tags: 5.diff qtip tip
+|
+o 8 r4 tags: 4.diff
+|
+o 7 r2 tags: 2.diff qbase
+|
+o 6 branch2-r6 tags: qparent
+|
+o 5 branch2-r4 tags:
+|
+o 4 branch2-r8 tags:
+|
+o 3 branch2-r7 tags:
+|
+o 2 branch2-r3 tags:
+|
+o 1 branch2-r1 tags:
+|
+o 0 r0 tags:
+