Mercurial > hg
changeset 17884:0188ddfa844e stable
merge with i18n
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 30 Oct 2012 16:46:52 -0500 |
parents | 36ed69d4593d (diff) a9a971671e12 (current diff) |
children | 9a2cf955db84 89fe4b58add0 |
files | |
diffstat | 23 files changed, 277 insertions(+), 64 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py Tue Oct 23 11:40:48 2012 -0200 +++ b/hgext/largefiles/lfutil.py Tue Oct 30 16:46:52 2012 -0500 @@ -215,7 +215,7 @@ return True def copytostore(repo, rev, file, uploaded=False): - hash = readstandin(repo, file) + hash = readstandin(repo, file, rev) if instore(repo, hash): return copytostoreabsolute(repo, repo.wjoin(file), hash) @@ -234,7 +234,7 @@ util.makedirs(os.path.dirname(storepath(repo, hash))) if inusercache(repo.ui, hash): link(usercachepath(repo.ui, hash), storepath(repo, hash)) - else: + elif not getattr(repo, "_isconverting", False): dst = util.atomictempfile(storepath(repo, hash), createmode=repo.store.createmode) for chunk in util.filechunkiter(open(file, 'rb')):
--- a/hgext/largefiles/overrides.py Tue Oct 23 11:40:48 2012 -0200 +++ b/hgext/largefiles/overrides.py Tue Oct 30 16:46:52 2012 -0500 @@ -1113,3 +1113,11 @@ result = orig(ui, repo, file1, *pats, **opts) return result return lfcommands.catlfile(repo, file1, ctx.rev(), opts.get('output')) + +def mercurialsinkbefore(orig, sink): + sink.repo._isconverting = True + orig(sink) + +def mercurialsinkafter(orig, sink): + sink.repo._isconverting = False + orig(sink)
--- a/hgext/largefiles/uisetup.py Tue Oct 23 11:40:48 2012 -0200 +++ b/hgext/largefiles/uisetup.py Tue Oct 30 16:46:52 2012 -0500 @@ -168,3 +168,10 @@ if name == 'transplant': extensions.wrapcommand(getattr(module, 'cmdtable'), 'transplant', overrides.overridetransplant) + if name == 'convert': + convcmd = getattr(module, 'convcmd') + hgsink = getattr(convcmd, 'mercurial_sink') + extensions.wrapfunction(hgsink, 'before', + overrides.mercurialsinkbefore) + extensions.wrapfunction(hgsink, 'after', + overrides.mercurialsinkafter)
--- a/hgext/patchbomb.py Tue Oct 23 11:40:48 2012 -0200 +++ b/hgext/patchbomb.py Tue Oct 30 16:46:52 2012 -0500 @@ -199,7 +199,7 @@ Finally, the patch itself, as generated by :hg:`export`. - With the -d/--diffstat or -c/--confirm options, you will be presented + With the -d/--diffstat or --confirm options, you will be presented with a final summary of all messages and asked for confirmation before the messages are sent. @@ -496,8 +496,6 @@ if not parent.endswith('>'): parent += '>' - first = True - sender_addr = email.Utils.parseaddr(sender)[1] sender = mail.addressencode(ui, sender, _charsets, opts.get('test')) sendmail = None @@ -509,9 +507,8 @@ if parent: m['In-Reply-To'] = parent m['References'] = parent - if first: + if not parent or 'X-Mercurial-Node' not in m: parent = m['Message-Id'] - first = False m['User-Agent'] = 'Mercurial-patchbomb/%s' % util.version() m['Date'] = email.Utils.formatdate(start_time[0], localtime=True)
--- a/hgext/transplant.py Tue Oct 23 11:40:48 2012 -0200 +++ b/hgext/transplant.py Tue Oct 30 16:46:52 2012 -0500 @@ -605,7 +605,7 @@ sourcerepo = opts.get('source') if sourcerepo: - peer = hg.peer(ui, opts, ui.expandpath(sourcerepo)) + peer = hg.peer(repo, opts, ui.expandpath(sourcerepo)) branches = map(peer.lookup, opts.get('branch', ())) source, csets, cleanupfn = bundlerepo.getremotechanges(ui, repo, peer, onlyheads=branches, force=True)
--- a/mercurial/bookmarks.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/bookmarks.py Tue Oct 30 16:46:52 2012 -0500 @@ -256,7 +256,7 @@ elif repo.obsstore: # We only need this complicated logic if there is obsolescence # XXX will probably deserve an optimised revset. - + nm = repo.changelog.nodemap validdests = set([old]) plen = -1 # compute the whole set of successors or descendants @@ -268,7 +268,8 @@ # obsolescence marker does not apply to public changeset succs.update(obsolete.allsuccessors(repo.obsstore, [c.node()])) - validdests = set(repo.set('%ln::', succs)) + known = (n for n in succs if n in nm) + validdests = set(repo.set('%ln::', known)) validdests.remove(old) return new in validdests else:
--- a/mercurial/cmdutil.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/cmdutil.py Tue Oct 30 16:46:52 2012 -0500 @@ -1611,6 +1611,10 @@ # See if we got a message from -m or -l, if not, open the editor # with the message of the changeset to amend message = logmessage(ui, opts) + # ensure logfile does not conflict with later enforcement of the + # message. potential logfile content has been processed by + # `logmessage` anyway. + opts.pop('logfile') # First, do a regular commit to record all changes in the working # directory (if there are any) ui.callhooks = False
--- a/mercurial/commands.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/commands.py Tue Oct 30 16:46:52 2012 -0500 @@ -3538,7 +3538,7 @@ if source: source, branches = hg.parseurl(ui.expandpath(source)) - peer = hg.peer(ui, opts, source) + peer = hg.peer(repo or ui, opts, source) # only pass ui when no repo repo = peer.local() revs, checkout = hg.addbranchrevs(repo, peer, branches, None)
--- a/mercurial/dirstate.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/dirstate.py Tue Oct 30 16:46:52 2012 -0500 @@ -673,7 +673,7 @@ try: entries = listdir(join(nd), stat=True, skip=skip) except OSError, inst: - if inst.errno == errno.EACCES: + if inst.errno in (errno.EACCES, errno.ENOENT): fwarn(nd, inst.strerror) continue raise
--- a/mercurial/hg.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/hg.py Tue Oct 30 16:46:52 2012 -0500 @@ -348,12 +348,13 @@ # we need to re-init the repo after manually copying the data # into it - destpeer = peer(ui, peeropts, dest) + destpeer = peer(srcrepo, peeropts, dest) srcrepo.hook('outgoing', source='clone', node=node.hex(node.nullid)) else: try: - destpeer = peer(ui, peeropts, dest, create=True) + destpeer = peer(srcrepo or ui, peeropts, dest, create=True) + # only pass ui when no srcrepo except OSError, inst: if inst.errno == errno.EEXIST: dircleanup.close() @@ -409,16 +410,32 @@ if update: if update is not True: checkout = srcpeer.lookup(update) - for test in (checkout, '@', 'default', 'tip'): - if test is None: - continue + uprev = None + status = None + if checkout is not None: + try: + uprev = destrepo.lookup(checkout) + except error.RepoLookupError: + pass + if uprev is None: try: - uprev = destrepo.lookup(test) - break - except error.RepoLookupError: - continue - bn = destrepo[uprev].branch() - destrepo.ui.status(_("updating to branch %s\n") % bn) + uprev = destrepo._bookmarks['@'] + update = '@' + bn = destrepo[uprev].branch() + if bn == 'default': + status = _("updating to bookmark @\n") + else: + status = _("updating to bookmark @ on branch %s\n" + % bn) + except KeyError: + try: + uprev = destrepo.branchtip('default') + except error.RepoLookupError: + uprev = destrepo.lookup('tip') + if not status: + bn = destrepo[uprev].branch() + status = _("updating to branch %s\n") % bn + destrepo.ui.status(status) _update(destrepo, uprev) if update in destrepo._bookmarks: bookmarks.setcurrent(destrepo, update)
--- a/mercurial/localrepo.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/localrepo.py Tue Oct 30 16:46:52 2012 -0500 @@ -1797,7 +1797,7 @@ phases.advanceboundary(self, phases.public, subset) if obsolete._enabled: - self.ui.debug('fetching remote obsolete markers') + self.ui.debug('fetching remote obsolete markers\n') remoteobs = remote.listkeys('obsolete') if 'dump0' in remoteobs: if tr is None: @@ -1880,11 +1880,11 @@ for node in outgoing.missingheads: ctx = self[node] if ctx.obsolete(): - raise util.Abort(_(mso) % ctx) + raise util.Abort(mso % ctx) elif ctx.unstable(): - raise util.Abort(_(msu) % ctx) + raise util.Abort(msu % ctx) elif ctx.bumped(): - raise util.Abort(_(msb) % ctx) + raise util.Abort(msb % ctx) discovery.checkheads(self, remote, outgoing, remoteheads, newbranch, bool(inc))
--- a/mercurial/subrepo.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/subrepo.py Tue Oct 30 16:46:52 2012 -0500 @@ -395,7 +395,11 @@ if not os.path.exists(os.path.join(root, '.hg')): create = True util.makedirs(root) - self._repo = hg.repository(r.ui, root, create=create) + self._repo = hg.repository(r.baseui, root, create=create) + for s, k in [('ui', 'commitsubrepos')]: + v = r.ui.config(s, k) + if v: + self._repo.ui.setconfig(s, k, v) self._initrepo(r, state[0], create) def _initrepo(self, parentrepo, source, create): @@ -497,13 +501,13 @@ if revision not in self._repo: self._repo._subsource = source srcurl = _abssource(self._repo) - other = hg.peer(self._repo.ui, {}, srcurl) + other = hg.peer(self._repo, {}, srcurl) if len(self._repo) == 0: self._repo.ui.status(_('cloning subrepo %s from %s\n') % (subrelpath(self), srcurl)) parentrepo = self._repo._subparent shutil.rmtree(self._repo.path) - other, cloned = hg.clone(self._repo._subparent.ui, {}, + other, cloned = hg.clone(self._repo._subparent.baseui, {}, other, self._repo.root, update=False) self._repo = cloned.local() @@ -562,7 +566,7 @@ dsturl = _abssource(self._repo, True) self._repo.ui.status(_('pushing subrepo %s to %s\n') % (subrelpath(self), dsturl)) - other = hg.peer(self._repo.ui, {'ssh': ssh}, dsturl) + other = hg.peer(self._repo, {'ssh': ssh}, dsturl) return self._repo.push(other, force, newbranch=newbranch) def outgoing(self, ui, dest, opts):
--- a/mercurial/verify.py Tue Oct 23 11:40:48 2012 -0200 +++ b/mercurial/verify.py Tue Oct 30 16:46:52 2012 -0500 @@ -17,6 +17,13 @@ finally: lock.release() +def _normpath(f): + # under hg < 2.4, convert didn't sanitize paths properly, so a + # converted repo may contain repeated slashes + while '//' in f: + f = f.replace('//', '/') + return f + def _verify(repo): mflinkrevs = {} filelinkrevs = {} @@ -135,7 +142,7 @@ mflinkrevs.setdefault(changes[0], []).append(i) refersmf = True for f in changes[3]: - filelinkrevs.setdefault(f, []).append(i) + filelinkrevs.setdefault(_normpath(f), []).append(i) except Exception, inst: refersmf = True exc(i, _("unpacking changeset %s") % short(n), inst) @@ -162,7 +169,7 @@ if not f: err(lr, _("file without name in manifest")) elif f != "/dev/null": - filenodes.setdefault(f, {}).setdefault(fn, lr) + filenodes.setdefault(_normpath(f), {}).setdefault(fn, lr) except Exception, inst: exc(lr, _("reading manifest delta %s") % short(n), inst) ui.progress(_('checking'), None) @@ -209,7 +216,7 @@ if not f: err(None, _("cannot decode filename '%s'") % f2) elif size > 0 or not revlogv1: - storefiles.add(f) + storefiles.add(_normpath(f)) files = sorted(set(filenodes) | set(filelinkrevs)) total = len(files)
--- a/tests/test-bookmarks-pushpull.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-bookmarks-pushpull.t Tue Oct 30 16:46:52 2012 -0500 @@ -1,6 +1,8 @@ $ "$TESTDIR/hghave" serve || exit 80 $ cat << EOF >> $HGRCPATH + > [ui] + > logtemplate={rev}:{node|short} {desc|firstline} > [phases] > publish=False > [extensions] @@ -197,6 +199,22 @@ $ hg ci -Am4 adding f2 created new head + $ echo c5 > f2 + $ hg ci -Am5 + $ hg log -G + @ 5:c922c0139ca0 5 + | + o 4:4efff6d98829 4 + | + | o 3:f6fc62dde3c0 3 + |/ + | o 2:0d2164f0ce0d 1 + |/ + | o 1:9b140be10808 2 + |/ + o 0:4e3505fd9583 test + + $ hg book -f Y $ cat <<EOF > ../a/.hg/hgrc @@ -211,7 +229,7 @@ $ hg push http://localhost:$HGPORT2/ pushing to http://localhost:$HGPORT2/ searching for changes - abort: push creates new remote head 4efff6d98829! + abort: push creates new remote head c922c0139ca0! (did you forget to merge? use push -f to force) [255] $ hg -R ../a book @@ -227,7 +245,7 @@ $ hg push http://localhost:$HGPORT2/ pushing to http://localhost:$HGPORT2/ searching for changes - abort: push creates new remote head 4efff6d98829! + abort: push creates new remote head c922c0139ca0! (did you forget to merge? use push -f to force) [255] $ hg -R ../a book @@ -241,20 +259,23 @@ $ hg id --debug -r 3 f6fc62dde3c0771e29704af56ba4d8af77abcc2f $ hg id --debug -r 4 - 4efff6d98829d9c824c621afd6e3f01865f5439f tip Y - $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f 4efff6d98829d9c824c621afd6e3f01865f5439f + 4efff6d98829d9c824c621afd6e3f01865f5439f + $ hg id --debug -r 5 + c922c0139ca03858f655e4a2af4dd02796a63969 tip Y + $ hg debugobsolete f6fc62dde3c0771e29704af56ba4d8af77abcc2f cccccccccccccccccccccccccccccccccccccccc + $ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc 4efff6d98829d9c824c621afd6e3f01865f5439f $ hg push http://localhost:$HGPORT2/ pushing to http://localhost:$HGPORT2/ searching for changes remote: adding changesets remote: adding manifests remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files (+1 heads) + remote: added 2 changesets with 2 changes to 1 files (+1 heads) updating bookmark Y $ hg -R ../a book @ 1:0d2164f0ce0d * X 1:0d2164f0ce0d - Y 4:4efff6d98829 + Y 5:c922c0139ca0 Z 1:0d2164f0ce0d hgweb @@ -278,7 +299,7 @@ @ 9b140be1080824d768c5a4691a564088eede71f9 foo 0000000000000000000000000000000000000000 foobar 9b140be1080824d768c5a4691a564088eede71f9 - Y 4efff6d98829d9c824c621afd6e3f01865f5439f + Y c922c0139ca03858f655e4a2af4dd02796a63969 X 9b140be1080824d768c5a4691a564088eede71f9 Z 0d2164f0ce0d8f1d6f94351eba04b794909be66c $ hg out -B http://localhost:$HGPORT/ @@ -313,13 +334,13 @@ adding changesets adding manifests adding file changes - added 4 changesets with 4 changes to 3 files (+2 heads) - updating to branch default + added 5 changesets with 5 changes to 3 files (+2 heads) + updating to bookmark @ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R cloned-bookmarks bookmarks - @ 1:9b140be10808 + * @ 1:9b140be10808 X 1:9b140be10808 - Y 3:4efff6d98829 + Y 4:c922c0139ca0 Z 2:0d2164f0ce0d foo -1:000000000000 foobar 1:9b140be10808 @@ -333,8 +354,8 @@ adding changesets adding manifests adding file changes - added 4 changesets with 4 changes to 3 files (+2 heads) - updating to branch default + added 5 changesets with 5 changes to 3 files (+2 heads) + updating to bookmark @ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd addmarks $ echo foo > foo @@ -356,6 +377,7 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + updating bookmark @ failed! exporting bookmark add-foo $ cd ..
--- a/tests/test-bookmarks.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-bookmarks.t Tue Oct 30 16:46:52 2012 -0500 @@ -363,10 +363,10 @@ a@ 2:db815d6d32e6 x y 2:db815d6d32e6 $ hg clone . cloned-bookmarks - updating to branch default + updating to bookmark @ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R cloned-bookmarks bookmarks - @ 2:db815d6d32e6 + * @ 2:db815d6d32e6 X2 1:925d80f479bb Y 2:db815d6d32e6 Z 2:db815d6d32e6 @@ -381,10 +381,10 @@ adding manifests adding file changes added 3 changesets with 3 changes to 3 files (+1 heads) - updating to branch default + updating to bookmark @ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R cloned-bookmarks-pull bookmarks - @ 2:db815d6d32e6 + * @ 2:db815d6d32e6 X2 1:925d80f479bb Y 2:db815d6d32e6 Z 2:db815d6d32e6 @@ -394,6 +394,22 @@ $ hg bookmark -d @ $ hg bookmark -d a@ +test clone with a bookmark named "default" (issue3677) + + $ hg bookmark -r 1 -f -i default + $ hg clone . cloned-bookmark-default + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg -R cloned-bookmark-default bookmarks + X2 1:925d80f479bb + Y 2:db815d6d32e6 + Z 2:db815d6d32e6 + default 1:925d80f479bb + x y 2:db815d6d32e6 + $ hg -R cloned-bookmark-default parents -q + 2:db815d6d32e6 + $ hg bookmark -d default + test clone with a specific revision $ hg clone -r 925d80 . cloned-bookmarks-rev
--- a/tests/test-clone.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-clone.t Tue Oct 30 16:46:52 2012 -0500 @@ -318,8 +318,43 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: hacked default +Test clone with a branch named "@" (issue3677) - $ rm -r ua + $ hg -R ua branch @ + marked working directory as branch @ + (branches are permanent and global, did you want a bookmark?) + $ hg -R ua commit -m 'created branch @' + $ hg clone ua atbranch + updating to branch default + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg -R atbranch heads + changeset: 16:798b6d97153e + branch: @ + tag: tip + parent: 12:f21241060d6a + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: created branch @ + + changeset: 15:0aae7cf88f0d + branch: stable + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: another change for branch stable + + changeset: 12:f21241060d6a + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: hacked default + + $ hg -R atbranch parents + changeset: 12:f21241060d6a + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: hacked default + + + $ rm -r ua atbranch Testing #<branch>: @@ -472,10 +507,21 @@ $ cd a $ hg bookmark -r a7949464abda @ # branch point of stable from default $ hg clone . ../i - updating to branch default + updating to bookmark @ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg id -i ../i a7949464abda + $ rm -r ../i + + $ hg bookmark -f -r stable @ + $ hg bookmarks + @ 15:0aae7cf88f0d + $ hg clone . ../i + updating to bookmark @ on branch stable + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg id -i ../i + 0aae7cf88f0d + $ cd "$TESTTMP" Testing failures:
--- a/tests/test-commit-amend.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-commit-amend.t Tue Oct 30 16:46:52 2012 -0500 @@ -65,9 +65,11 @@ saved backup bundle to $TESTTMP/.hg/strip-backup/43f1ba15f28a-amend-backup.hg (glob) Remove file that was added in amended commit: +(and test logfile option) $ hg rm b - $ hg ci --amend -m 'amend base1 remove new file' + $ echo 'amend base1 remove new file' > ../logfile + $ hg ci --amend -l ../logfile saved backup bundle to $TESTTMP/.hg/strip-backup/b8e3cb2b3882-amend-backup.hg (glob) $ hg cat b
--- a/tests/test-convert-filemap.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-convert-filemap.t Tue Oct 30 16:46:52 2012 -0500 @@ -226,10 +226,13 @@ 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo $ hg --cwd foo-copied.repo debugrename copied copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd + +ensure that the filemap contains duplicated slashes (issue3612) + $ cat > renames.fmap <<EOF > include dir > exclude dir/file2 - > rename dir dir2//../dir2/ + > rename dir dir2//dir3 > include foo > include copied > rename foo foo2/ @@ -255,12 +258,19 @@ | o 1 "1: add bar quux; copy foo to copied" files: copied2 | - o 0 "0: add foo baz dir/" files: dir2/file dir2/subdir/file3 foo2 + o 0 "0: add foo baz dir/" files: dir2/dir3/file dir2/dir3/subdir/file3 foo2 + $ hg -R renames.repo verify + checking changesets + checking manifests + crosschecking files in changesets and manifests + checking files + 4 files, 5 changesets, 7 total revisions + $ hg -R renames.repo manifest --debug d43feacba7a4f1f2080dde4a4b985bd8a0236d46 644 copied2 - 3e20847584beff41d7cd16136b7331ab3d754be0 644 dir2/file - 5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir2/subdir/file3 + 3e20847584beff41d7cd16136b7331ab3d754be0 644 dir2/dir3/file + 5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir2/dir3/subdir/file3 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo2 $ hg --cwd renames.repo debugrename copied2 copied2 renamed from foo2:2ed2a3912a0b24502043eae84ee4b279c18b90dd
--- a/tests/test-hardlinks.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-hardlinks.t Tue Oct 30 16:46:52 2012 -0500 @@ -197,7 +197,6 @@ 2 r4/.hg/00changelog.i 2 r4/.hg/branch 2 r4/.hg/cache/branchheads - 2 r4/.hg/cache/tags 2 r4/.hg/dirstate 2 r4/.hg/hgrc 2 r4/.hg/last-message.txt @@ -228,7 +227,6 @@ 2 r4/.hg/00changelog.i 1 r4/.hg/branch 2 r4/.hg/cache/branchheads - 2 r4/.hg/cache/tags 1 r4/.hg/dirstate 2 r4/.hg/hgrc 2 r4/.hg/last-message.txt
--- a/tests/test-lfconvert.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-lfconvert.t Tue Oct 30 16:46:52 2012 -0500 @@ -6,6 +6,7 @@ > share = > graphlog = > mq = + > convert = > [largefiles] > minsize = 0.5 > patterns = **.other @@ -274,11 +275,70 @@ $ cd .. +Clearing the usercache ensures that commitctx doesn't try to cache largefiles +from the working dir on a convert. + $ rm "${USERCACHE}"/* + $ hg convert largefiles-repo + assuming destination largefiles-repo-hg + initializing destination largefiles-repo-hg repository + scanning source... + sorting... + converting... + 6 add large, normal1 + 5 add sub/* + 4 rename sub/ to stuff/ + 3 add normal3, modify sub/* + 2 remove large, normal3 + 1 merge + 0 add anotherlarge (should be a largefile) + + $ hg -R largefiles-repo-hg glog --template "{rev}:{node|short} {desc|firstline}\n" + o 6:17126745edfd add anotherlarge (should be a largefile) + | + o 5:9cc5aa7204f0 merge + |\ + | o 4:a5a02de7a8e4 remove large, normal3 + | | + | o 3:55759520c76f add normal3, modify sub/* + | | + o | 2:261ad3f3f037 rename sub/ to stuff/ + |/ + o 1:334e5237836d add sub/* + | + o 0:d4892ec57ce2 add large, normal1 + +Verify will fail (for now) if the usercache is purged before converting, since +largefiles are not cached in the converted repo's local store by the conversion +process. + $ hg -R largefiles-repo-hg verify --large --lfa + checking changesets + checking manifests + crosschecking files in changesets and manifests + checking files + 8 files, 7 changesets, 12 total revisions + searching 7 changesets for largefiles + changeset 0:d4892ec57ce2: large missing + (looked for hash 2e000fa7e85759c7f4c254d4d9c33ef481e459a7) + changeset 1:334e5237836d: sub/maybelarge.dat missing + (looked for hash 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c) + changeset 2:261ad3f3f037: stuff/maybelarge.dat missing + (looked for hash 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c) + changeset 3:55759520c76f: sub/maybelarge.dat missing + (looked for hash 76236b6a2c6102826c61af4297dd738fb3b1de38) + changeset 5:9cc5aa7204f0: stuff/maybelarge.dat missing + (looked for hash 76236b6a2c6102826c61af4297dd738fb3b1de38) + changeset 6:17126745edfd: anotherlarge missing + (looked for hash 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3) + verified existence of 6 revisions of 4 largefiles + [1] + $ hg -R largefiles-repo-hg showconfig paths + + Avoid a traceback if a largefile isn't available (issue3519) Ensure the largefile can be cached in the source if necessary $ hg clone -U largefiles-repo issue3519 - $ rm "${USERCACHE}"/* + $ rm -f "${USERCACHE}"/* $ hg lfconvert --to-normal issue3519 normalized3519 initializing destination normalized3519
--- a/tests/test-patchbomb.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-patchbomb.t Tue Oct 30 16:46:52 2012 -0500 @@ -1663,8 +1663,8 @@ Subject: [PATCH 2 of 2] b X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9 Message-Id: <97d72e5f12c7e84f8506.61@*> (glob) - In-Reply-To: <8580ff50825a50c8f716.60@*> (glob) - References: <8580ff50825a50c8f716.60@*> (glob) + In-Reply-To: <baz> + References: <baz> User-Agent: Mercurial-patchbomb/* (glob) Date: Thu, 01 Jan 1970 00:01:01 +0000 From: quux
--- a/tests/test-remove.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-remove.t Tue Oct 30 16:46:52 2012 -0500 @@ -275,7 +275,13 @@ $ hg add d1/a $ rm d1/a $ hg rm --after d1 - removing d1/a + removing d1/a (glob) +#if windows + $ hg rm --after nosuch + nosuch: * (glob) + [1] +#else $ hg rm --after nosuch nosuch: No such file or directory [1] +#endif
--- a/tests/test-revset.t Tue Oct 23 11:40:48 2012 -0200 +++ b/tests/test-revset.t Tue Oct 30 16:46:52 2012 -0500 @@ -750,6 +750,14 @@ $ log 'min(1 or 2) and not 1' $ log 'last(1 or 2, 1) and not 2' +test revsets started with 40-chars hash (issue3669) + + $ ISSUE3669_TIP=`hg tip --template '{node}'` + $ hg log -r "${ISSUE3669_TIP}" --template '{rev}\n' + 9 + $ hg log -r "${ISSUE3669_TIP}^" --template '{rev}\n' + 8 + tests for 'remote()' predicate: #. (csets in remote) (id) (remote) 1. less than local current branch "default"