summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2011-10-01 20:49:36 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-09-27 13:27:51 +0000
commit921ced43c48c1d170452a7b251b94cc96ec8dd44 (patch)
tree3c4a89176ea67fe4c7bf7b375488361a823c95fa /tests
parent9039c805b0a7e36220101323f82735f08a104b37 (diff)
downloadmercurial-tarball-921ced43c48c1d170452a7b251b94cc96ec8dd44.tar.gz
Imported from /srv/lorry/lorry-area/mercurial-tarball/mercurial-1.9.3.tar.gz.HEADmercurial-1.9.3master
Diffstat (limited to 'tests')
-rw-r--r--tests/blacklists/linux-vfat35
-rw-r--r--tests/bundles/rebase-revset.hgbin1844 -> 0 bytes
-rwxr-xr-xtests/bundles/rename.sh30
-rw-r--r--tests/bundles/renames.hgbin1600 -> 0 bytes
-rw-r--r--tests/bzr-definitions2
-rwxr-xr-xtests/dummyssh6
-rwxr-xr-xtests/get-with-headers.py4
-rw-r--r--tests/heredoctest.py19
-rwxr-xr-xtests/hghave221
-rwxr-xr-xtests/hghave.py308
-rw-r--r--tests/histedit-helpers.sh6
-rw-r--r--tests/missing-comment.hgbin1077 -> 0 bytes
-rw-r--r--tests/notcapable11
-rw-r--r--tests/printenv.py12
-rwxr-xr-xtests/run-tests.py248
-rw-r--r--tests/sitecustomize.py3
-rw-r--r--tests/svn/empty.svndump129
-rwxr-xr-xtests/svn/svndump-empty.sh47
-rw-r--r--tests/svnxml.py51
-rw-r--r--tests/test-1102.t1
-rw-r--r--tests/test-1993.t2
-rw-r--r--tests/test-586.t1
-rw-r--r--tests/test-abort-checkin.t2
-rw-r--r--tests/test-acl.t385
-rw-r--r--tests/test-add.t16
-rw-r--r--tests/test-addremove-similar.t8
-rw-r--r--tests/test-addremove.t10
-rw-r--r--tests/test-alias.t181
-rw-r--r--tests/test-annotate.t69
-rw-r--r--tests/test-archive-symlinks.t8
-rw-r--r--tests/test-archive.t19
-rw-r--r--tests/test-atomictempfile.py11
-rw-r--r--tests/test-audit-path.t40
-rw-r--r--tests/test-backout.t12
-rw-r--r--tests/test-bad-pull.t31
-rw-r--r--tests/test-basic.t2
-rw-r--r--tests/test-bdiff.py14
-rw-r--r--tests/test-bdiff.py.out1
-rw-r--r--tests/test-bheads.t8
-rw-r--r--tests/test-bisect.t71
-rw-r--r--tests/test-bisect2.t362
-rw-r--r--tests/test-bisect3.t232
-rw-r--r--tests/test-bookmarks-current.t43
-rw-r--r--tests/test-bookmarks-merge.t93
-rw-r--r--tests/test-bookmarks-pushpull.t135
-rw-r--r--tests/test-bookmarks-rebase.t3
-rw-r--r--tests/test-bookmarks-strip.t6
-rw-r--r--tests/test-bookmarks.t117
-rw-r--r--tests/test-branch-option.t6
-rw-r--r--tests/test-branch-tag-confict.t3
-rw-r--r--tests/test-branches.t12
-rw-r--r--tests/test-bundle-r.t8
-rw-r--r--tests/test-bundle-type.t1
-rw-r--r--tests/test-bundle-vs-outgoing.t1
-rw-r--r--tests/test-bundle.t76
-rw-r--r--tests/test-casecollision-i18n.t43
-rw-r--r--tests/test-casecollision-merge.t209
-rw-r--r--tests/test-casecollision.t31
-rw-r--r--tests/test-casefolding.t110
-rw-r--r--tests/test-changelog-exec.t6
-rw-r--r--tests/test-check-code-hg.py24
-rw-r--r--tests/test-check-code-hg.t183
-rw-r--r--tests/test-check-code.t30
-rw-r--r--tests/test-check-pyflakes.t12
-rw-r--r--tests/test-children.t2
-rw-r--r--tests/test-churn.t2
-rw-r--r--tests/test-clone-cgi.t2
-rw-r--r--tests/test-clone-failure.t78
-rw-r--r--tests/test-clone-pull-corruption.t6
-rw-r--r--tests/test-clone-r.t38
-rw-r--r--tests/test-clone-update-order.t2
-rw-r--r--tests/test-clone.t118
-rw-r--r--tests/test-command-template.t33
-rw-r--r--tests/test-commandserver.py101
-rw-r--r--tests/test-commandserver.py.out147
-rw-r--r--tests/test-commit-amend.t357
-rw-r--r--tests/test-commit-copy.t16
-rw-r--r--tests/test-commit-multiple.t4
-rw-r--r--tests/test-commit-unresolved.t4
-rw-r--r--tests/test-commit.t36
-rw-r--r--tests/test-committer.t4
-rw-r--r--tests/test-config-case.t3
-rw-r--r--tests/test-conflict.t2
-rw-r--r--tests/test-contrib.t20
-rw-r--r--tests/test-convert-authormap.t6
-rwxr-xr-xtests/test-convert-baz79
-rw-r--r--tests/test-convert-baz.out96
-rw-r--r--tests/test-convert-baz.t163
-rw-r--r--tests/test-convert-bzr-directories.t42
-rw-r--r--tests/test-convert-bzr-ghosts.t6
-rw-r--r--tests/test-convert-bzr-merges.t14
-rw-r--r--tests/test-convert-bzr-treeroot.t2
-rw-r--r--tests/test-convert-bzr.t125
-rw-r--r--tests/test-convert-clonebranches.t4
-rw-r--r--tests/test-convert-cvs-branch.t1
-rw-r--r--tests/test-convert-cvs.t6
-rw-r--r--tests/test-convert-cvsnt-mergepoints.t7
-rw-r--r--tests/test-convert-darcs.t81
-rw-r--r--tests/test-convert-datesort.t2
-rw-r--r--tests/test-convert-filemap.t225
-rw-r--r--tests/test-convert-git.t11
-rw-r--r--tests/test-convert-hg-source.t14
-rw-r--r--tests/test-convert-hg-startrev.t1
-rw-r--r--tests/test-convert-hg-svn.t49
-rwxr-xr-xtests/test-convert-p475
-rwxr-xr-xtests/test-convert-p4-filetypes104
-rw-r--r--tests/test-convert-p4-filetypes.out642
-rw-r--r--tests/test-convert-p4-filetypes.t733
-rw-r--r--tests/test-convert-p4.out88
-rw-r--r--tests/test-convert-p4.t152
-rw-r--r--tests/test-convert-splicemap.t159
-rw-r--r--tests/test-convert-svn-branches.t2
-rw-r--r--tests/test-convert-svn-move.t27
-rw-r--r--tests/test-convert-svn-sink.t428
-rw-r--r--tests/test-convert-svn-source.t62
-rw-r--r--tests/test-convert-tagsbranch-topology.t6
-rw-r--r--tests/test-convert-tla.t2
-rw-r--r--tests/test-convert.t189
-rw-r--r--tests/test-copy-move-merge.t8
-rw-r--r--tests/test-copy.t136
-rw-r--r--tests/test-copy2.t109
-rw-r--r--tests/test-debugbuilddag.t24
-rw-r--r--tests/test-debugbundle.t1
-rw-r--r--tests/test-debugcommands.t25
-rw-r--r--tests/test-debugcomplete.t32
-rw-r--r--tests/test-debugindexdot.t2
-rw-r--r--tests/test-default-push.t4
-rw-r--r--tests/test-diff-binary-file.t3
-rw-r--r--tests/test-diff-change.t11
-rw-r--r--tests/test-diff-color.t21
-rw-r--r--tests/test-diff-hashes.t5
-rw-r--r--tests/test-diff-ignore-whitespace.t56
-rw-r--r--tests/test-diff-newlines.t2
-rw-r--r--tests/test-diff-subdir.t1
-rw-r--r--tests/test-diff-unified.t121
-rw-r--r--tests/test-diff-upgrade.t1
-rw-r--r--tests/test-diffstat.t15
-rw-r--r--tests/test-dirstate.t21
-rw-r--r--tests/test-dispatch.t19
-rw-r--r--tests/test-doctest.py15
-rw-r--r--tests/test-double-merge.t8
-rw-r--r--tests/test-duplicateoptions.py12
-rw-r--r--tests/test-empty-file.t1
-rw-r--r--tests/test-empty.t2
-rw-r--r--tests/test-encode.t2
-rw-r--r--tests/test-encoding-align.t21
-rw-r--r--tests/test-encoding-textwrap.t50
-rw-r--r--tests/test-encoding.t7
-rw-r--r--tests/test-eol-clone.t2
-rw-r--r--tests/test-eol-hook.t3
-rw-r--r--tests/test-eol-tag.t2
-rw-r--r--tests/test-eol.t89
-rw-r--r--tests/test-eolfilename.t2
-rw-r--r--tests/test-excessive-merge.t18
-rw-r--r--tests/test-export.t39
-rw-r--r--tests/test-extdiff.t20
-rw-r--r--tests/test-extension.t198
-rw-r--r--tests/test-extra-filelog-entry.t4
-rw-r--r--tests/test-fetch.t104
-rw-r--r--tests/test-filebranch.t39
-rw-r--r--tests/test-filecache.py95
-rw-r--r--tests/test-filecache.py.out15
-rwxr-xr-xtests/test-filelog (renamed from tests/test-filelog.py)9
-rw-r--r--tests/test-filelog.out (renamed from tests/test-filelog.py.out)0
-rw-r--r--tests/test-flags.t18
-rw-r--r--tests/test-fncache.t12
-rw-r--r--tests/test-gendoc.t8
-rw-r--r--tests/test-getbundle.t1
-rw-r--r--tests/test-git-export.t17
-rw-r--r--tests/test-globalopts.t297
-rw-r--r--tests/test-glog.t743
-rw-r--r--tests/test-gpg.t11
-rw-r--r--tests/test-graft.t535
-rw-r--r--tests/test-grep.t15
-rw-r--r--tests/test-hardlinks.t28
-rw-r--r--tests/test-help.t881
-rw-r--r--tests/test-hgcia.t2
-rw-r--r--tests/test-hgignore.t8
-rw-r--r--tests/test-hgk.t2
-rw-r--r--tests/test-hgrc.t82
-rw-r--r--tests/test-hgweb-commands.t380
-rw-r--r--tests/test-hgweb-descend-empties.t6
-rw-r--r--tests/test-hgweb-diffs.t523
-rw-r--r--tests/test-hgweb-empty.t22
-rw-r--r--tests/test-hgweb-filelog.t45
-rw-r--r--tests/test-hgweb-no-path-info.t2
-rw-r--r--tests/test-hgweb-no-request-uri.t2
-rw-r--r--tests/test-hgweb-non-interactive.t2
-rw-r--r--tests/test-hgweb-raw.t31
-rw-r--r--tests/test-hgweb-removed.t13
-rw-r--r--tests/test-hgweb.t71
-rw-r--r--tests/test-hgwebdir.t402
-rw-r--r--tests/test-hgwebdirsym.t20
-rw-r--r--tests/test-highlight.t92
-rw-r--r--tests/test-histedit-bookmark-motion.t187
-rw-r--r--tests/test-histedit-commute.t359
-rw-r--r--tests/test-histedit-drop.t107
-rw-r--r--tests/test-histedit-edit.t178
-rw-r--r--tests/test-histedit-fold-non-commute.t147
-rw-r--r--tests/test-histedit-fold.t238
-rw-r--r--tests/test-histedit-no-change.t187
-rw-r--r--tests/test-histedit-non-commute-abort.t131
-rw-r--r--tests/test-histedit-non-commute.t244
-rw-r--r--tests/test-histedit-outgoing.t84
-rw-r--r--tests/test-histedit-revspec.t62
-rw-r--r--tests/test-hook.t299
-rw-r--r--tests/test-http-branchmap.t2
-rw-r--r--tests/test-http-clone-r.t4
-rw-r--r--tests/test-http-proxy.t10
-rw-r--r--tests/test-http.t29
-rw-r--r--tests/test-https.t30
-rw-r--r--tests/test-hup.t24
-rw-r--r--tests/test-i18n.t16
-rw-r--r--tests/test-identify.t11
-rw-r--r--tests/test-impexp-branch.t17
-rw-r--r--tests/test-import-bypass.t29
-rw-r--r--tests/test-import-context.t1
-rw-r--r--tests/test-import-git.t189
-rw-r--r--tests/test-import-merge.t115
-rw-r--r--tests/test-import-unknown.t2
-rw-r--r--tests/test-import.t263
-rw-r--r--tests/test-incoming-outgoing.t11
-rw-r--r--tests/test-inherit-mode.t13
-rw-r--r--tests/test-init.t31
-rw-r--r--tests/test-inotify-dirty-dirstate.t2
-rw-r--r--tests/test-inotify-issue1208.t2
-rw-r--r--tests/test-inotify.t2
-rw-r--r--tests/test-install.t22
-rw-r--r--tests/test-interhg.t6
-rw-r--r--tests/test-issue1089.t5
-rw-r--r--tests/test-issue1306.t1
-rw-r--r--tests/test-issue1502.t4
-rw-r--r--tests/test-issue1802.t73
-rw-r--r--tests/test-issue1877.t1
-rw-r--r--tests/test-issue2137.t2
-rw-r--r--tests/test-issue3084.t110
-rw-r--r--tests/test-issue522.t12
-rw-r--r--tests/test-issue612.t6
-rw-r--r--tests/test-issue619.t1
-rw-r--r--tests/test-issue660.t4
-rw-r--r--tests/test-issue672.t18
-rw-r--r--tests/test-issue842.t1
-rw-r--r--tests/test-journal-exists.t2
-rw-r--r--tests/test-keyword.t124
-rw-r--r--tests/test-known.t1
-rw-r--r--tests/test-largefiles-cache.t125
-rw-r--r--tests/test-largefiles-small-disk.t67
-rw-r--r--tests/test-largefiles.t1447
-rw-r--r--tests/test-lfconvert.t272
-rw-r--r--tests/test-locate.t39
-rw-r--r--tests/test-lock-badness.t2
-rw-r--r--tests/test-log.t221
-rw-r--r--tests/test-mactext.t8
-rw-r--r--tests/test-manifest-merging.t1
-rw-r--r--tests/test-merge-closedheads.t2
-rw-r--r--tests/test-merge-commit.t53
-rw-r--r--tests/test-merge-default.t6
-rw-r--r--tests/test-merge-force.t3
-rw-r--r--tests/test-merge-local.t6
-rw-r--r--tests/test-merge-prompt.t4
-rw-r--r--tests/test-merge-revert2.t2
-rw-r--r--tests/test-merge-symlinks.t3
-rw-r--r--tests/test-merge-tools.t288
-rw-r--r--tests/test-merge-types.t48
-rw-r--r--tests/test-merge1.t14
-rw-r--r--tests/test-merge10.t2
-rw-r--r--tests/test-merge2.t2
-rw-r--r--tests/test-merge4.t5
-rw-r--r--tests/test-merge6.t2
-rw-r--r--tests/test-merge7.t22
-rw-r--r--tests/test-merge8.t2
-rw-r--r--tests/test-merge9.t4
-rw-r--r--tests/test-minirst.py76
-rw-r--r--tests/test-minirst.py.out450
-rw-r--r--tests/test-mq-caches.t12
-rw-r--r--tests/test-mq-guards.t73
-rw-r--r--tests/test-mq-header-from.t2
-rw-r--r--tests/test-mq-merge.t26
-rw-r--r--tests/test-mq-missingfiles.t47
-rw-r--r--tests/test-mq-qclone-http.t10
-rw-r--r--tests/test-mq-qdelete.t3
-rw-r--r--tests/test-mq-qdiff.t4
-rw-r--r--tests/test-mq-qgoto.t1
-rw-r--r--tests/test-mq-qimport-fail-cleanup.t14
-rw-r--r--tests/test-mq-qimport.t73
-rw-r--r--tests/test-mq-qnew.t12
-rw-r--r--tests/test-mq-qpush-exact.t1
-rw-r--r--tests/test-mq-qpush-fail.t274
-rw-r--r--tests/test-mq-qrefresh-interactive.t76
-rw-r--r--tests/test-mq-qrefresh.t21
-rw-r--r--tests/test-mq-qrename.t31
-rw-r--r--tests/test-mq-safety.t49
-rw-r--r--tests/test-mq-strip.t47
-rw-r--r--tests/test-mq-subrepo-svn.t25
-rw-r--r--tests/test-mq-subrepo.t185
-rw-r--r--tests/test-mq-symlinks.t12
-rw-r--r--tests/test-mq.t228
-rw-r--r--tests/test-mv-cp-st-diff.t6
-rw-r--r--tests/test-nested-repo.t9
-rw-r--r--tests/test-newbranch.t8
-rw-r--r--tests/test-newcgi.t2
-rw-r--r--tests/test-newercgi.t2
-rw-r--r--tests/test-notify-changegroup.t143
-rw-r--r--tests/test-notify.t217
-rw-r--r--tests/test-obsolete-changeset-exchange.t55
-rw-r--r--tests/test-obsolete.t508
-rw-r--r--tests/test-oldcgi.t2
-rw-r--r--tests/test-parents.t2
-rw-r--r--tests/test-parse-date.t20
-rw-r--r--tests/test-parseindex.t2
-rw-r--r--tests/test-parseindex2.py21
-rw-r--r--tests/test-patch-offset.t3
-rw-r--r--tests/test-patch.t2
-rw-r--r--tests/test-patchbomb.t1231
-rw-r--r--tests/test-paths.t23
-rw-r--r--tests/test-pending.t4
-rw-r--r--tests/test-permissions.t3
-rw-r--r--tests/test-phases-exchange.t1065
-rw-r--r--tests/test-phases.t479
-rw-r--r--tests/test-profile.t48
-rw-r--r--tests/test-progress.t82
-rw-r--r--tests/test-pull-branch.t5
-rw-r--r--tests/test-pull-http.t22
-rw-r--r--tests/test-pull-permission.t3
-rw-r--r--tests/test-pull-pull-corruption.t19
-rw-r--r--tests/test-pull-pull-corruption2.t44
-rw-r--r--tests/test-pull-r.t3
-rw-r--r--tests/test-pull-update.t1
-rw-r--r--tests/test-pull.t6
-rw-r--r--tests/test-purge.t34
-rw-r--r--tests/test-push-cgi.t4
-rw-r--r--tests/test-push-http.t16
-rw-r--r--tests/test-push-r.t3
-rw-r--r--tests/test-push-validation.t3
-rw-r--r--tests/test-push-warn.t14
-rw-r--r--tests/test-qrecord.t94
-rw-r--r--tests/test-rebase-abort.t66
-rw-r--r--tests/test-rebase-bookmarks.t36
-rw-r--r--tests/test-rebase-cache.t136
-rw-r--r--tests/test-rebase-check-restore.t68
-rw-r--r--tests/test-rebase-collapse.t272
-rw-r--r--tests/test-rebase-conflicts.t34
-rw-r--r--tests/test-rebase-detach.t163
-rw-r--r--tests/test-rebase-interruptions.t114
-rw-r--r--tests/test-rebase-issue-noparam-single-rev.t5
-rw-r--r--tests/test-rebase-mq-skip.t9
-rw-r--r--tests/test-rebase-mq.t68
-rw-r--r--tests/test-rebase-named-branches.t156
-rw-r--r--tests/test-rebase-newancestor.t2
-rw-r--r--tests/test-rebase-parameters.t83
-rw-r--r--tests/test-rebase-pull.t13
-rw-r--r--tests/test-rebase-rename.t1
-rw-r--r--tests/test-rebase-scenario-global.t349
-rw-r--r--tests/test-rebuildstate.t5
-rw-r--r--tests/test-record.t388
-rw-r--r--tests/test-relink.t12
-rw-r--r--tests/test-remove-new.t13
-rw-r--r--tests/test-remove.t32
-rw-r--r--tests/test-rename-after-merge.t1
-rw-r--r--tests/test-rename-dir-merge.t54
-rw-r--r--tests/test-rename-merge1.t56
-rw-r--r--tests/test-rename-merge2.t110
-rw-r--r--tests/test-rename.t98
-rw-r--r--tests/test-repair-strip.t2
-rw-r--r--tests/test-requires.t2
-rw-r--r--tests/test-resolve.t2
-rw-r--r--tests/test-revert-flags.t2
-rw-r--r--tests/test-revert.t16
-rw-r--r--tests/test-revlog-ancestry.py16
-rw-r--r--tests/test-revlog-ancestry.py.out2
-rw-r--r--tests/test-revlog-group-emptyiter.t1
-rw-r--r--tests/test-revlog-packentry.t8
-rw-r--r--tests/test-revset-dirstate-parents.t14
-rw-r--r--tests/test-revset-outgoing.t10
-rw-r--r--tests/test-revset.t402
-rw-r--r--tests/test-rollback.t124
-rw-r--r--tests/test-run-tests.t60
-rw-r--r--tests/test-schemes.t3
-rw-r--r--tests/test-serve.t10
-rw-r--r--tests/test-setdiscovery.t3
-rw-r--r--tests/test-share.t34
-rw-r--r--tests/test-simple-update.t2
-rw-r--r--tests/test-simplemerge.py3
-rw-r--r--tests/test-ssh-clone-r.t14
-rw-r--r--tests/test-ssh.t120
-rw-r--r--tests/test-static-http.t18
-rw-r--r--tests/test-status-color.t16
-rw-r--r--tests/test-status.t65
-rw-r--r--tests/test-strict.t38
-rw-r--r--tests/test-strip-cross.t66
-rw-r--r--tests/test-subrepo-deep-nested-change.t182
-rw-r--r--tests/test-subrepo-git.t79
-rw-r--r--tests/test-subrepo-missing.t20
-rw-r--r--tests/test-subrepo-paths.t30
-rw-r--r--tests/test-subrepo-recursion.t123
-rw-r--r--tests/test-subrepo-relative-path.t20
-rw-r--r--tests/test-subrepo-svn.t346
-rw-r--r--tests/test-subrepo.t314
-rw-r--r--tests/test-symlink-os-yes-fs-no.py7
-rw-r--r--tests/test-symlink-placeholder.t72
-rw-r--r--tests/test-symlinks.t18
-rw-r--r--tests/test-tag.t33
-rw-r--r--tests/test-tags.t6
-rw-r--r--tests/test-template-engine.t2
-rw-r--r--tests/test-transplant.t241
-rw-r--r--tests/test-treediscovery-legacy.t61
-rw-r--r--tests/test-treediscovery.t6
-rw-r--r--tests/test-trusted.py.out16
-rw-r--r--tests/test-unbundlehash.t1
-rw-r--r--tests/test-unrelated-pull.t2
-rw-r--r--tests/test-up-local-change.t24
-rw-r--r--tests/test-update-branches.t46
-rw-r--r--tests/test-update-issue1456.t3
-rw-r--r--tests/test-update-renames.t5
-rw-r--r--tests/test-update-reverse.t4
-rw-r--r--tests/test-url-rev.t14
-rw-r--r--tests/test-url.py15
-rw-r--r--tests/test-verify.t2
-rw-r--r--tests/test-walk.t55
-rw-r--r--tests/test-walkrepo.py11
-rw-r--r--tests/test-win32text.t64
-rw-r--r--tests/test-wireproto.py4
-rw-r--r--tests/test-wireproto.t1
-rwxr-xr-xtests/tinyproxy.py14
424 files changed, 6437 insertions, 24823 deletions
diff --git a/tests/blacklists/linux-vfat b/tests/blacklists/linux-vfat
deleted file mode 100644
index 2812bf0..0000000
--- a/tests/blacklists/linux-vfat
+++ /dev/null
@@ -1,35 +0,0 @@
-# invalid filenames
-test-add.t
-test-init.t
-test-clone.t
-test-contrib.t
-test-hgweb-raw.t
-test-walk.t
-
-# no sockets or fifos
-test-hup.t
-test-inotify-debuginotify.t
-test-inotify-dirty-dirstate.t
-test-inotify-issue1208.t
-test-inotify-issue1371.t
-test-inotify-issue1542.t
-test-inotify-lookup.t
-test-inotify.t
-test-inotify-issue1556.t
-
-# no hardlinks
-test-hardlinks.t
-test-relink.t
-
-# exec bit problems
-test-convert-bzr-114.t
-test-convert-bzr-directories.t
-test-convert-bzr-merges.t
-test-convert-bzr-treeroot.t
-test-convert-darcs.t
-test-merge-tools.t
-
-# debugstate exec bit false positives
-test-dirstate.t
-test-filebranch.t
-test-merge-remove.t
diff --git a/tests/bundles/rebase-revset.hg b/tests/bundles/rebase-revset.hg
deleted file mode 100644
index 2a016a3..0000000
--- a/tests/bundles/rebase-revset.hg
+++ /dev/null
Binary files differ
diff --git a/tests/bundles/rename.sh b/tests/bundles/rename.sh
deleted file mode 100755
index f8eccf8..0000000
--- a/tests/bundles/rename.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-
-# @ 3: 'move2'
-# |
-# o 2: 'move1'
-# |
-# | o 1: 'change'
-# |/
-# o 0: 'add'
-
-hg init copies
-cd copies
-echo a > a
-echo b > b
-echo c > c
-hg ci -Am add
-echo a >> a
-echo b >> b
-echo c >> c
-hg ci -m change
-hg up -qC 0
-hg cp a d
-hg mv b e
-hg mv c f
-hg ci -m move1
-hg mv e g
-hg mv f c
-hg ci -m move2
-hg bundle -a ../renames.hg
-cd ..
diff --git a/tests/bundles/renames.hg b/tests/bundles/renames.hg
deleted file mode 100644
index 977a845..0000000
--- a/tests/bundles/renames.hg
+++ /dev/null
Binary files differ
diff --git a/tests/bzr-definitions b/tests/bzr-definitions
index 5e9895f..2899ada 100644
--- a/tests/bzr-definitions
+++ b/tests/bzr-definitions
@@ -9,7 +9,7 @@ echo 'hgext.graphlog = ' >> $HGRCPATH
glog()
{
- hg glog --template '{rev}@{branch} "{desc|firstline}" files: {files}\n' "$@"
+ hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
}
manifest()
diff --git a/tests/dummyssh b/tests/dummyssh
index 9b1430a..fc498b4 100755
--- a/tests/dummyssh
+++ b/tests/dummyssh
@@ -16,9 +16,5 @@ for i, arg in enumerate(sys.argv[1:]):
log.write(" %d:%s" % (i+1, arg))
log.write("\n")
log.close()
-hgcmd = sys.argv[2]
-if os.name == 'nt':
- # hack to make simple unix single quote quoting work on windows
- hgcmd = hgcmd.replace("'", '"')
-r = os.system(hgcmd)
+r = os.system(sys.argv[2])
sys.exit(bool(r))
diff --git a/tests/get-with-headers.py b/tests/get-with-headers.py
index 6d20dfc..0e2d6f5 100755
--- a/tests/get-with-headers.py
+++ b/tests/get-with-headers.py
@@ -21,14 +21,14 @@ reasons = {'Not modified': 'Not Modified'} # python 2.4
tag = None
def request(host, path, show):
- assert not path.startswith('/'), path
+
global tag
headers = {}
if tag:
headers['If-None-Match'] = tag
conn = httplib.HTTPConnection(host)
- conn.request("GET", '/' + path, None, headers)
+ conn.request("GET", path, None, headers)
response = conn.getresponse()
print response.status, reasons.get(response.reason, response.reason)
for h in [h.lower() for h in show]:
diff --git a/tests/heredoctest.py b/tests/heredoctest.py
deleted file mode 100644
index 7508c18..0000000
--- a/tests/heredoctest.py
+++ /dev/null
@@ -1,19 +0,0 @@
-import sys
-
-globalvars = {}
-localvars = {}
-lines = sys.stdin.readlines()
-while lines:
- l = lines.pop(0)
- if l.startswith('SALT'):
- print l[:-1]
- elif l.startswith('>>> '):
- snippet = l[4:]
- while lines and lines[0].startswith('... '):
- l = lines.pop(0)
- snippet += "\n" + l[4:]
- c = compile(snippet, '<heredoc>', 'single')
- try:
- exec c in globalvars, localvars
- except Exception, inst:
- print repr(inst)
diff --git a/tests/hghave b/tests/hghave
index dad1667..fd6e67c 100755
--- a/tests/hghave
+++ b/tests/hghave
@@ -4,10 +4,227 @@ if all features are there, non-zero otherwise. If a feature name is
prefixed with "no-", the absence of feature is tested.
"""
import optparse
+import os
+import re
import sys
-import hghave
+import tempfile
-checks = hghave.checks
+tempprefix = 'hg-hghave-'
+
+def matchoutput(cmd, regexp, ignorestatus=False):
+ """Return True if cmd executes successfully and its output
+ is matched by the supplied regular expression.
+ """
+ r = re.compile(regexp)
+ fh = os.popen(cmd)
+ s = fh.read()
+ try:
+ ret = fh.close()
+ except IOError:
+ # Happen in Windows test environment
+ ret = 1
+ return (ignorestatus or ret is None) and r.search(s)
+
+def has_baz():
+ return matchoutput('baz --version 2>&1', r'baz Bazaar version')
+
+def has_bzr():
+ try:
+ import bzrlib
+ return bzrlib.__doc__ != None
+ except ImportError:
+ return False
+
+def has_bzr114():
+ try:
+ import bzrlib
+ return (bzrlib.__doc__ != None
+ and bzrlib.version_info[:2] >= (1, 14))
+ except ImportError:
+ return False
+
+def has_cvs():
+ re = r'Concurrent Versions System.*?server'
+ return matchoutput('cvs --version 2>&1', re)
+
+def has_darcs():
+ return matchoutput('darcs --version', r'2\.[2-9]', True)
+
+def has_mtn():
+ return matchoutput('mtn --version', r'monotone', True) and not matchoutput(
+ 'mtn --version', r'monotone 0\.', True)
+
+def has_eol_in_paths():
+ try:
+ fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
+ os.close(fd)
+ os.remove(path)
+ return True
+ except:
+ return False
+
+def has_executablebit():
+ fd, path = tempfile.mkstemp(prefix=tempprefix)
+ os.close(fd)
+ try:
+ s = os.lstat(path).st_mode
+ os.chmod(path, s | 0100)
+ return (os.lstat(path).st_mode & 0100 != 0)
+ finally:
+ os.remove(path)
+
+def has_icasefs():
+ # Stolen from mercurial.util
+ fd, path = tempfile.mkstemp(prefix=tempprefix, dir='.')
+ os.close(fd)
+ try:
+ s1 = os.stat(path)
+ d, b = os.path.split(path)
+ p2 = os.path.join(d, b.upper())
+ if path == p2:
+ p2 = os.path.join(d, b.lower())
+ try:
+ s2 = os.stat(p2)
+ return s2 == s1
+ except:
+ return False
+ finally:
+ os.remove(path)
+
+def has_inotify():
+ try:
+ import hgext.inotify.linux.watcher
+ return True
+ except ImportError:
+ return False
+
+def has_fifo():
+ return hasattr(os, "mkfifo")
+
+def has_lsprof():
+ try:
+ import _lsprof
+ return True
+ except ImportError:
+ return False
+
+def has_gettext():
+ return matchoutput('msgfmt --version', 'GNU gettext-tools')
+
+def has_git():
+ return matchoutput('git --version 2>&1', r'^git version')
+
+def has_docutils():
+ try:
+ from docutils.core import publish_cmdline
+ return True
+ except ImportError:
+ return False
+
+def getsvnversion():
+ m = matchoutput('svn --version 2>&1', r'^svn,\s+version\s+(\d+)\.(\d+)')
+ if not m:
+ return (0, 0)
+ return (int(m.group(1)), int(m.group(2)))
+
+def has_svn15():
+ return getsvnversion() >= (1, 5)
+
+def has_svn():
+ return matchoutput('svn --version 2>&1', r'^svn, version') and \
+ matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
+
+def has_svn_bindings():
+ try:
+ import svn.core
+ version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
+ if version < (1, 4):
+ return False
+ return True
+ except ImportError:
+ return False
+
+def has_p4():
+ return matchoutput('p4 -V', r'Rev\. P4/') and matchoutput('p4d -V', r'Rev\. P4D/')
+
+def has_symlink():
+ return hasattr(os, "symlink")
+
+def has_tla():
+ return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
+
+def has_gpg():
+ return matchoutput('gpg --version 2>&1', r'GnuPG')
+
+def has_unix_permissions():
+ d = tempfile.mkdtemp(prefix=tempprefix, dir=".")
+ try:
+ fname = os.path.join(d, 'foo')
+ for umask in (077, 007, 022):
+ os.umask(umask)
+ f = open(fname, 'w')
+ f.close()
+ mode = os.stat(fname).st_mode
+ os.unlink(fname)
+ if mode & 0777 != ~umask & 0666:
+ return False
+ return True
+ finally:
+ os.rmdir(d)
+
+def has_pyflakes():
+ return matchoutput('echo "import re" 2>&1 | pyflakes',
+ r"<stdin>:1: 're' imported but unused",
+ True)
+
+def has_pygments():
+ try:
+ import pygments
+ return True
+ except ImportError:
+ return False
+
+def has_outer_repo():
+ return matchoutput('hg root 2>&1', r'')
+
+def has_ssl():
+ try:
+ import ssl
+ import OpenSSL
+ OpenSSL.SSL.Context
+ return True
+ except ImportError:
+ return False
+
+checks = {
+ "baz": (has_baz, "GNU Arch baz client"),
+ "bzr": (has_bzr, "Canonical's Bazaar client"),
+ "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"),
+ "cvs": (has_cvs, "cvs client/server"),
+ "darcs": (has_darcs, "darcs client"),
+ "docutils": (has_docutils, "Docutils text processing library"),
+ "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
+ "execbit": (has_executablebit, "executable bit"),
+ "fifo": (has_fifo, "named pipes"),
+ "gettext": (has_gettext, "GNU Gettext (msgfmt)"),
+ "git": (has_git, "git command line client"),
+ "gpg": (has_gpg, "gpg client"),
+ "icasefs": (has_icasefs, "case insensitive file system"),
+ "inotify": (has_inotify, "inotify extension support"),
+ "lsprof": (has_lsprof, "python lsprof module"),
+ "mtn": (has_mtn, "monotone client (>= 1.0)"),
+ "outer-repo": (has_outer_repo, "outer repo"),
+ "p4": (has_p4, "Perforce server and client"),
+ "pyflakes": (has_pyflakes, "Pyflakes python linter"),
+ "pygments": (has_pygments, "Pygments source highlighting library"),
+ "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
+ "svn": (has_svn, "subversion client and admin tools"),
+ "svn15": (has_svn15, "subversion client and admin tools >= 1.5"),
+ "svn-bindings": (has_svn_bindings, "subversion python bindings"),
+ "symlink": (has_symlink, "symbolic links"),
+ "tla": (has_tla, "GNU Arch tla client"),
+ "unix-permissions": (has_unix_permissions, "unix-style permissions"),
+}
def list_features():
for name, feature in checks.iteritems():
diff --git a/tests/hghave.py b/tests/hghave.py
deleted file mode 100755
index 9b93ec5..0000000
--- a/tests/hghave.py
+++ /dev/null
@@ -1,308 +0,0 @@
-import os, stat, socket
-import re
-import sys
-import tempfile
-
-tempprefix = 'hg-hghave-'
-
-def matchoutput(cmd, regexp, ignorestatus=False):
- """Return True if cmd executes successfully and its output
- is matched by the supplied regular expression.
- """
- r = re.compile(regexp)
- fh = os.popen(cmd)
- s = fh.read()
- try:
- ret = fh.close()
- except IOError:
- # Happen in Windows test environment
- ret = 1
- return (ignorestatus or ret is None) and r.search(s)
-
-def has_baz():
- return matchoutput('baz --version 2>&1', r'baz Bazaar version')
-
-def has_bzr():
- try:
- import bzrlib
- return bzrlib.__doc__ is not None
- except ImportError:
- return False
-
-def has_bzr114():
- try:
- import bzrlib
- return (bzrlib.__doc__ is not None
- and bzrlib.version_info[:2] >= (1, 14))
- except ImportError:
- return False
-
-def has_cvs():
- re = r'Concurrent Versions System.*?server'
- return matchoutput('cvs --version 2>&1', re) and not has_msys()
-
-def has_darcs():
- return matchoutput('darcs --version', r'2\.[2-9]', True)
-
-def has_mtn():
- return matchoutput('mtn --version', r'monotone', True) and not matchoutput(
- 'mtn --version', r'monotone 0\.', True)
-
-def has_eol_in_paths():
- try:
- fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix, suffix='\n\r')
- os.close(fd)
- os.remove(path)
- return True
- except (IOError, OSError):
- return False
-
-def has_executablebit():
- try:
- EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
- fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix)
- try:
- os.close(fh)
- m = os.stat(fn).st_mode & 0777
- new_file_has_exec = m & EXECFLAGS
- os.chmod(fn, m ^ EXECFLAGS)
- exec_flags_cannot_flip = ((os.stat(fn).st_mode & 0777) == m)
- finally:
- os.unlink(fn)
- except (IOError, OSError):
- # we don't care, the user probably won't be able to commit anyway
- return False
- return not (new_file_has_exec or exec_flags_cannot_flip)
-
-def has_icasefs():
- # Stolen from mercurial.util
- fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
- os.close(fd)
- try:
- s1 = os.stat(path)
- d, b = os.path.split(path)
- p2 = os.path.join(d, b.upper())
- if path == p2:
- p2 = os.path.join(d, b.lower())
- try:
- s2 = os.stat(p2)
- return s2 == s1
- except OSError:
- return False
- finally:
- os.remove(path)
-
-def has_inotify():
- try:
- import hgext.inotify.linux.watcher
- except ImportError:
- return False
- name = tempfile.mktemp(dir='.', prefix=tempprefix)
- sock = socket.socket(socket.AF_UNIX)
- try:
- sock.bind(name)
- except socket.error, err:
- return False
- sock.close()
- os.unlink(name)
- return True
-
-def has_fifo():
- if getattr(os, "mkfifo", None) is None:
- return False
- name = tempfile.mktemp(dir='.', prefix=tempprefix)
- try:
- os.mkfifo(name)
- os.unlink(name)
- return True
- except OSError:
- return False
-
-def has_cacheable_fs():
- from mercurial import util
-
- fd, path = tempfile.mkstemp(dir='.', prefix=tempprefix)
- os.close(fd)
- try:
- return util.cachestat(path).cacheable()
- finally:
- os.remove(path)
-
-def has_lsprof():
- try:
- import _lsprof
- return True
- except ImportError:
- return False
-
-def has_gettext():
- return matchoutput('msgfmt --version', 'GNU gettext-tools')
-
-def has_git():
- return matchoutput('git --version 2>&1', r'^git version')
-
-def has_docutils():
- try:
- from docutils.core import publish_cmdline
- return True
- except ImportError:
- return False
-
-def getsvnversion():
- m = matchoutput('svn --version 2>&1', r'^svn,\s+version\s+(\d+)\.(\d+)')
- if not m:
- return (0, 0)
- return (int(m.group(1)), int(m.group(2)))
-
-def has_svn15():
- return getsvnversion() >= (1, 5)
-
-def has_svn13():
- return getsvnversion() >= (1, 3)
-
-def has_svn():
- return matchoutput('svn --version 2>&1', r'^svn, version') and \
- matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
-
-def has_svn_bindings():
- try:
- import svn.core
- version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
- if version < (1, 4):
- return False
- return True
- except ImportError:
- return False
-
-def has_p4():
- return (matchoutput('p4 -V', r'Rev\. P4/') and
- matchoutput('p4d -V', r'Rev\. P4D/'))
-
-def has_symlink():
- if getattr(os, "symlink", None) is None:
- return False
- name = tempfile.mktemp(dir='.', prefix=tempprefix)
- try:
- os.symlink(".", name)
- os.unlink(name)
- return True
- except (OSError, AttributeError):
- return False
-
-def has_hardlink():
- from mercurial import util
- fh, fn = tempfile.mkstemp(dir='.', prefix=tempprefix)
- os.close(fh)
- name = tempfile.mktemp(dir='.', prefix=tempprefix)
- try:
- try:
- util.oslink(fn, name)
- os.unlink(name)
- return True
- except OSError:
- return False
- finally:
- os.unlink(fn)
-
-def has_tla():
- return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
-
-def has_gpg():
- return matchoutput('gpg --version 2>&1', r'GnuPG')
-
-def has_unix_permissions():
- d = tempfile.mkdtemp(dir='.', prefix=tempprefix)
- try:
- fname = os.path.join(d, 'foo')
- for umask in (077, 007, 022):
- os.umask(umask)
- f = open(fname, 'w')
- f.close()
- mode = os.stat(fname).st_mode
- os.unlink(fname)
- if mode & 0777 != ~umask & 0666:
- return False
- return True
- finally:
- os.rmdir(d)
-
-def has_pyflakes():
- return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"",
- r"<stdin>:1: 're' imported but unused",
- True)
-
-def has_pygments():
- try:
- import pygments
- return True
- except ImportError:
- return False
-
-def has_outer_repo():
- # failing for other reasons than 'no repo' imply that there is a repo
- return not matchoutput('hg root 2>&1',
- r'abort: no repository found', True)
-
-def has_ssl():
- try:
- import ssl
- import OpenSSL
- OpenSSL.SSL.Context
- return True
- except ImportError:
- return False
-
-def has_windows():
- return os.name == 'nt'
-
-def has_system_sh():
- return os.name != 'nt'
-
-def has_serve():
- return os.name != 'nt' # gross approximation
-
-def has_tic():
- return matchoutput('test -x "`which tic`"', '')
-
-def has_msys():
- return os.getenv('MSYSTEM')
-
-checks = {
- "true": (lambda: True, "yak shaving"),
- "false": (lambda: False, "nail clipper"),
- "baz": (has_baz, "GNU Arch baz client"),
- "bzr": (has_bzr, "Canonical's Bazaar client"),
- "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"),
- "cacheable": (has_cacheable_fs, "cacheable filesystem"),
- "cvs": (has_cvs, "cvs client/server"),
- "darcs": (has_darcs, "darcs client"),
- "docutils": (has_docutils, "Docutils text processing library"),
- "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
- "execbit": (has_executablebit, "executable bit"),
- "fifo": (has_fifo, "named pipes"),
- "gettext": (has_gettext, "GNU Gettext (msgfmt)"),
- "git": (has_git, "git command line client"),
- "gpg": (has_gpg, "gpg client"),
- "hardlink": (has_hardlink, "hardlinks"),
- "icasefs": (has_icasefs, "case insensitive file system"),
- "inotify": (has_inotify, "inotify extension support"),
- "lsprof": (has_lsprof, "python lsprof module"),
- "mtn": (has_mtn, "monotone client (>= 1.0)"),
- "outer-repo": (has_outer_repo, "outer repo"),
- "p4": (has_p4, "Perforce server and client"),
- "pyflakes": (has_pyflakes, "Pyflakes python linter"),
- "pygments": (has_pygments, "Pygments source highlighting library"),
- "serve": (has_serve, "platform and python can manage 'hg serve -d'"),
- "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
- "svn": (has_svn, "subversion client and admin tools"),
- "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
- "svn15": (has_svn15, "subversion client and admin tools >= 1.5"),
- "svn-bindings": (has_svn_bindings, "subversion python bindings"),
- "symlink": (has_symlink, "symbolic links"),
- "system-sh": (has_system_sh, "system() uses sh"),
- "tic": (has_tic, "terminfo compiler"),
- "tla": (has_tla, "GNU Arch tla client"),
- "unix-permissions": (has_unix_permissions, "unix-style permissions"),
- "windows": (has_windows, "Windows"),
- "msys": (has_msys, "Windows with MSYS"),
-}
diff --git a/tests/histedit-helpers.sh b/tests/histedit-helpers.sh
deleted file mode 100644
index 4475883..0000000
--- a/tests/histedit-helpers.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-fixbundle() {
- grep -v 'saving bundle' | grep -v 'saved backup' | \
- grep -v added | grep -v adding | \
- grep -v "unable to find 'e' for patching" | \
- grep -v "e: No such file or directory"
-}
diff --git a/tests/missing-comment.hg b/tests/missing-comment.hg
deleted file mode 100644
index 7a5be69..0000000
--- a/tests/missing-comment.hg
+++ /dev/null
Binary files differ
diff --git a/tests/notcapable b/tests/notcapable
index ef8dc22..31c1858 100644
--- a/tests/notcapable
+++ b/tests/notcapable
@@ -6,18 +6,13 @@ then
fi
cat > notcapable-$CAP.py << EOF
-from mercurial import extensions, peer, localrepo
+from mercurial import extensions, repo
def extsetup():
- extensions.wrapfunction(peer.peerrepository, 'capable', wrapcapable)
- extensions.wrapfunction(localrepo.localrepository, 'peer', wrappeer)
-def wrapcapable(orig, self, name, *args, **kwargs):
+ extensions.wrapfunction(repo.repository, 'capable', wrapper)
+def wrapper(orig, self, name, *args, **kwargs):
if name in '$CAP'.split(' '):
return False
return orig(self, name, *args, **kwargs)
-def wrappeer(orig, self):
- # Since we're disabling some newer features, we need to make sure local
- # repos add in the legacy features again.
- return localrepo.locallegacypeer(self)
EOF
echo '[extensions]' >> $HGRCPATH
diff --git a/tests/printenv.py b/tests/printenv.py
index d00e149..befa546 100644
--- a/tests/printenv.py
+++ b/tests/printenv.py
@@ -3,7 +3,7 @@
# put something like this in the repo .hg/hgrc:
#
# [hooks]
-# changegroup = python "$TESTDIR/printenv.py" <hookname> [exit] [output]
+# changegroup = python "$TESTDIR"/printenv.py <hookname> [exit] [output]
#
# - <hookname> is a mandatory argument (e.g. "changegroup")
# - [exit] is the exit code of the hook (default: 0)
@@ -32,17 +32,13 @@ if len(sys.argv) > 2:
# variables with empty values may not exist on all platforms, filter
# them now for portability sake.
-env = [(k, v) for k, v in os.environ.iteritems()
+env = [k for k, v in os.environ.iteritems()
if k.startswith("HG_") and v]
env.sort()
out.write("%s hook: " % name)
-if os.name == 'nt':
- filter = lambda x: x.replace('\\', '/')
-else:
- filter = lambda x: x
-vars = ["%s=%s" % (k, filter(v)) for k, v in env]
-out.write(" ".join(vars))
+for v in env:
+ out.write("%s=%s " % (v, os.environ[v]))
out.write("\n")
out.close()
diff --git a/tests/run-tests.py b/tests/run-tests.py
index c9ef7d5..b9af4cb 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -75,7 +75,7 @@ def Popen4(cmd, wd, timeout):
def t():
start = time.time()
while time.time() - start < timeout and p.returncode is None:
- time.sleep(.1)
+ time.sleep(1)
p.timeout = True
if p.returncode is None:
terminate(p)
@@ -87,7 +87,7 @@ def Popen4(cmd, wd, timeout):
SKIPPED_STATUS = 80
SKIPPED_PREFIX = 'skipped: '
FAILED_PREFIX = 'hghave check failed: '
-PYTHON = sys.executable.replace('\\', '/')
+PYTHON = sys.executable
IMPL_PATH = 'PYTHONPATH'
if 'java' in sys.platform:
IMPL_PATH = 'JYTHONPATH'
@@ -98,7 +98,7 @@ defaults = {
'jobs': ('HGTEST_JOBS', 1),
'timeout': ('HGTEST_TIMEOUT', 180),
'port': ('HGTEST_PORT', 20059),
- 'shell': ('HGTEST_SHELL', 'sh'),
+ 'shell': ('HGTEST_SHELL', '/bin/sh'),
}
def parselistfiles(files, listtype, warn=True):
@@ -141,8 +141,6 @@ def parseargs():
" rather than capturing and diff'ing it (disables timeout)")
parser.add_option("-f", "--first", action="store_true",
help="exit on the first test failure")
- parser.add_option("-H", "--htmlcov", action="store_true",
- help="create an HTML report of the coverage of the files")
parser.add_option("--inotify", action="store_true",
help="enable inotify extension when running tests")
parser.add_option("-i", "--interactive", action="store_true",
@@ -200,7 +198,6 @@ def parseargs():
options.pure = True
if options.with_hg:
- options.with_hg = os.path.expanduser(options.with_hg)
if not (os.path.isfile(options.with_hg) and
os.access(options.with_hg, os.X_OK)):
parser.error('--with-hg must specify an executable hg script')
@@ -209,12 +206,12 @@ def parseargs():
if options.local:
testdir = os.path.dirname(os.path.realpath(sys.argv[0]))
hgbin = os.path.join(os.path.dirname(testdir), 'hg')
- if os.name != 'nt' and not os.access(hgbin, os.X_OK):
+ if not os.access(hgbin, os.X_OK):
parser.error('--local specified, but %r not found or not executable'
% hgbin)
options.with_hg = hgbin
- options.anycoverage = options.cover or options.annotate or options.htmlcov
+ options.anycoverage = options.cover or options.annotate
if options.anycoverage:
try:
import coverage
@@ -343,7 +340,10 @@ def terminate(proc):
"""Terminate subprocess (with fallback for Python versions < 2.6)"""
vlog('# Terminating process %d' % proc.pid)
try:
- getattr(proc, 'terminate', lambda : os.kill(proc.pid, signal.SIGTERM))()
+ if hasattr(proc, 'terminate'):
+ proc.terminate()
+ else:
+ os.kill(proc.pid, signal.SIGTERM)
except OSError:
pass
@@ -360,7 +360,7 @@ def killdaemons():
os.kill(pid, 0)
vlog('# Killing daemon process %d' % pid)
os.kill(pid, signal.SIGTERM)
- time.sleep(0.1)
+ time.sleep(0.25)
os.kill(pid, 0)
vlog('# Daemon process %d is stuck - really killing it' % pid)
os.kill(pid, signal.SIGKILL)
@@ -496,11 +496,8 @@ def outputcoverage(options):
return
covrun('-c')
- omit = ','.join(os.path.join(x, '*') for x in [BINDIR, TESTDIR])
+ omit = ','.join([BINDIR, TESTDIR])
covrun('-i', '-r', '"--omit=%s"' % omit) # report
- if options.htmlcov:
- htmldir = os.path.join(TESTDIR, 'htmlcov')
- covrun('-i', '-b', '"--directory=%s"' % htmldir, '"--omit=%s"' % omit)
if options.annotate:
adir = os.path.join(TESTDIR, 'annotated')
if not os.path.isdir(adir):
@@ -514,7 +511,7 @@ def pytest(test, wd, options, replacements):
return run(cmd, wd, options, replacements)
def shtest(test, wd, options, replacements):
- cmd = '%s "%s"' % (options.shell, test)
+ cmd = '"%s"' % test
vlog("# Running", cmd)
return run(cmd, wd, options, replacements)
@@ -527,141 +524,23 @@ def escapef(m):
def stringescape(s):
return escapesub(escapef, s)
-def rematch(el, l):
- try:
- # ensure that the regex matches to the end of the string
- return re.match(el + r'\Z', l)
- except re.error:
- # el is an invalid regex
- return False
-
-def globmatch(el, l):
- # The only supported special characters are * and ? plus / which also
- # matches \ on windows. Escaping of these caracters is supported.
- i, n = 0, len(el)
- res = ''
- while i < n:
- c = el[i]
- i += 1
- if c == '\\' and el[i] in '*?\\/':
- res += el[i - 1:i + 1]
- i += 1
- elif c == '*':
- res += '.*'
- elif c == '?':
- res += '.'
- elif c == '/' and os.name == 'nt':
- res += '[/\\\\]'
- else:
- res += re.escape(c)
- return rematch(res, l)
-
-def linematch(el, l):
- if el == l: # perfect match (fast)
- return True
- if (el and
- (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', l) or
- el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', l) or
- el.endswith(" (esc)\n") and
- (el[:-7].decode('string-escape') + '\n' == l or
- el[:-7].decode('string-escape').replace('\r', '') +
- '\n' == l and os.name == 'nt'))):
- return True
- return False
-
def tsttest(test, wd, options, replacements):
- # We generate a shell script which outputs unique markers to line
- # up script results with our source. These markers include input
- # line number and the last return code
+ t = open(test)
+ out = []
+ script = []
salt = "SALT" + str(time.time())
- def addsalt(line, inpython):
- if inpython:
- script.append('%s %d 0\n' % (salt, line))
- else:
- script.append('echo %s %s $?\n' % (salt, line))
- # After we run the shell script, we re-unify the script output
- # with non-active parts of the source, with synchronization by our
- # SALT line number markers. The after table contains the
- # non-active components, ordered by line number
- after = {}
pos = prepos = -1
-
- # Expected shellscript output
+ after = {}
expected = {}
-
- # We keep track of whether or not we're in a Python block so we
- # can generate the surrounding doctest magic
- inpython = False
-
- # True or False when in a true or false conditional section
- skipping = None
-
- def hghave(reqs):
- # TODO: do something smarter when all other uses of hghave is gone
- tdir = TESTDIR.replace('\\', '/')
- proc = Popen4('%s -c "%s/hghave %s"' %
- (options.shell, tdir, ' '.join(reqs)), wd, 0)
- proc.communicate()
- ret = proc.wait()
- if wifexited(ret):
- ret = os.WEXITSTATUS(ret)
- return ret == 0
-
- f = open(test)
- t = f.readlines()
- f.close()
-
- script = []
- if options.debug:
- script.append('set -x\n')
- if os.getenv('MSYSTEM'):
- script.append('alias pwd="pwd -W"\n')
for n, l in enumerate(t):
if not l.endswith('\n'):
l += '\n'
- if l.startswith('#if'):
- if skipping is not None:
- after.setdefault(pos, []).append(' !!! nested #if\n')
- skipping = not hghave(l.split()[1:])
- after.setdefault(pos, []).append(l)
- elif l.startswith('#else'):
- if skipping is None:
- after.setdefault(pos, []).append(' !!! missing #if\n')
- skipping = not skipping
- after.setdefault(pos, []).append(l)
- elif l.startswith('#endif'):
- if skipping is None:
- after.setdefault(pos, []).append(' !!! missing #if\n')
- skipping = None
- after.setdefault(pos, []).append(l)
- elif skipping:
- after.setdefault(pos, []).append(l)
- elif l.startswith(' >>> '): # python inlines
- after.setdefault(pos, []).append(l)
- prepos = pos
- pos = n
- if not inpython:
- # we've just entered a Python block, add the header
- inpython = True
- addsalt(prepos, False) # make sure we report the exit code
- script.append('%s -m heredoctest <<EOF\n' % PYTHON)
- addsalt(n, True)
- script.append(l[2:])
- elif l.startswith(' ... '): # python inlines
- after.setdefault(prepos, []).append(l)
- script.append(l[2:])
- elif l.startswith(' $ '): # commands
- if inpython:
- script.append("EOF\n")
- inpython = False
+ if l.startswith(' $ '): # commands
after.setdefault(pos, []).append(l)
prepos = pos
pos = n
- addsalt(n, False)
- cmd = l[4:].split()
- if len(cmd) == 2 and cmd[0] == 'cd':
- l = ' $ cd %s || exit 1\n' % cmd[1]
+ script.append('echo %s %s $?\n' % (salt, n))
script.append(l[4:])
elif l.startswith(' > '): # continuations
after.setdefault(prepos, []).append(l)
@@ -670,26 +549,21 @@ def tsttest(test, wd, options, replacements):
# queue up a list of expected results
expected.setdefault(pos, []).append(l[2:])
else:
- if inpython:
- script.append("EOF\n")
- inpython = False
# non-command/result - queue up for merged output
after.setdefault(pos, []).append(l)
- if inpython:
- script.append("EOF\n")
- if skipping is not None:
- after.setdefault(pos, []).append(' !!! missing #endif\n')
- addsalt(n + 1, False)
+ t.close()
+
+ script.append('echo %s %s $?\n' % (salt, n + 1))
- # Write out the script and execute it
fd, name = tempfile.mkstemp(suffix='hg-tst')
+
try:
for l in script:
os.write(fd, l)
os.close(fd)
- cmd = '%s "%s"' % (options.shell, name)
+ cmd = '"%s" "%s"' % (options.shell, name)
vlog("# Running", cmd)
exitcode, output = run(cmd, wd, options, replacements)
# do not merge output if skipped, return hghave message instead
@@ -699,7 +573,32 @@ def tsttest(test, wd, options, replacements):
finally:
os.remove(name)
- # Merge the script output back into a unified test
+ def rematch(el, l):
+ try:
+ # ensure that the regex matches to the end of the string
+ return re.match(el + r'\Z', l)
+ except re.error:
+ # el is an invalid regex
+ return False
+
+ def globmatch(el, l):
+ # The only supported special characters are * and ?. Escaping is
+ # supported.
+ i, n = 0, len(el)
+ res = ''
+ while i < n:
+ c = el[i]
+ i += 1
+ if c == '\\' and el[i] in '*?\\':
+ res += el[i - 1:i + 1]
+ i += 1
+ elif c == '*':
+ res += '.*'
+ elif c == '?':
+ res += '.'
+ else:
+ res += re.escape(c)
+ return rematch(res, l)
pos = -1
postout = []
@@ -711,16 +610,20 @@ def tsttest(test, wd, options, replacements):
if lout:
if lcmd:
- # output block had no trailing newline, clean up
lout += ' (no-eol)\n'
- # find the expected output at the current position
el = None
if pos in expected and expected[pos]:
el = expected[pos].pop(0)
- if linematch(el, lout):
- postout.append(" " + el)
+ if el == lout: # perfect match (fast)
+ postout.append(" " + lout)
+ elif (el and
+ (el.endswith(" (re)\n") and rematch(el[:-6] + '\n', lout) or
+ el.endswith(" (glob)\n") and globmatch(el[:-8] + '\n', lout)
+ or el.endswith(" (esc)\n") and
+ el.decode('string-escape') == l)):
+ postout.append(" " + el) # fallback regex/glob/esc match
else:
if needescape(lout):
lout = stringescape(lout.rstrip('\n')) + " (esc)\n"
@@ -732,7 +635,6 @@ def tsttest(test, wd, options, replacements):
if ret != 0:
postout.append(" [%s]\n" % ret)
if pos in after:
- # merge in non-active test bits
postout += after.pop(pos)
pos = int(lcmd.split()[0])
@@ -824,7 +726,6 @@ def runone(options, test):
rename(testpath + ".err", testpath)
else:
rename(testpath + ".err", testpath + ".out")
- result('p', test)
return
result('f', (test, msg))
@@ -896,7 +797,7 @@ def runone(options, test):
tf = open(testpath)
firstline = tf.readline().rstrip()
tf.close()
- except IOError:
+ except:
firstline = ''
lctest = test.lower()
@@ -915,24 +816,13 @@ def runone(options, test):
testtmp = os.environ["TESTTMP"] = os.environ["HOME"] = \
os.path.join(HGTMP, os.path.basename(test))
- replacements = [
+ os.mkdir(testtmp)
+ ret, out = runner(testpath, testtmp, options, [
+ (re.escape(testtmp), '$TESTTMP'),
(r':%s\b' % options.port, ':$HGPORT'),
(r':%s\b' % (options.port + 1), ':$HGPORT1'),
(r':%s\b' % (options.port + 2), ':$HGPORT2'),
- ]
- if os.name == 'nt':
- replacements.append((r'\r\n', '\n'))
- replacements.append(
- (''.join(c.isalpha() and '[%s%s]' % (c.lower(), c.upper()) or
- c in '/\\' and r'[/\\]' or
- c.isdigit() and c or
- '\\' + c
- for c in testtmp), '$TESTTMP'))
- else:
- replacements.append((re.escape(testtmp), '$TESTTMP'))
-
- os.mkdir(testtmp)
- ret, out = runner(testpath, testtmp, options, replacements)
+ ])
vlog("# Ret was:", ret)
mark = '.'
@@ -945,7 +835,7 @@ def runone(options, test):
refout = None # to match "out is None"
elif os.path.exists(ref):
f = open(ref, "r")
- refout = list(splitnewlines(f.read()))
+ refout = splitnewlines(f.read())
f.close()
else:
refout = []
@@ -1221,9 +1111,6 @@ def main():
os.environ['COLUMNS'] = '80'
os.environ['GREP_OPTIONS'] = ''
os.environ['http_proxy'] = ''
- os.environ['no_proxy'] = ''
- os.environ['NO_PROXY'] = ''
- os.environ['TERM'] = 'xterm'
# unset env related to hooks
for k in os.environ.keys():
@@ -1250,12 +1137,7 @@ def main():
#shutil.rmtree(tmpdir)
os.makedirs(tmpdir)
else:
- d = None
- if os.name == 'nt':
- # without this, we get the default temp dir location, but
- # in all lowercase, which causes troubles with paths (issue3490)
- d = os.getenv('TMP')
- tmpdir = tempfile.mkdtemp('', 'hgtests.', d)
+ tmpdir = tempfile.mkdtemp('', 'hgtests.')
HGTMP = os.environ['HGTMP'] = os.path.realpath(tmpdir)
DAEMON_PIDS = None
HGRCPATH = None
@@ -1317,7 +1199,7 @@ def main():
else:
runtests(options, tests)
finally:
- time.sleep(.1)
+ time.sleep(1)
cleanup(options)
if __name__ == '__main__':
diff --git a/tests/sitecustomize.py b/tests/sitecustomize.py
index 50d281f..b689d32 100644
--- a/tests/sitecustomize.py
+++ b/tests/sitecustomize.py
@@ -1,5 +1,6 @@
try:
import coverage
- getattr(coverage, 'process_startup', lambda: None)()
+ if hasattr(coverage, 'process_startup'):
+ coverage.process_startup()
except ImportError:
pass
diff --git a/tests/svn/empty.svndump b/tests/svn/empty.svndump
deleted file mode 100644
index 6bd513f..0000000
--- a/tests/svn/empty.svndump
+++ /dev/null
@@ -1,129 +0,0 @@
-SVN-fs-dump-format-version: 2
-
-UUID: b70c45d5-2b76-4722-a373-d9babae61626
-
-Revision-number: 0
-Prop-content-length: 260
-Content-length: 260
-
-K 8
-svn:date
-V 27
-2012-04-18T11:35:14.752409Z
-K 17
-svn:sync-from-url
-V 73
-file:///Users/pmezard/dev/hg/hg-pmezard/tests/svn/temp/svn-repo/trunk/dir
-K 18
-svn:sync-from-uuid
-V 36
-56625b9e-e7e9-45be-ab61-052d41f0e1dd
-K 24
-svn:sync-last-merged-rev
-V 1
-4
-PROPS-END
-
-Revision-number: 1
-Prop-content-length: 112
-Content-length: 112
-
-K 10
-svn:author
-V 7
-pmezard
-K 8
-svn:date
-V 27
-2012-04-18T11:35:14.769622Z
-K 7
-svn:log
-V 10
-init projA
-PROPS-END
-
-Node-path: trunk
-Node-kind: dir
-Node-action: add
-Prop-content-length: 10
-Content-length: 10
-
-PROPS-END
-
-
-Revision-number: 2
-Prop-content-length: 107
-Content-length: 107
-
-K 10
-svn:author
-V 7
-pmezard
-K 8
-svn:date
-V 27
-2012-04-18T11:35:15.052989Z
-K 7
-svn:log
-V 6
-adddir
-PROPS-END
-
-Node-path: trunk/dir
-Node-kind: dir
-Node-action: add
-Prop-content-length: 10
-Content-length: 10
-
-PROPS-END
-
-
-Node-path: trunk/dir/a
-Node-kind: file
-Node-action: add
-Prop-content-length: 10
-Text-content-length: 2
-Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
-Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
-Content-length: 12
-
-PROPS-END
-a
-
-
-Revision-number: 3
-Prop-content-length: 105
-Content-length: 105
-
-K 10
-svn:author
-V 7
-pmezard
-K 8
-svn:date
-V 27
-2012-04-18T11:35:16.050353Z
-K 7
-svn:log
-V 4
-addb
-PROPS-END
-
-Revision-number: 4
-Prop-content-length: 105
-Content-length: 105
-
-K 10
-svn:author
-V 7
-pmezard
-K 8
-svn:date
-V 27
-2012-04-18T11:35:17.050768Z
-K 7
-svn:log
-V 4
-addc
-PROPS-END
-
diff --git a/tests/svn/svndump-empty.sh b/tests/svn/svndump-empty.sh
deleted file mode 100755
index a4e96b2..0000000
--- a/tests/svn/svndump-empty.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# Use this script to generate empty.svndump
-#
-
-mkdir temp
-cd temp
-
-mkdir project-orig
-cd project-orig
-mkdir trunk
-mkdir branches
-mkdir tags
-cd ..
-
-svnadmin create svn-repo
-svnurl=file://`pwd`/svn-repo
-svn import project-orig $svnurl -m "init projA"
-
-svn co $svnurl project
-cd project
-mkdir trunk/dir
-echo a > trunk/dir/a
-svn add trunk/dir
-svn ci -m adddir
-
-echo b > trunk/b
-svn add trunk/b
-svn ci -m addb
-
-echo c > c
-svn add c
-svn ci -m addc
-cd ..
-
-# svnsync repo/trunk/dir only so the last two revisions are empty
-svnadmin create svn-empty
-cat > svn-empty/hooks/pre-revprop-change <<EOF
-#!/bin/sh
-exit 0
-EOF
-chmod +x svn-empty/hooks/pre-revprop-change
-svnsync init --username svnsync file://`pwd`/svn-empty file://`pwd`/svn-repo/trunk/dir
-svnsync sync file://`pwd`/svn-empty
-svn log -v file://`pwd`/svn-empty
-
-svnadmin dump svn-empty > ../empty.svndump
diff --git a/tests/svnxml.py b/tests/svnxml.py
deleted file mode 100644
index b3b2b63..0000000
--- a/tests/svnxml.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# Read the output of a "svn log --xml" command on stdin, parse it and
-# print a subset of attributes common to all svn versions tested by
-# hg.
-import xml.dom.minidom, sys
-
-def xmltext(e):
- return ''.join(c.data for c
- in e.childNodes
- if c.nodeType == c.TEXT_NODE)
-
-def parseentry(entry):
- e = {}
- e['revision'] = entry.getAttribute('revision')
- e['author'] = xmltext(entry.getElementsByTagName('author')[0])
- e['msg'] = xmltext(entry.getElementsByTagName('msg')[0])
- e['paths'] = []
- paths = entry.getElementsByTagName('paths')
- if paths:
- paths = paths[0]
- for p in paths.getElementsByTagName('path'):
- action = p.getAttribute('action')
- path = xmltext(p)
- frompath = p.getAttribute('copyfrom-path')
- fromrev = p.getAttribute('copyfrom-rev')
- e['paths'].append((path, action, frompath, fromrev))
- return e
-
-def parselog(data):
- entries = []
- doc = xml.dom.minidom.parseString(data)
- for e in doc.getElementsByTagName('logentry'):
- entries.append(parseentry(e))
- return entries
-
-def printentries(entries):
- fp = sys.stdout
- for e in entries:
- for k in ('revision', 'author', 'msg'):
- fp.write(('%s: %s\n' % (k, e[k])).encode('utf-8'))
- for path, action, fpath, frev in sorted(e['paths']):
- frominfo = ''
- if frev:
- frominfo = ' (from %s@%s)' % (fpath, frev)
- p = ' %s %s%s\n' % (action, path, frominfo)
- fp.write(p.encode('utf-8'))
-
-if __name__ == '__main__':
- data = sys.stdin.read()
- entries = parselog(data)
- printentries(entries)
-
diff --git a/tests/test-1102.t b/tests/test-1102.t
index 61e01e5..9d499aa 100644
--- a/tests/test-1102.t
+++ b/tests/test-1102.t
@@ -14,4 +14,3 @@
tip 3:a49829c4fc11
t1 0:f7b1eb17ad24
- $ cd ..
diff --git a/tests/test-1993.t b/tests/test-1993.t
index 317cba2..ddf7554 100644
--- a/tests/test-1993.t
+++ b/tests/test-1993.t
@@ -44,5 +44,3 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: Added tag default for changeset f7b1eb17ad24
-
- $ cd ..
diff --git a/tests/test-586.t b/tests/test-586.t
index 71b3cbf..399eebb 100644
--- a/tests/test-586.t
+++ b/tests/test-586.t
@@ -89,4 +89,3 @@ move b content
src/b
tst/a
- $ cd ..
diff --git a/tests/test-abort-checkin.t b/tests/test-abort-checkin.t
index c7a3c98..08a138a 100644
--- a/tests/test-abort-checkin.t
+++ b/tests/test-abort-checkin.t
@@ -31,5 +31,3 @@ called and .hg/journal.dirstate will not be deleted:
rollback completed
abort: no commits allowed
[255]
-
- $ cd ..
diff --git a/tests/test-acl.t b/tests/test-acl.t
index 6105d5d..04680a6 100644
--- a/tests/test-acl.t
+++ b/tests/test-acl.t
@@ -70,6 +70,9 @@
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ echo '[extensions]' >> $HGRCPATH
+ $ echo 'acl =' >> $HGRCPATH
+
$ config=b/.hg/hgrc
Extension disabled for lack of a hook
@@ -82,7 +85,6 @@ Extension disabled for lack of a hook
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -116,12 +118,10 @@ Extension disabled for lack of a hook
adding quux/file.py revisions
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
- listing keys for "phases"
- try to push obsolete markers to remote
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -141,7 +141,6 @@ Extension disabled for lack of acl.sources
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -177,12 +176,10 @@ Extension disabled for lack of acl.sources
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
acl: changes have source "push" - skipping
- listing keys for "phases"
- try to push obsolete markers to remote
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -203,7 +200,6 @@ No [acl.allow]/[acl.deny]
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -238,23 +234,20 @@ No [acl.allow]/[acl.deny]
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow not enabled
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset 911600dab2ae
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -275,7 +268,6 @@ Empty [acl.allow]
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -310,16 +302,16 @@ Empty [acl.allow]
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 0 entries for user fred
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
+ acl: user fred not allowed on foo/file.txt
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset ef1ea85a6374
transaction abort!
rollback completed
- abort: acl: user "fred" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
+ abort: acl: access denied for changeset ef1ea85a6374
no rollback information available
0:6675d58eff77
@@ -341,7 +333,6 @@ fred is allowed inside foo/
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -376,20 +367,20 @@ fred is allowed inside foo/
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user fred
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ acl: user fred not allowed on quux/file.py
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset 911600dab2ae
transaction abort!
rollback completed
- abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ abort: acl: access denied for changeset 911600dab2ae
no rollback information available
0:6675d58eff77
@@ -412,7 +403,6 @@ Empty [acl.deny]
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -447,16 +437,16 @@ Empty [acl.deny]
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "barney"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 0 entries for user barney
acl: acl.deny enabled, 0 entries for user barney
acl: branch access granted: "ef1ea85a6374" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
+ acl: user barney not allowed on foo/file.txt
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset ef1ea85a6374
transaction abort!
rollback completed
- abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
+ abort: acl: access denied for changeset ef1ea85a6374
no rollback information available
0:6675d58eff77
@@ -480,7 +470,6 @@ fred is allowed inside foo/, but not foo/bar/ (case matters)
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -515,20 +504,20 @@ fred is allowed inside foo/, but not foo/bar/ (case matters)
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user fred
acl: acl.deny enabled, 1 entries for user fred
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ acl: user fred not allowed on quux/file.py
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset 911600dab2ae
transaction abort!
rollback completed
- abort: acl: user "fred" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ abort: acl: access denied for changeset 911600dab2ae
no rollback information available
0:6675d58eff77
@@ -553,7 +542,6 @@ fred is allowed inside foo/, but not foo/Bar/
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -588,18 +576,18 @@ fred is allowed inside foo/, but not foo/Bar/
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user fred
acl: acl.deny enabled, 2 entries for user fred
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
+ acl: user fred denied on foo/Bar/file.txt
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset f9cafe1212c8
transaction abort!
rollback completed
- abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
+ abort: acl: access denied for changeset f9cafe1212c8
no rollback information available
0:6675d58eff77
@@ -623,7 +611,6 @@ fred is allowed inside foo/, but not foo/Bar/
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -658,16 +645,16 @@ fred is allowed inside foo/, but not foo/Bar/
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "barney"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 0 entries for user barney
acl: acl.deny enabled, 0 entries for user barney
acl: branch access granted: "ef1ea85a6374" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
+ acl: user barney not allowed on foo/file.txt
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset ef1ea85a6374
transaction abort!
rollback completed
- abort: acl: user "barney" not allowed on "foo/file.txt" (changeset "ef1ea85a6374")
+ abort: acl: access denied for changeset ef1ea85a6374
no rollback information available
0:6675d58eff77
@@ -695,7 +682,6 @@ barney is allowed everywhere
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -730,23 +716,20 @@ barney is allowed everywhere
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "barney"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user barney
acl: acl.deny enabled, 0 entries for user barney
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset 911600dab2ae
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -774,7 +757,6 @@ wilma can change files with a .txt extension
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -809,20 +791,20 @@ wilma can change files with a .txt extension
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "wilma"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user wilma
acl: acl.deny enabled, 0 entries for user wilma
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ acl: user wilma not allowed on quux/file.py
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset 911600dab2ae
transaction abort!
rollback completed
- abort: acl: user "wilma" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ abort: acl: access denied for changeset 911600dab2ae
no rollback information available
0:6675d58eff77
@@ -853,7 +835,6 @@ file specified by acl.config does not exist
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -888,11 +869,10 @@ file specified by acl.config does not exist
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "barney"
- error: pretxnchangegroup.acl hook raised an exception: [Errno 2] *: '../acl.config' (glob)
+ error: pretxnchangegroup.acl hook raised an exception: [Errno 2] No such file or directory: '../acl.config'
transaction abort!
rollback completed
- abort: *: ../acl.config (glob)
+ abort: No such file or directory: ../acl.config
no rollback information available
0:6675d58eff77
@@ -927,7 +907,6 @@ betty is allowed inside foo/ by a acl.config file
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -962,20 +941,20 @@ betty is allowed inside foo/ by a acl.config file
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "betty"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user betty
acl: acl.deny enabled, 0 entries for user betty
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ acl: user betty not allowed on quux/file.py
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset 911600dab2ae
transaction abort!
rollback completed
- abort: acl: user "betty" not allowed on "quux/file.py" (changeset "911600dab2ae")
+ abort: acl: access denied for changeset 911600dab2ae
no rollback information available
0:6675d58eff77
@@ -1012,7 +991,6 @@ acl.config can set only [acl.allow]/[acl.deny]
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1047,23 +1025,20 @@ acl.config can set only [acl.allow]/[acl.deny]
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "barney"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user barney
acl: acl.deny enabled, 0 entries for user barney
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset 911600dab2ae
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -1092,7 +1067,6 @@ fred is always allowed
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1127,23 +1101,20 @@ fred is always allowed
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user fred
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset 911600dab2ae
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -1168,7 +1139,6 @@ no one is allowed inside foo/Bar/
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1203,18 +1173,18 @@ no one is allowed inside foo/Bar/
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow enabled, 1 entries for user fred
acl: acl.deny enabled, 1 entries for user fred
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
+ acl: user fred denied on foo/Bar/file.txt
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset f9cafe1212c8
transaction abort!
rollback completed
- abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
+ abort: acl: access denied for changeset f9cafe1212c8
no rollback information available
0:6675d58eff77
@@ -1243,7 +1213,6 @@ OS-level groups
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1278,24 +1247,21 @@ OS-level groups
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: "group1" not defined in [acl.groups]
acl: acl.allow enabled, 1 entries for user fred
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset 911600dab2ae
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 0 (undo push)
+ working directory now based on revision 0
0:6675d58eff77
@@ -1320,7 +1286,6 @@ OS-level groups
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
3 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1355,7 +1320,6 @@ OS-level groups
files: 3/3 chunks (100.00%)
added 3 changesets with 3 changes to 3 files
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "fred"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: "group1" not defined in [acl.groups]
@@ -1363,12 +1327,13 @@ OS-level groups
acl: "group1" not defined in [acl.groups]
acl: acl.deny enabled, 1 entries for user fred
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- error: pretxnchangegroup.acl hook failed: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
+ acl: user fred denied on foo/Bar/file.txt
+ error: pretxnchangegroup.acl hook failed: acl: access denied for changeset f9cafe1212c8
transaction abort!
rollback completed
- abort: acl: user "fred" denied on "foo/Bar/file.txt" (changeset "f9cafe1212c8")
+ abort: acl: access denied for changeset f9cafe1212c8
no rollback information available
0:6675d58eff77
@@ -1396,7 +1361,6 @@ Branch acl tests setup
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch foobar
marked working directory as branch foobar
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -m 'create foobar'
$ echo 'foo contents' > abc.txt
$ hg add abc.txt
@@ -1434,7 +1398,6 @@ No branch acls specified
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1478,25 +1441,22 @@ No branch acls specified
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "astro"
acl: acl.allow.branches not enabled
acl: acl.deny.branches not enabled
acl: acl.allow not enabled
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
+ acl: allowing changeset 911600dab2ae
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
- acl: path access granted: "e8fc755d4d82"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset e8fc755d4d82
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 2 (undo push)
+ working directory now based on revision 2
2:fb35475503ef
@@ -1518,7 +1478,6 @@ Branch acl deny test
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1562,17 +1521,16 @@ Branch acl deny test
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "astro"
acl: acl.allow.branches not enabled
acl: acl.deny.branches enabled, 1 entries for user astro
acl: acl.allow not enabled
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
+ acl: allowing changeset 911600dab2ae
error: pretxnchangegroup.acl hook failed: acl: user "astro" denied on branch "foobar" (changeset "e8fc755d4d82")
transaction abort!
rollback completed
@@ -1597,7 +1555,6 @@ Branch acl empty allow test
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1641,7 +1598,6 @@ Branch acl empty allow test
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "astro"
acl: acl.allow.branches enabled, 0 entries for user astro
acl: acl.deny.branches not enabled
acl: acl.allow not enabled
@@ -1672,7 +1628,6 @@ Branch acl allow other
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1716,7 +1671,6 @@ Branch acl allow other
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "astro"
acl: acl.allow.branches enabled, 0 entries for user astro
acl: acl.deny.branches not enabled
acl: acl.allow not enabled
@@ -1741,7 +1695,6 @@ Branch acl allow other
query 1; heads
searching for changes
all remote heads known locally
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1785,25 +1738,22 @@ Branch acl allow other
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "george"
acl: acl.allow.branches enabled, 1 entries for user george
acl: acl.deny.branches not enabled
acl: acl.allow not enabled
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
+ acl: allowing changeset 911600dab2ae
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
- acl: path access granted: "e8fc755d4d82"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset e8fc755d4d82
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 2 (undo push)
+ working directory now based on revision 2
2:fb35475503ef
@@ -1830,7 +1780,6 @@ push foobar into the remote
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1874,25 +1823,22 @@ push foobar into the remote
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "george"
acl: acl.allow.branches enabled, 1 entries for user george
acl: acl.deny.branches not enabled
acl: acl.allow not enabled
acl: acl.deny not enabled
acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
+ acl: allowing changeset ef1ea85a6374
acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
+ acl: allowing changeset f9cafe1212c8
acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
+ acl: allowing changeset 911600dab2ae
acl: branch access granted: "e8fc755d4d82" on branch "foobar"
- acl: path access granted: "e8fc755d4d82"
- listing keys for "phases"
- try to push obsolete markers to remote
+ acl: allowing changeset e8fc755d4d82
updating the branch cache
checking for updated bookmarks
- listing keys for "bookmarks"
repository tip rolled back to revision 2 (undo push)
+ working directory now based on revision 2
2:fb35475503ef
Branch acl conflicting deny
@@ -1918,7 +1864,6 @@ Branch acl conflicting deny
searching for changes
all remote heads known locally
invalidating branch cache (tip differs)
- listing keys for "bookmarks"
4 changesets found
list of changesets:
ef1ea85a6374b77d6da9dcda9541f498f2d17df7
@@ -1962,7 +1907,6 @@ Branch acl conflicting deny
files: 4/4 chunks (100.00%)
added 4 changesets with 4 changes to 4 files (+1 heads)
calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "george"
acl: acl.allow.branches not enabled
acl: acl.deny.branches enabled, 1 entries for user george
acl: acl.allow not enabled
@@ -1974,160 +1918,3 @@ Branch acl conflicting deny
no rollback information available
2:fb35475503ef
-User 'astro' must not be denied
-
- $ init_config
- $ echo "[acl.deny.branches]" >> $config
- $ echo "default = !astro" >> $config
- $ do_push astro
- Pushing as user astro
- hgrc = """
- [acl]
- sources = push
- [extensions]
- [acl.deny.branches]
- default = !astro
- """
- pushing to ../b
- query 1; heads
- searching for changes
- all remote heads known locally
- listing keys for "bookmarks"
- 4 changesets found
- list of changesets:
- ef1ea85a6374b77d6da9dcda9541f498f2d17df7
- f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
- 911600dab2ae7a9baff75958b84fe606851ce955
- e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
- adding changesets
- bundling: 1/4 changesets (25.00%)
- bundling: 2/4 changesets (50.00%)
- bundling: 3/4 changesets (75.00%)
- bundling: 4/4 changesets (100.00%)
- bundling: 1/4 manifests (25.00%)
- bundling: 2/4 manifests (50.00%)
- bundling: 3/4 manifests (75.00%)
- bundling: 4/4 manifests (100.00%)
- bundling: abc.txt 1/4 files (25.00%)
- bundling: foo/Bar/file.txt 2/4 files (50.00%)
- bundling: foo/file.txt 3/4 files (75.00%)
- bundling: quux/file.py 4/4 files (100.00%)
- changesets: 1 chunks
- add changeset ef1ea85a6374
- changesets: 2 chunks
- add changeset f9cafe1212c8
- changesets: 3 chunks
- add changeset 911600dab2ae
- changesets: 4 chunks
- add changeset e8fc755d4d82
- adding manifests
- manifests: 1/4 chunks (25.00%)
- manifests: 2/4 chunks (50.00%)
- manifests: 3/4 chunks (75.00%)
- manifests: 4/4 chunks (100.00%)
- adding file changes
- adding abc.txt revisions
- files: 1/4 chunks (25.00%)
- adding foo/Bar/file.txt revisions
- files: 2/4 chunks (50.00%)
- adding foo/file.txt revisions
- files: 3/4 chunks (75.00%)
- adding quux/file.py revisions
- files: 4/4 chunks (100.00%)
- added 4 changesets with 4 changes to 4 files (+1 heads)
- calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "astro"
- acl: acl.allow.branches not enabled
- acl: acl.deny.branches enabled, 0 entries for user astro
- acl: acl.allow not enabled
- acl: acl.deny not enabled
- acl: branch access granted: "ef1ea85a6374" on branch "default"
- acl: path access granted: "ef1ea85a6374"
- acl: branch access granted: "f9cafe1212c8" on branch "default"
- acl: path access granted: "f9cafe1212c8"
- acl: branch access granted: "911600dab2ae" on branch "default"
- acl: path access granted: "911600dab2ae"
- acl: branch access granted: "e8fc755d4d82" on branch "foobar"
- acl: path access granted: "e8fc755d4d82"
- listing keys for "phases"
- try to push obsolete markers to remote
- updating the branch cache
- checking for updated bookmarks
- listing keys for "bookmarks"
- repository tip rolled back to revision 2 (undo push)
- 2:fb35475503ef
-
-
-Non-astro users must be denied
-
- $ do_push george
- Pushing as user george
- hgrc = """
- [acl]
- sources = push
- [extensions]
- [acl.deny.branches]
- default = !astro
- """
- pushing to ../b
- query 1; heads
- searching for changes
- all remote heads known locally
- invalidating branch cache (tip differs)
- listing keys for "bookmarks"
- 4 changesets found
- list of changesets:
- ef1ea85a6374b77d6da9dcda9541f498f2d17df7
- f9cafe1212c8c6fa1120d14a556e18cc44ff8bdd
- 911600dab2ae7a9baff75958b84fe606851ce955
- e8fc755d4d8217ee5b0c2bb41558c40d43b92c01
- adding changesets
- bundling: 1/4 changesets (25.00%)
- bundling: 2/4 changesets (50.00%)
- bundling: 3/4 changesets (75.00%)
- bundling: 4/4 changesets (100.00%)
- bundling: 1/4 manifests (25.00%)
- bundling: 2/4 manifests (50.00%)
- bundling: 3/4 manifests (75.00%)
- bundling: 4/4 manifests (100.00%)
- bundling: abc.txt 1/4 files (25.00%)
- bundling: foo/Bar/file.txt 2/4 files (50.00%)
- bundling: foo/file.txt 3/4 files (75.00%)
- bundling: quux/file.py 4/4 files (100.00%)
- changesets: 1 chunks
- add changeset ef1ea85a6374
- changesets: 2 chunks
- add changeset f9cafe1212c8
- changesets: 3 chunks
- add changeset 911600dab2ae
- changesets: 4 chunks
- add changeset e8fc755d4d82
- adding manifests
- manifests: 1/4 chunks (25.00%)
- manifests: 2/4 chunks (50.00%)
- manifests: 3/4 chunks (75.00%)
- manifests: 4/4 chunks (100.00%)
- adding file changes
- adding abc.txt revisions
- files: 1/4 chunks (25.00%)
- adding foo/Bar/file.txt revisions
- files: 2/4 chunks (50.00%)
- adding foo/file.txt revisions
- files: 3/4 chunks (75.00%)
- adding quux/file.py revisions
- files: 4/4 chunks (100.00%)
- added 4 changesets with 4 changes to 4 files (+1 heads)
- calling hook pretxnchangegroup.acl: hgext.acl.hook
- acl: checking access for user "george"
- acl: acl.allow.branches not enabled
- acl: acl.deny.branches enabled, 1 entries for user george
- acl: acl.allow not enabled
- acl: acl.deny not enabled
- error: pretxnchangegroup.acl hook failed: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
- transaction abort!
- rollback completed
- abort: acl: user "george" denied on branch "default" (changeset "ef1ea85a6374")
- no rollback information available
- 2:fb35475503ef
-
-
diff --git a/tests/test-add.t b/tests/test-add.t
index 85a9b4e..d0eeca7 100644
--- a/tests/test-add.t
+++ b/tests/test-add.t
@@ -33,7 +33,6 @@ should fail
A a
A b
-#if no-windows
$ echo foo > con.xml
$ hg --config ui.portablefilenames=jump add con.xml
abort: ui.portablefilenames value is invalid ('jump')
@@ -51,11 +50,6 @@ should fail
A a
A b
A con.xml
- $ hg forget con.xml
- $ rm con.xml
-#endif
-
-#if eol-in-paths
$ echo bla > 'hello:world'
$ hg --config ui.portablefilenames=abort add
adding hello:world
@@ -64,14 +58,15 @@ should fail
$ hg st
A a
A b
+ A con.xml
? hello:world
$ hg --config ui.portablefilenames=ignore add
adding hello:world
$ hg st
A a
A b
+ A con.xml
A hello:world
-#endif
$ hg ci -m 0 --traceback
@@ -91,7 +86,7 @@ should fail
$ hg merge
merging a
warning: conflicts during merge.
- merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -126,15 +121,14 @@ Issue683: peculiarity with hg revert of an removed then added file
? a.orig
$ hg add c && echo "unexpected addition of missing file"
- c: * (glob)
+ c: No such file or directory
[1]
$ echo c > c
$ hg add d c && echo "unexpected addition of missing file"
- d: * (glob)
+ d: No such file or directory
[1]
$ hg st
M a
A c
? a.orig
- $ cd ..
diff --git a/tests/test-addremove-similar.t b/tests/test-addremove-similar.t
index 0da9c69..edce376 100644
--- a/tests/test-addremove-similar.t
+++ b/tests/test-addremove-similar.t
@@ -81,7 +81,7 @@ Issue1527: repeated addremove causes util.Abort
$ hg addremove -s80
removing d/a
adding d/b
- recording removal of d/a as rename to d/b (100% similar) (glob)
+ recording removal of d/a as rename to d/b (100% similar)
$ hg debugstate
r 0 0 1970-01-01 00:00:00 d/a
a 0 -1 unset d/b
@@ -91,12 +91,10 @@ Issue1527: repeated addremove causes util.Abort
no copies found here (since the target isn't in d
$ hg addremove -s80 d
- removing d/b (glob)
+ removing d/b
copies here
$ hg addremove -s80
adding c
- recording removal of d/a as rename to c (100% similar) (glob)
-
- $ cd ..
+ recording removal of d/a as rename to c (100% similar)
diff --git a/tests/test-addremove.t b/tests/test-addremove.t
index 45be3f4..e6730a0 100644
--- a/tests/test-addremove.t
+++ b/tests/test-addremove.t
@@ -10,16 +10,19 @@
foo
committed changeset 0:6f7f953567a2
$ cd dir/
- $ touch ../foo_2 bar_2
+ $ touch ../foo_2 bar_2 con.xml
$ hg -v addremove
adding dir/bar_2
+ adding dir/con.xml
adding foo_2
+ warning: filename contains 'con', which is reserved on Windows: 'dir/con.xml'
$ hg -v commit -m "add 2"
dir/bar_2
+ dir/con.xml
foo_2
- committed changeset 1:e65414bf35c5
- $ cd ../..
+ committed changeset 1:6bb597da00f1
+ $ cd ..
$ hg init sim
$ cd sim
$ echo a > a
@@ -45,4 +48,3 @@
adding d
recording removal of a as rename to b (100% similar)
$ hg commit -mb
- $ cd ..
diff --git a/tests/test-alias.t b/tests/test-alias.t
index cf19233..eb9e8b3 100644
--- a/tests/test-alias.t
+++ b/tests/test-alias.t
@@ -4,10 +4,7 @@
> graphlog=
>
> [alias]
- > # should clobber ci but not commit (issue2993)
- > ci = version
> myinit = init
- > optionalrepo = showconfig alias.myinit
> cleanstatus = status -c
> unknown = bargle
> ambiguous = s
@@ -24,14 +21,14 @@
> dln = lognull --debug
> nousage = rollback
> put = export -r 0 -o "\$FOO/%R.diff"
- > blank = !printf '\n'
- > self = !printf '\$0\n'
- > echoall = !printf '\$@\n'
- > echo1 = !printf '\$1\n'
- > echo2 = !printf '\$2\n'
- > echo13 = !printf '\$1 \$3\n'
- > count = !hg log -r "\$@" --template=. | wc -c | sed -e 's/ //g'
- > mcount = !hg log \$@ --template=. | wc -c | sed -e 's/ //g'
+ > blank = !echo
+ > self = !echo '\$0'
+ > echo = !echo '\$@'
+ > echo1 = !echo '\$1'
+ > echo2 = !echo '\$2'
+ > echo13 = !echo '\$1' '\$3'
+ > count = !hg log -r '\$@' --template='.' | wc -c | sed -e 's/ //g'
+ > mcount = !hg log \$@ --template='.' | wc -c | sed -e 's/ //g'
> rt = root
> tglog = glog --template "{rev}:{node|short}: '{desc}' {branches}\n"
> idalias = id
@@ -39,10 +36,10 @@
> idaliasshell = !echo test
> parentsshell1 = !echo one
> parentsshell2 = !echo two
- > escaped1 = !printf 'test\$\$test\n'
- > escaped2 = !sh -c 'echo "HGFOO is \$\$HGFOO"'
- > escaped3 = !sh -c 'echo "\$1 is \$\$\$1"'
- > escaped4 = !printf '\$\$0 \$\$@\n'
+ > escaped1 = !echo 'test\$\$test'
+ > escaped2 = !echo "HGFOO is \$\$HGFOO"
+ > escaped3 = !echo "\$1 is \$\$\$1"
+ > escaped4 = !echo '\$\$0' '\$\$@'
>
> [defaults]
> mylog = -q
@@ -107,19 +104,8 @@ invalid options
$ hg help no--repository
error in definition for alias 'no--repository': --repository may only be given on the command line
-optional repository
-
-#if no-outer-repo
- $ hg optionalrepo
- init
-#endif
$ cd alias
- $ cat > .hg/hgrc <<EOF
- > [alias]
- > myinit = init -q
- > EOF
- $ hg optionalrepo
- init -q
+
no usage
@@ -127,7 +113,7 @@ no usage
no rollback information available
$ echo foo > foo
- $ hg commit -Amfoo
+ $ hg ci -Amfoo
adding foo
@@ -144,12 +130,6 @@ with opts and whitespace
positional arguments
- $ hg positional
- abort: too few arguments for command alias
- [255]
- $ hg positional a
- abort: too few arguments for command alias
- [255]
$ hg positional 'node|short' rev
0 e63c23eaa88a | 1970-01-01 00:00 +0000
@@ -200,11 +180,11 @@ simple shell aliases
$ hg self
self
- $ hg echoall
+ $ hg echo
- $ hg echoall foo
+ $ hg echo foo
foo
- $ hg echoall 'test $2' foo
+ $ hg echo 'test $2' foo
test $2 foo
$ hg echo1 foo bar baz
foo
@@ -215,7 +195,7 @@ simple shell aliases
$ hg echo2 foo
$ echo bar > bar
- $ hg commit -qA -m bar
+ $ hg ci -qA -m bar
$ hg count .
1
$ hg count 'branch(default)'
@@ -270,19 +250,19 @@ shell aliases with global options
0
$ hg --cwd .. count 'branch(default)'
2
- $ hg echoall --cwd ..
-
+ $ hg echo --cwd ..
+ --cwd ..
repo specific shell aliases
$ cat >> .hg/hgrc <<EOF
> [alias]
- > subalias = !echo sub
+ > subalias = !echo sub \$@
> EOF
$ cat >> ../.hg/hgrc <<EOF
> [alias]
- > mainalias = !echo main
+ > mainalias = !echo main \$@
> EOF
@@ -325,7 +305,7 @@ invalid arguments
$ hg rt foo
hg rt: invalid arguments
- hg rt
+ hg rt
alias for: hg root
@@ -340,24 +320,23 @@ invalid global arguments for normal commands, aliases, and shell aliases
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
[255]
@@ -367,24 +346,23 @@ invalid global arguments for normal commands, aliases, and shell aliases
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
[255]
@@ -394,35 +372,24 @@ invalid global arguments for normal commands, aliases, and shell aliases
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
[255]
-This should show id:
-
- $ hg --config alias.log='id' log
- 000000000000 tip
-
-This shouldn't:
-
- $ hg --config alias.log='id' history
-
- $ cd ../..
diff --git a/tests/test-annotate.t b/tests/test-annotate.t
index 85a0985..a72694f 100644
--- a/tests/test-annotate.t
+++ b/tests/test-annotate.t
@@ -2,8 +2,7 @@
init
- $ hg init repo
- $ cd repo
+ $ hg init
commit
@@ -254,69 +253,3 @@ missing file
$ hg ann nosuchfile
abort: nosuchfile: no such file in rev e9e6b4fa872f
[255]
-
-annotate file without '\n' on last line
-
- $ printf "" > c
- $ hg ci -A -m test -u nobody -d '1 0'
- adding c
- $ hg annotate c
- $ printf "a\nb" > c
- $ hg ci -m test
- $ hg annotate c
- [0-9]+: a (re)
- [0-9]+: b (re)
-
-Test annotate with whitespace options
-
- $ cd ..
- $ hg init repo-ws
- $ cd repo-ws
- $ cat > a <<EOF
- > aa
- >
- > b b
- > EOF
- $ hg ci -Am "adda"
- adding a
- $ cat > a <<EOF
- > a a
- >
- >
- > b b
- > EOF
- $ hg ci -m "changea"
-
-Annotate with no option
-
- $ hg annotate a
- 1: a a
- 0:
- 1:
- 1: b b
-
-Annotate with --ignore-space-change
-
- $ hg annotate --ignore-space-change a
- 1: a a
- 1:
- 0:
- 0: b b
-
-Annotate with --ignore-all-space
-
- $ hg annotate --ignore-all-space a
- 0: a a
- 0:
- 1:
- 0: b b
-
-Annotate with --ignore-blank-lines (similar to no options case)
-
- $ hg annotate --ignore-blank-lines a
- 1: a a
- 0:
- 1:
- 1: b b
-
- $ cd ..
diff --git a/tests/test-archive-symlinks.t b/tests/test-archive-symlinks.t
index a0f15b5..2f3420a 100644
--- a/tests/test-archive-symlinks.t
+++ b/tests/test-archive-symlinks.t
@@ -18,7 +18,7 @@ files
$ cd "$origdir"
$ cd archive
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> nothing
tar
@@ -26,7 +26,7 @@ tar
$ cd "$origdir"
$ tar xf archive.tar
$ cd tar
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> nothing
zip
@@ -34,7 +34,5 @@ zip
$ cd "$origdir"
$ unzip archive.zip > /dev/null
$ cd zip
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> nothing
-
- $ cd ..
diff --git a/tests/test-archive.t b/tests/test-archive.t
index 6da530f..78f7eb3 100644
--- a/tests/test-archive.t
+++ b/tests/test-archive.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
$ hg init test
$ cd test
$ echo foo>foo
@@ -20,10 +18,10 @@
> hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
> cat hg.pid >> $DAEMON_PIDS
> echo % $1 allowed should give 200
- > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$2" | head -n 1
+ > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$2" | head -n 1
> echo % $3 and $4 disallowed should both give 403
- > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$3" | head -n 1
- > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$4" | head -n 1
+ > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$3" | head -n 1
+ > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$4" | head -n 1
> "$TESTDIR/killdaemons.py"
> cat errors.log
> cp .hg/hgrc-base .hg/hgrc
@@ -56,7 +54,7 @@ check http return codes
invalid arch type should give 404
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.invalid" | head -n 1
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.invalid" | head -n 1
404 Unsupported archive type: None
$ TIP=`hg id -v | cut -f1 -d' '`
@@ -102,10 +100,7 @@ invalid arch type should give 404
test/baz/bletch
test/foo
- $ hg archive --debug -t tbz2 -X baz test.tar.bz2
- archiving: 0/2 files (0.00%)
- archiving: bar 1/2 files (50.00%)
- archiving: foo 2/2 files (100.00%)
+ $ hg archive -t tbz2 -X baz test.tar.bz2
$ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null
test/.hg_archival.txt
test/bar
@@ -224,7 +219,7 @@ enable progress extension:
> width = 60
> EOF
- $ hg archive ../with-progress 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg archive ../with-progress 2>&1 | $TESTDIR/filtercr.py
archiving [ ] 0/4
archiving [ ] 0/4
@@ -268,5 +263,3 @@ old file -- date clamped to 1980
*0*80*00:00*old/old (glob)
*-----* (glob)
\s*147\s+2 files (re)
-
- $ cd ..
diff --git a/tests/test-atomictempfile.py b/tests/test-atomictempfile.py
index 9ebd7c0..c897ba8 100644
--- a/tests/test-atomictempfile.py
+++ b/tests/test-atomictempfile.py
@@ -12,21 +12,22 @@ def test1_simple():
assert basename in glob.glob('.foo-*')
file.write('argh\n')
- file.close()
+ file.rename()
assert os.path.isfile('foo')
assert basename not in glob.glob('.foo-*')
print 'OK'
-# discard() removes the temp file without making the write permanent
-def test2_discard():
+# close() removes the temp file but does not make the write
+# permanent -- essentially discards your work (WTF?!)
+def test2_close():
if os.path.exists('foo'):
os.remove('foo')
file = atomictempfile('foo')
(dir, basename) = os.path.split(file._tempname)
file.write('yo\n')
- file.discard()
+ file.close()
assert not os.path.isfile('foo')
assert basename not in os.listdir('.')
@@ -44,5 +45,5 @@ def test3_oops():
if __name__ == '__main__':
test1_simple()
- test2_discard()
+ test2_close()
test3_oops()
diff --git a/tests/test-audit-path.t b/tests/test-audit-path.t
index d105e94..23d2478 100644
--- a/tests/test-audit-path.t
+++ b/tests/test-audit-path.t
@@ -1,40 +1,39 @@
$ hg init
-audit of .hg
+should fail
$ hg add .hg/00changelog.i
- abort: path contains illegal component: .hg/00changelog.i (glob)
+ abort: path contains illegal component: .hg/00changelog.i
[255]
-#if symlink
-
-Symlinks
-
$ mkdir a
$ echo a > a/a
$ hg ci -Ama
adding a/a
$ ln -s a b
$ echo b > a/b
+
+should fail
+
$ hg add b/b
- abort: path 'b/b' traverses symbolic link 'b' (glob)
+ abort: path 'b/b' traverses symbolic link 'b'
[255]
+
+should succeed
+
$ hg add b
should still fail - maybe
$ hg add b/b
- abort: path 'b/b' traverses symbolic link 'b' (glob)
+ abort: path 'b/b' traverses symbolic link 'b'
[255]
-#endif
-
-
unbundle tampered bundle
$ hg init target
$ cd target
- $ hg unbundle "$TESTDIR/bundles/tampered.hg"
+ $ hg unbundle $TESTDIR/bundles/tampered.hg
adding changesets
adding manifests
adding file changes
@@ -46,7 +45,7 @@ attack .hg/test
$ hg manifest -r0
.hg/test
$ hg update -Cr0
- abort: path contains illegal component: .hg/test (glob)
+ abort: path contains illegal component: .hg/test
[255]
attack foo/.hg/test
@@ -54,7 +53,7 @@ attack foo/.hg/test
$ hg manifest -r1
foo/.hg/test
$ hg update -Cr1
- abort: path 'foo/.hg/test' is inside nested repo 'foo' (glob)
+ abort: path 'foo/.hg/test' is inside nested repo 'foo'
[255]
attack back/test where back symlinks to ..
@@ -62,23 +61,16 @@ attack back/test where back symlinks to ..
$ hg manifest -r2
back
back/test
-#if symlink
$ hg update -Cr2
abort: path 'back/test' traverses symbolic link 'back'
[255]
-#else
-('back' will be a file and cause some other system specific error)
- $ hg update -Cr2
- abort: * (glob)
- [255]
-#endif
attack ../test
$ hg manifest -r3
../test
$ hg update -Cr3
- abort: path contains illegal component: ../test (glob)
+ abort: path contains illegal component: ../test
[255]
attack /tmp/test
@@ -86,7 +78,5 @@ attack /tmp/test
$ hg manifest -r4
/tmp/test
$ hg update -Cr4
- abort: *: $TESTTMP/target//tmp/test (glob)
+ abort: No such file or directory: $TESTTMP/target//tmp/test
[255]
-
- $ cd ..
diff --git a/tests/test-backout.t b/tests/test-backout.t
index c2404f5..7e47659 100644
--- a/tests/test-backout.t
+++ b/tests/test-backout.t
@@ -48,8 +48,8 @@ backout of backout is as if nothing happened
$ hg backout -d '3 0' --merge tip --tool=true
removing a
changeset 3:7f6d0f120113 backs out changeset 2:de31bdc76c0d
- $ test -f a
- [1]
+ $ cat a 2>/dev/null || echo cat: a: No such file or directory
+ cat: a: No such file or directory
across branch
@@ -117,8 +117,6 @@ check line 1 is back
line 2
line 3
- $ cd ..
-
backout should not back out subsequent changesets
$ hg init onecs
@@ -184,7 +182,7 @@ with --merge
backout of merge should fail
$ hg backout 4
- abort: cannot backout a merge changeset
+ abort: cannot backout a merge changeset without --parent
[255]
backout of merge with bad parent should fail
@@ -227,13 +225,11 @@ named branches
adding default
$ hg branch branch1
marked working directory as branch branch1
- (branches are permanent and global, did you want a bookmark?)
$ echo branch1 > file1
$ hg ci -d '1 0' -Am file1
adding file1
$ hg branch branch2
marked working directory as branch branch2
- (branches are permanent and global, did you want a bookmark?)
$ echo branch2 > file2
$ hg ci -d '2 0' -Am file2
adding file2
@@ -290,5 +286,3 @@ on branch1, so no file1 and file2:
$ hg st -A
C default
C file1
-
- $ cd ..
diff --git a/tests/test-bad-pull.t b/tests/test-bad-pull.t
index 7e32388..1b7b163 100644
--- a/tests/test-bad-pull.t
+++ b/tests/test-bad-pull.t
@@ -1,17 +1,9 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
-#if windows
- $ hg clone http://localhost:$HGPORT/ copy
- abort: * (glob)
- [255]
-#else
$ hg clone http://localhost:$HGPORT/ copy
abort: error: Connection refused
[255]
-#endif
- $ test -d copy
- [1]
+ $ test -d copy || echo copy: No such file or directory
+ copy: No such file or directory
$ cat > dumb.py <<EOF
> import BaseHTTPServer, SimpleHTTPServer, os, signal
@@ -19,15 +11,20 @@
> handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
> server_address = ('localhost', int(os.environ['HGPORT']))
> httpd = server_class(server_address, handler_class)
- > open("listening", "w")
- > httpd.handle_request()
+ > httpd.serve_forever()
+ > signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
> run()
> EOF
- $ python dumb.py 2> log &
- $ P=$!
- $ while [ ! -f listening ]; do sleep 0; done
- $ hg clone http://localhost:$HGPORT/foo copy2
+ $ python dumb.py 2>/dev/null &
+ $ echo $! >> $DAEMON_PIDS
+
+give the server some time to start running
+
+ $ sleep 1
+
+ $ hg clone http://localhost:$HGPORT/foo copy2 2>&1
abort: HTTP Error 404: * (glob)
[255]
- $ wait $P
+
+ $ kill $!
diff --git a/tests/test-basic.t b/tests/test-basic.t
index 4d350a5..6890994 100644
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -53,5 +53,3 @@ Verify should succeed:
1 files, 1 changesets, 1 total revisions
At the end...
-
- $ cd ..
diff --git a/tests/test-bdiff.py b/tests/test-bdiff.py
index c17dfb0..254246d 100644
--- a/tests/test-bdiff.py
+++ b/tests/test-bdiff.py
@@ -50,17 +50,3 @@ showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\nx\n\nz\n")
showdiff("x\n\nx\n\nx\n\nx\n\nz\n", "x\n\nx\n\ny\n\nx\n\ny\n\nx\n\nz\n")
print "done"
-
-def testfixws(a, b, allws):
- c = bdiff.fixws(a, allws)
- if c != b:
- print "*** fixws", repr(a), repr(b), allws
- print "got:"
- print repr(c)
-
-testfixws(" \ta\r b\t\n", "ab\n", 1)
-testfixws(" \ta\r b\t\n", " a b\n", 0)
-testfixws("", "", 1)
-testfixws("", "", 0)
-
-print "done"
diff --git a/tests/test-bdiff.py.out b/tests/test-bdiff.py.out
index 9c00d05..8590fab 100644
--- a/tests/test-bdiff.py.out
+++ b/tests/test-bdiff.py.out
@@ -21,4 +21,3 @@
6 6 'y\n\n'
9 9 'y\n\n'
done
-done
diff --git a/tests/test-bheads.t b/tests/test-bheads.t
index 2093813..f4cc3c5 100644
--- a/tests/test-bheads.t
+++ b/tests/test-bheads.t
@@ -20,7 +20,6 @@
$ hg add a
$ hg branch a
marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -m "Adding a branch"
$ heads
1: Adding a branch (a)
@@ -37,7 +36,6 @@
$ hg add b
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -m "Adding b branch"
$ heads
2: Adding b branch (b)
@@ -119,7 +117,6 @@
$ hg add c
$ hg branch c
marked working directory as branch c
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -m "Adding c branch"
$ heads
7: Adding c branch (c)
@@ -290,7 +287,6 @@ Init: no msg
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo 1 > b
$ hg ci -Am "b2: Initial root for branch b"
adding b
@@ -302,7 +298,6 @@ Case NN: msg
$ hg up -q null
$ hg branch -f b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo 1 > bb
$ hg ci -Am "b4 (NN): new topo root for branch b"
adding bb
@@ -317,7 +312,6 @@ Case BN: msg
$ hg branch -f default
marked working directory as branch default
- (branches are permanent and global, did you want a bookmark?)
$ echo 1 > aa
$ hg ci -Am "a6 (BN): new branch root"
adding aa
@@ -337,7 +331,6 @@ Case BB: msg
$ hg merge -q 3
$ hg branch -f default
marked working directory as branch default
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m "a8 (BB): weird new branch root"
created new head
@@ -372,4 +365,3 @@ Case HH: no msg
$ hg merge -q 3
$ hg ci -m "b12 (HH): merging two heads"
- $ cd ..
diff --git a/tests/test-bisect.t b/tests/test-bisect.t
index 4e8b771..b582817 100644
--- a/tests/test-bisect.t
+++ b/tests/test-bisect.t
@@ -222,7 +222,6 @@ mark revsets instead of single revs
Testing changeset 12:1941b52820a5 (23 changesets remaining, ~4 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat .hg/bisect.state
- current 1941b52820a544549596820a8ae006842b0e2c64
skip 9d7d07bc967ca98ad0600c24953fd289ad5fa991
skip ce8f0998e922c179e80819d5066fbe46e2998784
skip e7fa0811edb063f6319531f0d0a865882138e180
@@ -378,7 +377,7 @@ reproduce AssertionError, issue1445
date: Thu Jan 01 00:00:06 1970 +0000
summary: msg 6
- $ hg log -r "bisect(good)"
+ $ hg log -r "bisected(good)"
changeset: 0:b99c7b9c8e11
user: test
date: Thu Jan 01 00:00:00 1970 +0000
@@ -389,19 +388,13 @@ reproduce AssertionError, issue1445
date: Thu Jan 01 00:00:05 1970 +0000
summary: msg 5
- $ hg log -r "bisect(bad)"
+ $ hg log -r "bisected(bad)"
changeset: 6:a3d5c6fdf0d3
user: test
date: Thu Jan 01 00:00:06 1970 +0000
summary: msg 6
- $ hg log -r "bisect(current)"
- changeset: 5:7874a09ea728
- user: test
- date: Thu Jan 01 00:00:05 1970 +0000
- summary: msg 5
-
- $ hg log -r "bisect(skip)"
+ $ hg log -r "bisected(skip)"
changeset: 1:5cd978ea5149
user: test
date: Thu Jan 01 00:00:01 1970 +0000
@@ -423,15 +416,6 @@ reproduce AssertionError, issue1445
summary: msg 4
-test legacy bisected() keyword
-
- $ hg log -r "bisected(bad)"
- changeset: 6:a3d5c6fdf0d3
- user: test
- date: Thu Jan 01 00:00:06 1970 +0000
- summary: msg 6
-
-
$ set +e
test invalid command
@@ -459,52 +443,15 @@ test bisecting command
$ hg bisect --bad 0
Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg bisect --command "python \"$TESTTMP/script.py\" and some parameters"
- changeset 15:e7fa0811edb0: good
- changeset 7:03750880c6b5: good
- changeset 3:b53bea5e2fcb: bad
- changeset 5:7874a09ea728: bad
- changeset 6:a3d5c6fdf0d3: good
+ $ hg bisect --command "'`pwd`/script.py' and some parameters"
+ Changeset 15:e7fa0811edb0: good
+ Changeset 7:03750880c6b5: good
+ Changeset 3:b53bea5e2fcb: bad
+ Changeset 5:7874a09ea728: bad
+ Changeset 6:a3d5c6fdf0d3: good
The first good revision is:
changeset: 6:a3d5c6fdf0d3
user: test
date: Thu Jan 01 00:00:06 1970 +0000
summary: msg 6
-
-
-test bisecting via a command without updating the working dir, and
-ensure that the bisect state file is updated before running a test
-command
-
- $ hg update null
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ cat > script.sh <<'EOF'
- > #!/bin/sh
- > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127)
- > current="`hg log -r \"bisect(current)\" --template {node}`"
- > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127)
- > rev="`hg log -r $HG_NODE --template {rev}`"
- > test "$rev" -ge 6
- > EOF
- $ chmod +x script.sh
- $ hg bisect -r
- $ hg bisect --good tip --noupdate
- $ hg bisect --bad 0 --noupdate
- Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
- $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" --noupdate
- changeset 15:e7fa0811edb0: good
- changeset 7:03750880c6b5: good
- changeset 3:b53bea5e2fcb: bad
- changeset 5:7874a09ea728: bad
- changeset 6:a3d5c6fdf0d3: good
- The first good revision is:
- changeset: 6:a3d5c6fdf0d3
- user: test
- date: Thu Jan 01 00:00:06 1970 +0000
- summary: msg 6
-
-
-ensure that we still don't have a working dir
-
- $ hg parents
diff --git a/tests/test-bisect2.t b/tests/test-bisect2.t
index 5414df7..892581a 100644
--- a/tests/test-bisect2.t
+++ b/tests/test-bisect2.t
@@ -252,25 +252,6 @@ complex bisect test 1 # first bad rev is 9
$ hg bisect -b 17 # -> update to rev 6
Testing changeset 6:a214d5d3811a (15 changesets remaining, ~3 tests)
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 17:228c06deef46
- $ hg log -q -r 'bisect(untested)'
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- $ hg log -q -r 'bisect(ignored)'
$ hg bisect -g # -> update to rev 13
Testing changeset 13:b0a32c86eb31 (9 changesets remaining, ~3 tests)
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -290,58 +271,6 @@ complex bisect test 1 # first bad rev is 9
date: Thu Jan 01 00:00:09 1970 +0000
summary: 9
- $ hg log -q -r 'bisect(range)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
- $ hg log -q -r 'bisect(untested)'
- 11:82ca6f06eccd
- 12:9f259202bbe7
- $ hg log -q -r 'bisect(goods)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- $ hg log -q -r 'bisect(bads)'
- 9:3c77083deb4a
- 10:429fcd26f52d
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
complex bisect test 2 # first good rev is 13
@@ -353,31 +282,9 @@ complex bisect test 2 # first good rev is 13
$ hg bisect -s # -> update to rev 10
Testing changeset 10:429fcd26f52d (13 changesets remaining, ~3 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 6:a214d5d3811a
- 18:d42e18c7bc9b
$ hg bisect -b # -> update to rev 12
Testing changeset 12:9f259202bbe7 (5 changesets remaining, ~2 tests)
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 18:d42e18c7bc9b
- $ hg log -q -r 'bisect(untested)'
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
$ hg bisect -b # -> update to rev 13
Testing changeset 13:b0a32c86eb31 (3 changesets remaining, ~1 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -388,21 +295,6 @@ complex bisect test 2 # first good rev is 13
date: Thu Jan 01 00:00:13 1970 +0000
summary: 13
- $ hg log -q -r 'bisect(range)'
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 18:d42e18c7bc9b
complex bisect test 3
@@ -414,11 +306,6 @@ first bad rev is 15
$ hg bisect -b 16 # -> update to rev 6
Testing changeset 6:a214d5d3811a (13 changesets remaining, ~3 tests)
2 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 16:609d82a7ebae
- 17:228c06deef46
$ hg bisect -g # -> update to rev 13
Testing changeset 13:b0a32c86eb31 (8 changesets remaining, ~3 tests)
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -428,25 +315,12 @@ first bad rev is 15
$ hg bisect -s # -> update to rev 12
Testing changeset 12:9f259202bbe7 (8 changesets remaining, ~3 tests)
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 10:429fcd26f52d
- 13:b0a32c86eb31
- 16:609d82a7ebae
- 17:228c06deef46
$ hg bisect -g # -> update to rev 9
Testing changeset 9:3c77083deb4a (5 changesets remaining, ~2 tests)
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg bisect -s # -> update to rev 15
Testing changeset 15:857b178a7cf3 (5 changesets remaining, ~2 tests)
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(ignored)'
$ hg bisect -b
Due to skipped revisions, the first bad revision could be any of:
changeset: 9:3c77083deb4a
@@ -473,22 +347,6 @@ first bad rev is 15
date: Thu Jan 01 00:00:15 1970 +0000
summary: merge 10,13
- $ hg log -q -r 'bisect(range)'
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- $ hg log -q -r 'bisect(ignored)'
complex bisect test 4
@@ -506,40 +364,9 @@ first good revision is 17
$ hg bisect -b # -> update to rev 15
Testing changeset 15:857b178a7cf3 (3 changesets remaining, ~1 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 17:228c06deef46
$ hg bisect -s # -> update to rev 16
Testing changeset 16:609d82a7ebae (3 changesets remaining, ~1 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 17:228c06deef46
$ hg bisect -s
Due to skipped revisions, the first good revision could be any of:
changeset: 15:857b178a7cf3
@@ -559,33 +386,6 @@ first good revision is 17
date: Thu Jan 01 00:00:17 1970 +0000
summary: 17
- $ hg log -q -r 'bisect(range)'
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
test unrelated revs:
@@ -594,15 +394,6 @@ test unrelated revs:
$ hg bisect -g 14
abort: starting revisions are not directly related
[255]
- $ hg log -q -r 'bisect(range)'
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 7:50c76098bbf2
- 14:faa450606157
$ hg bisect --reset
end at merge: 17 bad, 11 good (but 9 is first bad)
@@ -612,14 +403,6 @@ end at merge: 17 bad, 11 good (but 9 is first bad)
$ hg bisect -g 11
Testing changeset 13:b0a32c86eb31 (5 changesets remaining, ~2 tests)
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(ignored)'
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 9:3c77083deb4a
- 10:429fcd26f52d
$ hg bisect -g
Testing changeset 15:857b178a7cf3 (3 changesets remaining, ~1 tests)
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -635,69 +418,12 @@ end at merge: 17 bad, 11 good (but 9 is first bad)
Not all ancestors of this changeset have been checked.
Use bisect --extend to continue the bisection from
the common ancestor, dab8161ac8fc.
- $ hg log -q -r 'bisect(range)'
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 8:dab8161ac8fc
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
- $ hg log -q -r 'bisect(untested)'
- $ hg log -q -r 'bisect(ignored)'
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 9:3c77083deb4a
- 10:429fcd26f52d
$ hg bisect --extend
Extending search to changeset 8:dab8161ac8fc
2 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(untested)'
- $ hg log -q -r 'bisect(ignored)'
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- 9:3c77083deb4a
- 10:429fcd26f52d
$ hg bisect -g # dab8161ac8fc
Testing changeset 9:3c77083deb4a (3 changesets remaining, ~1 tests)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(untested)'
- 9:3c77083deb4a
- 10:429fcd26f52d
- $ hg log -q -r 'bisect(ignored)'
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- $ hg log -q -r 'bisect(goods)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 8:dab8161ac8fc
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- $ hg log -q -r 'bisect(bads)'
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
$ hg bisect -b
The first bad revision is:
changeset: 9:3c77083deb4a
@@ -705,91 +431,3 @@ end at merge: 17 bad, 11 good (but 9 is first bad)
date: Thu Jan 01 00:00:09 1970 +0000
summary: 9
- $ hg log -q -r 'bisect(range)'
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 8:dab8161ac8fc
- 9:3c77083deb4a
- 10:429fcd26f52d
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
- $ hg log -q -r 'bisect(untested)'
- $ hg log -q -r 'bisect(ignored)'
- 2:051e12f87bf1
- 3:0950834f0a9c
- 4:5c668c22234f
- 5:385a529b6670
- 6:a214d5d3811a
- $ hg log -q -r 'bisect(goods)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 8:dab8161ac8fc
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- $ hg log -q -r 'bisect(bads)'
- 9:3c77083deb4a
- 10:429fcd26f52d
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
-
-user adds irrelevant but consistent information (here: -g 2) to bisect state
-
- $ hg bisect -r
- $ hg bisect -b 13
- $ hg bisect -g 8
- Testing changeset 11:82ca6f06eccd (3 changesets remaining, ~1 tests)
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(untested)'
- 11:82ca6f06eccd
- 12:9f259202bbe7
- $ hg bisect -g 2
- Testing changeset 11:82ca6f06eccd (3 changesets remaining, ~1 tests)
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log -q -r 'bisect(untested)'
- 11:82ca6f06eccd
- 12:9f259202bbe7
- $ hg bisect -b
- The first bad revision is:
- changeset: 11:82ca6f06eccd
- parent: 8:dab8161ac8fc
- user: test
- date: Thu Jan 01 00:00:11 1970 +0000
- summary: 11
-
- $ hg log -q -r 'bisect(range)'
- 8:dab8161ac8fc
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- $ hg log -q -r 'bisect(pruned)'
- 0:33b1f9bc8bc5
- 1:4ca5088da217
- 2:051e12f87bf1
- 8:dab8161ac8fc
- 11:82ca6f06eccd
- 12:9f259202bbe7
- 13:b0a32c86eb31
- 14:faa450606157
- 15:857b178a7cf3
- 16:609d82a7ebae
- 17:228c06deef46
- 18:d42e18c7bc9b
- $ hg log -q -r 'bisect(untested)'
diff --git a/tests/test-bisect3.t b/tests/test-bisect3.t
deleted file mode 100644
index 5d62120..0000000
--- a/tests/test-bisect3.t
+++ /dev/null
@@ -1,232 +0,0 @@
-# Here we create a simple DAG which has just enough of the required
-# topology to test all the bisection status labels:
-#
-# 13--14
-# /
-# 0--1--2--3---------9--10--11--12
-# \ /
-# 4--5--6--7--8
-
-
- $ hg init
-
- $ echo '0' >a
- $ hg add a
- $ hg ci -u test -d '0 0' -m '0'
- $ echo '1' >a
- $ hg ci -u test -d '1 0' -m '1'
-
-branch 2-3
-
- $ echo '2' >b
- $ hg add b
- $ hg ci -u test -d '2 0' -m '2'
- $ echo '3' >b
- $ hg ci -u test -d '3 0' -m '3'
-
-branch 4-8
-
- $ hg up -r 1
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo '4' >c
- $ hg add c
- $ hg ci -u test -d '4 0' -m '4'
- created new head
- $ echo '5' >c
- $ hg ci -u test -d '5 0' -m '5'
- $ echo '6' >c
- $ hg ci -u test -d '6 0' -m '6'
- $ echo '7' >c
- $ hg ci -u test -d '7 0' -m '7'
- $ echo '8' >c
- $ hg ci -u test -d '8 0' -m '8'
-
-merge
-
- $ hg merge -r 3
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -u test -d '9 0' -m '9=8+3'
-
- $ echo '10' >a
- $ hg ci -u test -d '10 0' -m '10'
- $ echo '11' >a
- $ hg ci -u test -d '11 0' -m '11'
- $ echo '12' >a
- $ hg ci -u test -d '12 0' -m '12'
-
-unrelated branch
-
- $ hg up -r 3
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo '13' >d
- $ hg add d
- $ hg ci -u test -d '13 0' -m '13'
- created new head
- $ echo '14' >d
- $ hg ci -u test -d '14 0' -m '14'
-
-mark changesets
-
- $ hg bisect --reset
- $ hg bisect --good 4
- $ hg bisect --good 6
- $ hg bisect --bad 12
- Testing changeset 9:2197c557e14c (6 changesets remaining, ~2 tests)
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg bisect --bad 10
- Testing changeset 8:e74a86251f58 (4 changesets remaining, ~2 tests)
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg bisect --skip 7
- Testing changeset 8:e74a86251f58 (4 changesets remaining, ~2 tests)
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-test template
-
- $ hg log --template '{rev}:{node|short} {bisect}\n'
- 14:cbf2f3105bbf
- 13:e07efca37c43
- 12:98c6b56349c0 bad
- 11:03f491376e63 bad (implicit)
- 10:c012b15e2409 bad
- 9:2197c557e14c untested
- 8:e74a86251f58 untested
- 7:a5f87041c899 skipped
- 6:7d997bedcd8d good
- 5:2dd1875f1028 good (implicit)
- 4:2a1daef14cd4 good
- 3:8417d459b90c ignored
- 2:e1355ee1f23e ignored
- 1:ce7c85e06a9f good (implicit)
- 0:b4e73ffab476 good (implicit)
- $ hg log --template '{bisect|shortbisect} {rev}:{node|short}\n'
- 14:cbf2f3105bbf
- 13:e07efca37c43
- B 12:98c6b56349c0
- B 11:03f491376e63
- B 10:c012b15e2409
- U 9:2197c557e14c
- U 8:e74a86251f58
- S 7:a5f87041c899
- G 6:7d997bedcd8d
- G 5:2dd1875f1028
- G 4:2a1daef14cd4
- I 3:8417d459b90c
- I 2:e1355ee1f23e
- G 1:ce7c85e06a9f
- G 0:b4e73ffab476
-
-test style
-
- $ hg log --style bisect
- changeset: 14:cbf2f3105bbf
- bisect:
- tag: tip
- user: test
- date: Thu Jan 01 00:00:14 1970 +0000
- summary: 14
-
- changeset: 13:e07efca37c43
- bisect:
- parent: 3:8417d459b90c
- user: test
- date: Thu Jan 01 00:00:13 1970 +0000
- summary: 13
-
- changeset: 12:98c6b56349c0
- bisect: bad
- user: test
- date: Thu Jan 01 00:00:12 1970 +0000
- summary: 12
-
- changeset: 11:03f491376e63
- bisect: bad (implicit)
- user: test
- date: Thu Jan 01 00:00:11 1970 +0000
- summary: 11
-
- changeset: 10:c012b15e2409
- bisect: bad
- user: test
- date: Thu Jan 01 00:00:10 1970 +0000
- summary: 10
-
- changeset: 9:2197c557e14c
- bisect: untested
- parent: 8:e74a86251f58
- parent: 3:8417d459b90c
- user: test
- date: Thu Jan 01 00:00:09 1970 +0000
- summary: 9=8+3
-
- changeset: 8:e74a86251f58
- bisect: untested
- user: test
- date: Thu Jan 01 00:00:08 1970 +0000
- summary: 8
-
- changeset: 7:a5f87041c899
- bisect: skipped
- user: test
- date: Thu Jan 01 00:00:07 1970 +0000
- summary: 7
-
- changeset: 6:7d997bedcd8d
- bisect: good
- user: test
- date: Thu Jan 01 00:00:06 1970 +0000
- summary: 6
-
- changeset: 5:2dd1875f1028
- bisect: good (implicit)
- user: test
- date: Thu Jan 01 00:00:05 1970 +0000
- summary: 5
-
- changeset: 4:2a1daef14cd4
- bisect: good
- parent: 1:ce7c85e06a9f
- user: test
- date: Thu Jan 01 00:00:04 1970 +0000
- summary: 4
-
- changeset: 3:8417d459b90c
- bisect: ignored
- user: test
- date: Thu Jan 01 00:00:03 1970 +0000
- summary: 3
-
- changeset: 2:e1355ee1f23e
- bisect: ignored
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: 2
-
- changeset: 1:ce7c85e06a9f
- bisect: good (implicit)
- user: test
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: 1
-
- changeset: 0:b4e73ffab476
- bisect: good (implicit)
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 0
-
- $ hg log --quiet --style bisect
- 14:cbf2f3105bbf
- 13:e07efca37c43
- B 12:98c6b56349c0
- B 11:03f491376e63
- B 10:c012b15e2409
- U 9:2197c557e14c
- U 8:e74a86251f58
- S 7:a5f87041c899
- G 6:7d997bedcd8d
- G 5:2dd1875f1028
- G 4:2a1daef14cd4
- I 3:8417d459b90c
- I 2:e1355ee1f23e
- G 1:ce7c85e06a9f
- G 0:b4e73ffab476
diff --git a/tests/test-bookmarks-current.t b/tests/test-bookmarks-current.t
index cc31c3e..f96a805 100644
--- a/tests/test-bookmarks-current.t
+++ b/tests/test-bookmarks-current.t
@@ -125,46 +125,3 @@ deactivate current bookmark while renaming
$ hg bookmarks
X 0:719295282060
Z 0:719295282060
-
-bare update moves the active bookmark forward
-
- $ echo a > a
- $ hg ci -Am1
- adding a
- $ hg update X
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg bookmarks
- * X 0:719295282060
- Z 0:719295282060
- $ hg update
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- updating bookmark X
- $ hg bookmarks
- * X 1:cc586d725fbe
- Z 0:719295282060
-
-test deleting .hg/bookmarks.current when explicitly updating
-to a revision
-
- $ echo a >> b
- $ hg ci -m.
- $ hg up -q X
- $ test -f .hg/bookmarks.current
-
-try to update to it again to make sure we don't
-set and then unset it
-
- $ hg up -q X
- $ test -f .hg/bookmarks.current
-
- $ hg up -q 1
- $ test -f .hg/bookmarks.current
- [1]
-
-when a bookmark is active, hg up -r . is
-analogus to hg book -i <active bookmark>
-
- $ hg up -q X
- $ hg up -q .
- $ test -f .hg/bookmarks.current
- [1]
diff --git a/tests/test-bookmarks-merge.t b/tests/test-bookmarks-merge.t
deleted file mode 100644
index 96ed2c9..0000000
--- a/tests/test-bookmarks-merge.t
+++ /dev/null
@@ -1,93 +0,0 @@
-# init
-
- $ hg init
- $ echo a > a
- $ hg add a
- $ hg commit -m'a'
- $ echo b > b
- $ hg add b
- $ hg commit -m'b'
- $ hg up -C 0
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo c > c
- $ hg add c
- $ hg commit -m'c'
- created new head
-
-# test merging of diverged bookmarks
- $ hg bookmark -r 1 "c@diverge"
- $ hg bookmark -r 1 b
- $ hg bookmark c
- $ hg bookmarks
- b 1:d2ae7f538514
- * c 2:d36c0562f908
- c@diverge 1:d2ae7f538514
- $ hg merge "c@diverge"
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg commit -m'merge'
- $ hg bookmarks
- b 1:d2ae7f538514
- * c 3:b8f96cf4688b
-
- $ hg up -C 3
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo d > d
- $ hg add d
- $ hg commit -m'd'
-
- $ hg up -C 3
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo e > e
- $ hg add e
- $ hg commit -m'e'
- created new head
- $ hg up -C 5
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg bookmark e
- $ hg bookmarks
- b 1:d2ae7f538514
- c 3:b8f96cf4688b
- * e 5:26bee9c5bcf3
-
-# the picked side is bookmarked
-
- $ hg up -C 4
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg merge
- abort: heads are bookmarked - please merge with an explicit rev
- (run 'hg heads' to see all heads)
- [255]
-
-# our revision is bookmarked
-
- $ hg up -C e
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg merge
- abort: no matching bookmark to merge - please merge with an explicit rev or bookmark
- (run 'hg heads' to see all heads)
- [255]
-
-# merge bookmark heads
-
- $ hg up -C 4
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo f > f
- $ hg commit -Am "f"
- adding f
- $ hg up -C e
- 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ hg bookmarks -r 4 "e@diverged"
- $ hg bookmarks
- b 1:d2ae7f538514
- c 3:b8f96cf4688b
- * e 5:26bee9c5bcf3
- e@diverged 4:a0546fcfe0fb
- $ hg merge
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg commit -m'merge'
- $ hg bookmarks
- b 1:d2ae7f538514
- c 3:b8f96cf4688b
- * e 7:ca784329f0ba
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
index b62ca47..1670897 100644
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
initialize
$ hg init a
@@ -29,16 +27,11 @@ import bookmark by name
adding file changes
added 1 changesets with 1 changes to 1 files
updating bookmark Y
- adding remote bookmark X
- adding remote bookmark Z
(run 'hg update' to get a working copy)
$ hg bookmarks
- X 0:4e3505fd9583
Y 0:4e3505fd9583
- Z 0:4e3505fd9583
$ hg debugpushkey ../a namespaces
bookmarks
- phases
namespaces
$ hg debugpushkey ../a bookmarks
Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
@@ -51,7 +44,6 @@ import bookmark by name
$ hg bookmark
X 0:4e3505fd9583
Y 0:4e3505fd9583
- Z 0:4e3505fd9583
export bookmark by name
@@ -63,7 +55,6 @@ export bookmark by name
searching for changes
no changes found
exporting bookmark W
- [1]
$ hg -R ../a bookmarks
W -1:000000000000
X 0:4e3505fd9583
@@ -78,7 +69,6 @@ delete a remote bookmark
searching for changes
no changes found
deleting remote bookmark W
- [1]
push/pull name that doesn't exist
@@ -108,7 +98,6 @@ divergent bookmarks
$ cd ../b
$ hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- updating bookmark foobar
$ echo c2 > f2
$ hg ci -Am2
adding f2
@@ -116,27 +105,23 @@ divergent bookmarks
$ hg book
* X 1:9b140be10808
Y 0:4e3505fd9583
- Z 0:4e3505fd9583
foo -1:000000000000
- foobar 1:9b140be10808
+ foobar -1:000000000000
- $ hg pull --config paths.foo=../a foo
- pulling from $TESTTMP/a (glob)
+ $ hg pull ../a
+ pulling from ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
- divergent bookmark X stored as X@foo
- updating bookmark Z
+ not updating divergent bookmark X
(run 'hg heads' to see heads, 'hg merge' to merge)
$ hg book
* X 1:9b140be10808
- X@foo 2:0d2164f0ce0d
Y 0:4e3505fd9583
- Z 2:0d2164f0ce0d
foo -1:000000000000
- foobar 1:9b140be10808
+ foobar -1:000000000000
$ hg push -f ../a
pushing to ../a
searching for changes
@@ -149,55 +134,6 @@ divergent bookmarks
Y 0:4e3505fd9583
Z 1:0d2164f0ce0d
-update a remote bookmark from a non-head to a head
-
- $ hg up -q Y
- $ echo c3 > f2
- $ hg ci -Am3
- adding f2
- created new head
- $ hg push ../a
- pushing to ../a
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- updating bookmark Y
- $ hg -R ../a book
- * X 1:0d2164f0ce0d
- Y 3:f6fc62dde3c0
- Z 1:0d2164f0ce0d
-
-diverging a remote bookmark fails
-
- $ hg up -q 4e3505fd9583
- $ echo c4 > f2
- $ hg ci -Am4
- adding f2
- created new head
- $ hg book -f Y
-
- $ cat <<EOF > ../a/.hg/hgrc
- > [web]
- > push_ssl = false
- > allow_push = *
- > EOF
-
- $ hg -R ../a serve -p $HGPORT2 -d --pid-file=../hg2.pid
- $ cat ../hg2.pid >> $DAEMON_PIDS
-
- $ hg push http://localhost:$HGPORT2/
- pushing to http://localhost:$HGPORT2/
- searching for changes
- abort: push creates new remote head 4efff6d98829!
- (did you forget to merge? use push -f to force)
- [255]
- $ hg -R ../a book
- * X 1:0d2164f0ce0d
- Y 3:f6fc62dde3c0
- Z 1:0d2164f0ce0d
-
hgweb
$ cat <<EOF > .hg/hgrc
@@ -212,87 +148,46 @@ hgweb
$ hg debugpushkey http://localhost:$HGPORT/ namespaces
bookmarks
- phases
namespaces
$ hg debugpushkey http://localhost:$HGPORT/ bookmarks
- Y 4efff6d98829d9c824c621afd6e3f01865f5439f
- foobar 9b140be1080824d768c5a4691a564088eede71f9
- Z 0d2164f0ce0d8f1d6f94351eba04b794909be66c
- foo 0000000000000000000000000000000000000000
+ Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
X 9b140be1080824d768c5a4691a564088eede71f9
+ foo 0000000000000000000000000000000000000000
+ foobar 0000000000000000000000000000000000000000
$ hg out -B http://localhost:$HGPORT/
comparing with http://localhost:$HGPORT/
searching for changed bookmarks
- no changed bookmarks found
- [1]
+ Z 0d2164f0ce0d
$ hg push -B Z http://localhost:$HGPORT/
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
exporting bookmark Z
- [1]
$ hg book -d Z
$ hg in -B http://localhost:$HGPORT/
comparing with http://localhost:$HGPORT/
searching for changed bookmarks
Z 0d2164f0ce0d
foo 000000000000
- foobar 9b140be10808
+ foobar 000000000000
$ hg pull -B Z http://localhost:$HGPORT/
pulling from http://localhost:$HGPORT/
no changes found
- adding remote bookmark foobar
- adding remote bookmark Z
- adding remote bookmark foo
- divergent bookmark X stored as X@1
+ not updating divergent bookmark X
importing bookmark Z
$ hg clone http://localhost:$HGPORT/ cloned-bookmarks
requesting all changes
adding changesets
adding manifests
adding file changes
- added 5 changesets with 5 changes to 3 files (+3 heads)
+ added 3 changesets with 3 changes to 3 files (+1 heads)
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R cloned-bookmarks bookmarks
X 1:9b140be10808
- Y 4:4efff6d98829
+ Y 0:4e3505fd9583
Z 2:0d2164f0ce0d
foo -1:000000000000
- foobar 1:9b140be10808
-
- $ cd ..
-
-Pushing a bookmark should only push the changes required by that
-bookmark, not all outgoing changes:
- $ hg clone http://localhost:$HGPORT/ addmarks
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 5 changesets with 5 changes to 3 files (+3 heads)
- updating to branch default
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd addmarks
- $ echo foo > foo
- $ hg add foo
- $ hg commit -m 'add foo'
- $ echo bar > bar
- $ hg add bar
- $ hg commit -m 'add bar'
- $ hg co "tip^"
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg book add-foo
- $ hg book -r tip add-bar
-Note: this push *must* push only a single changeset, as that's the point
-of this test.
- $ hg push -B add-foo
- pushing to http://localhost:$HGPORT/
- searching for changes
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- exporting bookmark add-foo
+ foobar -1:000000000000
- $ cd ..
+ $ kill `cat ../hg.pid`
diff --git a/tests/test-bookmarks-rebase.t b/tests/test-bookmarks-rebase.t
index 1b89620..49eb5c6 100644
--- a/tests/test-bookmarks-rebase.t
+++ b/tests/test-bookmarks-rebase.t
@@ -39,10 +39,11 @@ rebase
saved backup bundle to $TESTTMP/.hg/strip-backup/*-backup.hg (glob)
$ hg log
- changeset: 3:42e5ed2cdcf4
+ changeset: 3:9163974d1cb5
bookmark: two
tag: tip
parent: 1:925d80f479bb
+ parent: 2:db815d6d32e6
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: 3
diff --git a/tests/test-bookmarks-strip.t b/tests/test-bookmarks-strip.t
index 3c46d76..a97b292 100644
--- a/tests/test-bookmarks-strip.t
+++ b/tests/test-bookmarks-strip.t
@@ -34,7 +34,7 @@ set bookmark
$ hg book test2
-update to -2 (inactives the active bookmark)
+update to -2
$ hg update -r -2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -60,8 +60,8 @@ strip to revision 1
list bookmarks
$ hg book
- test 0:5c9ad3787638
- test2 0:5c9ad3787638
+ test 1:8cf31af87a2b
+ * test2 1:8cf31af87a2b
immediate rollback and reentrancy issue
diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
index 8b8d062..2be06a3 100644
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -84,20 +84,6 @@ bookmarks revset
date: Thu Jan 01 00:00:00 1970 +0000
summary: 1
- $ hg log -r 'bookmark("re:X")'
- changeset: 0:f7b1eb17ad24
- bookmark: X
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 0
-
- changeset: 1:925d80f479bb
- bookmark: X2
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 1
-
$ hg log -r 'bookmark(unknown)'
abort: bookmark 'unknown' does not exist
[255]
@@ -253,10 +239,9 @@ the bookmark extension should be ignored now that it is part of core
test summary
$ hg summary
- parent: 2:db815d6d32e6 tip
+ parent: 2:db815d6d32e6 tip Y Z x y
2
branch: default
- bookmarks: *Z Y x y
commit: (clean)
update: 1 new changesets, 2 branch heads (merge)
@@ -283,24 +268,18 @@ test rollback
test clone
- $ hg bookmark -r 2 -i @
- $ hg bookmark -r 2 -i a@
$ hg bookmarks
- @ 2:db815d6d32e6
X2 1:925d80f479bb
Y 2:db815d6d32e6
* Z 2:db815d6d32e6
- a@ 2:db815d6d32e6
x y 2:db815d6d32e6
$ hg clone . cloned-bookmarks
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R cloned-bookmarks bookmarks
- @ 2:db815d6d32e6
X2 1:925d80f479bb
Y 2:db815d6d32e6
Z 2:db815d6d32e6
- a@ 2:db815d6d32e6
x y 2:db815d6d32e6
test clone with pull protocol
@@ -314,16 +293,11 @@ test clone with pull protocol
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R cloned-bookmarks-pull bookmarks
- @ 2:db815d6d32e6
X2 1:925d80f479bb
Y 2:db815d6d32e6
Z 2:db815d6d32e6
- a@ 2:db815d6d32e6
x y 2:db815d6d32e6
- $ hg bookmark -d @
- $ hg bookmark -d a@
-
test clone with a specific revision
$ hg clone -r 925d80 . cloned-bookmarks-rev
@@ -349,7 +323,6 @@ create bundle with two heads
$ echo y > tobundle/y
$ hg -R tobundle branch test
marked working directory as branch test
- (branches are permanent and global, did you want a bookmark?)
$ hg -R tobundle add tobundle/y
$ hg -R tobundle commit -m'y'
$ hg -R tobundle bundle tobundle.hg
@@ -369,91 +342,3 @@ create bundle with two heads
* Z 3:125c9a1d6df6
x y 2:db815d6d32e6
-test wrongly formated bookmark
-
- $ echo '' >> .hg/bookmarks
- $ hg bookmarks
- X2 1:925d80f479bb
- Y 2:db815d6d32e6
- * Z 3:125c9a1d6df6
- x y 2:db815d6d32e6
- $ echo "Ican'thasformatedlines" >> .hg/bookmarks
- $ hg bookmarks
- malformed line in .hg/bookmarks: "Ican'thasformatedlines"
- X2 1:925d80f479bb
- Y 2:db815d6d32e6
- * Z 3:125c9a1d6df6
- x y 2:db815d6d32e6
-
-test missing revisions
-
- $ echo "925d80f479bc z" > .hg/bookmarks
- $ hg book
- no bookmarks set
-
-test stripping a non-checked-out but bookmarked revision
-
- $ hg --config extensions.graphlog= log --graph
- o changeset: 4:9ba5f110a0b3
- | branch: test
- | tag: tip
- | parent: 2:db815d6d32e6
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: y
- |
- | @ changeset: 3:125c9a1d6df6
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: x
- |
- o changeset: 2:db815d6d32e6
- | parent: 0:f7b1eb17ad24
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: 2
- |
- | o changeset: 1:925d80f479bb
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: 1
- |
- o changeset: 0:f7b1eb17ad24
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 0
-
- $ hg book should-end-on-two
- $ hg co --clean 4
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg book four
- $ hg --config extensions.mq= strip 3
- saved backup bundle to * (glob)
-should-end-on-two should end up pointing to revision 2, as that's the
-tipmost surviving ancestor of the stripped revision.
- $ hg --config extensions.graphlog= log --graph
- @ changeset: 3:9ba5f110a0b3
- | branch: test
- | bookmark: four
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: y
- |
- o changeset: 2:db815d6d32e6
- | bookmark: should-end-on-two
- | parent: 0:f7b1eb17ad24
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: 2
- |
- | o changeset: 1:925d80f479bb
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: 1
- |
- o changeset: 0:f7b1eb17ad24
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 0
-
diff --git a/tests/test-branch-option.t b/tests/test-branch-option.t
index fa81c33..7d4b2c8 100644
--- a/tests/test-branch-option.t
+++ b/tests/test-branch-option.t
@@ -4,7 +4,6 @@ test branch selection options
$ cd branch
$ hg branch a
marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
$ echo a > foo
$ hg ci -d '0 0' -Ama
adding foo
@@ -14,7 +13,6 @@ test branch selection options
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch c
marked working directory as branch c
- (branches are permanent and global, did you want a bookmark?)
$ echo c > foo
$ hg ci -d '0 0' -mc
$ hg tag -l z
@@ -31,21 +29,18 @@ test branch selection options
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo b > foo
$ hg ci -d '0 0' -mb
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg --encoding utf-8 branch æ
marked working directory as branch \xc3\xa6 (esc)
- (branches are permanent and global, did you want a bookmark?)
$ echo ae1 > foo
$ hg ci -d '0 0' -mae1
$ hg up 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg --encoding utf-8 branch -f æ
marked working directory as branch \xc3\xa6 (esc)
- (branches are permanent and global, did you want a bookmark?)
$ echo ae2 > foo
$ hg ci -d '0 0' -mae2
created new head
@@ -53,7 +48,6 @@ test branch selection options
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch -f b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo b2 > foo
$ hg ci -d '0 0' -mb2
created new head
diff --git a/tests/test-branch-tag-confict.t b/tests/test-branch-tag-confict.t
index 0bb6ffa..c333dc9 100644
--- a/tests/test-branch-tag-confict.t
+++ b/tests/test-branch-tag-confict.t
@@ -14,7 +14,6 @@ Create a branch with the same name as the tag.
$ hg branch branchortag
marked working directory as branch branchortag
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'Create a branch with the same name as a tag.'
This is what we have:
@@ -61,5 +60,3 @@ Updating to the branch:
date: Thu Jan 01 00:00:00 1970 +0000
summary: Create a branch with the same name as a tag.
-
- $ cd ..
diff --git a/tests/test-branches.t b/tests/test-branches.t
index 29d9c13..730edee 100644
--- a/tests/test-branches.t
+++ b/tests/test-branches.t
@@ -8,12 +8,10 @@
$ hg add a
$ hg branch a
marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -d '1 0' -m "Adding a branch"
$ hg branch q
marked working directory as branch q
- (branches are permanent and global, did you want a bookmark?)
$ echo 'aa' >a
$ hg branch -C
reset working directory to branch a
@@ -25,7 +23,6 @@
$ hg add b
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -d '2 0' -m "Adding b branch"
$ echo 'bh1' >bh1
@@ -42,7 +39,6 @@
$ hg add c
$ hg branch c
marked working directory as branch c
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -d '5 0' -m "Adding c branch"
$ hg branch tip
@@ -59,7 +55,6 @@
$ hg add d
$ hg branch 'a branch name much longer than the default justification used by branches'
marked working directory as branch a branch name much longer than the default justification used by branches
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -d '6 0' -m "Adding d branch"
$ hg branches
@@ -241,11 +236,6 @@
default 0:19709c5a4e75 (inactive)
$ hg branches -a
a branch name much longer than the default justification used by branches 7:10ff5895aa57
- $ hg branches -q
- a branch name much longer than the default justification used by branches
- c
- a
- default
$ hg heads b
no open branch heads found on branches b
[1]
@@ -408,5 +398,3 @@ custom closed branch color:
\x1b[0;34mc\x1b[0m \x1b[0;36m 14:f894c25619d3\x1b[0m (closed) (esc)
\x1b[0;35ma\x1b[0m \x1b[0;36m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc)
\x1b[0;35mdefault\x1b[0m \x1b[0;36m 0:19709c5a4e75\x1b[0m (inactive) (esc)
-
- $ cd ..
diff --git a/tests/test-bundle-r.t b/tests/test-bundle-r.t
index ce03f01..47f824a 100644
--- a/tests/test-bundle-r.t
+++ b/tests/test-bundle-r.t
@@ -1,6 +1,6 @@
$ hg init test
$ cd test
- $ hg unbundle "$TESTDIR/bundles/remote.hg"
+ $ hg unbundle $TESTDIR/bundles/remote.hg
adding changesets
adding manifests
adding file changes
@@ -154,6 +154,7 @@
4 files, 9 changesets, 7 total revisions
$ hg rollback
repository tip rolled back to revision 4 (undo pull)
+ working directory now based on revision -1
$ cd ..
should fail
@@ -231,6 +232,7 @@ revision 8
4 files, 9 changesets, 7 total revisions
$ hg rollback
repository tip rolled back to revision 2 (undo unbundle)
+ working directory now based on revision 2
revision 2
@@ -255,6 +257,7 @@ revision 4
2 files, 5 changesets, 5 total revisions
$ hg rollback
repository tip rolled back to revision 2 (undo unbundle)
+ working directory now based on revision 2
$ hg unbundle ../test-bundle-branch2.hg
adding changesets
adding manifests
@@ -274,6 +277,7 @@ revision 6
3 files, 7 changesets, 6 total revisions
$ hg rollback
repository tip rolled back to revision 2 (undo unbundle)
+ working directory now based on revision 2
$ hg unbundle ../test-bundle-cset-7.hg
adding changesets
adding manifests
@@ -324,5 +328,3 @@ revision 9
crosschecking files in changesets and manifests
checking files
4 files, 10 changesets, 7 total revisions
-
- $ cd ..
diff --git a/tests/test-bundle-type.t b/tests/test-bundle-type.t
index 5b8fc24..0d68e0e 100644
--- a/tests/test-bundle-type.t
+++ b/tests/test-bundle-type.t
@@ -95,6 +95,7 @@ test invalid bundle type
$ cd t1
$ hg bundle -a -t garbage ../bgarbage
+ 1 changesets found
abort: unknown bundle type specified with --type
[255]
$ cd ..
diff --git a/tests/test-bundle-vs-outgoing.t b/tests/test-bundle-vs-outgoing.t
index f4bab19..86c1c37 100644
--- a/tests/test-bundle-vs-outgoing.t
+++ b/tests/test-bundle-vs-outgoing.t
@@ -142,4 +142,3 @@ with a destination repo... i.e. it's wrong too
$ hg bundle --base 3 foo.bundle
5 changesets found
- $ cd ..
diff --git a/tests/test-bundle.t b/tests/test-bundle.t
index 305d8eb..54031c8 100644
--- a/tests/test-bundle.t
+++ b/tests/test-bundle.t
@@ -37,15 +37,6 @@ Setting up test
$ cd ..
$ hg init empty
-Bundle and phase
-
- $ hg -R test phase --force --secret 0
- $ hg -R test bundle phase.hg empty
- searching for changes
- no changes found (ignored 9 secret changesets)
- [1]
- $ hg -R test phase --draft -r 'head()'
-
Bundle --all
$ hg -R test bundle --all all.hg
@@ -99,6 +90,7 @@ Rollback empty
$ hg -R empty rollback
repository tip rolled back to revision -1 (undo pull)
+ working directory now based on revision -1
Pull full.hg into empty again (using --cwd)
@@ -129,6 +121,7 @@ Rollback empty
$ hg -R empty rollback
repository tip rolled back to revision -1 (undo pull)
+ working directory now based on revision -1
Pull full.hg into empty again (using -R)
@@ -205,8 +198,8 @@ Make sure bundlerepo doesn't leak tempfiles (issue2491)
Pull ../full.hg into empty (with hook)
- $ echo "[hooks]" >> .hg/hgrc
- $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
+ $ echo '[hooks]' >> .hg/hgrc
+ $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
doesn't work (yet ?)
@@ -219,13 +212,14 @@ hg -R bundle://../full.hg verify
adding manifests
adding file changes
added 9 changesets with 7 changes to 4 files (+1 heads)
- changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:../full.hg
+ changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:../full.hg
(run 'hg heads' to see heads, 'hg merge' to merge)
Rollback empty
$ hg rollback
repository tip rolled back to revision -1 (undo pull)
+ working directory now based on revision -1
$ cd ..
Log -R bundle:empty+full.hg
@@ -242,7 +236,7 @@ Pull full.hg into empty again (using -R; with hook)
adding manifests
adding file changes
added 9 changesets with 7 changes to 4 files (+1 heads)
- changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:empty+full.hg
+ changegroup hook: HG_NODE=f9ee2f85a263049e9ae6d37a0e67e96194ffb735 HG_SOURCE=pull HG_URL=bundle:empty+full.hg
(run 'hg heads' to see heads, 'hg merge' to merge)
Create partial clones
@@ -384,13 +378,10 @@ Outgoing -R full.hg vs partial2 in partial
Outgoing -R does-not-exist.hg vs partial2 in partial
$ hg -R bundle://../does-not-exist.hg outgoing ../partial2
- abort: *../does-not-exist.hg* (glob)
+ abort: No such file or directory: ../does-not-exist.hg
[255]
$ cd ..
-hide outer repo
- $ hg init
-
Direct clone from bundle (all-history)
$ hg clone full.hg full-clone
@@ -420,7 +411,7 @@ When cloning from a non-copiable repository into '', do not
recurse infinitely (issue 2528)
$ hg clone full.hg ''
- abort: empty destination path is not valid
+ abort: No such file or directory
[255]
test for http://mercurial.selenic.com/bts/issue216
@@ -540,36 +531,32 @@ bundle single branch
$ hg init branchy
$ cd branchy
$ echo a >a
- $ echo x >x
$ hg ci -Ama
adding a
- adding x
- $ echo c >c
- $ echo xx >x
- $ hg ci -Amc
- adding c
- $ echo c1 >c1
- $ hg ci -Amc1
- adding c1
- $ hg up 0
- 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo b >b
$ hg ci -Amb
adding b
- created new head
$ echo b1 >b1
- $ echo xx >x
$ hg ci -Amb1
adding b1
- $ hg clone -q -r2 . part
+ $ hg up 0
+ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ $ echo c >c
+ $ hg ci -Amc
+ adding c
+ created new head
+ $ echo c1 >c1
+ $ hg ci -Amc1
+ adding c1
+ $ hg clone -q .#tip part
== bundling via incoming
$ hg in -R part --bundle incoming.hg --template "{node}\n" .
comparing with .
searching for changes
- 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
- 057f4db07f61970e1c11e83be79e9d08adc4dc31
+ d2ae7f538514cd87c17547b0de4cea71fe1af9fb
+ 5ece8e77363e2b5269e27c66828b72da29e4341a
== bundling
@@ -579,25 +566,12 @@ bundle single branch
all remote heads known locally
2 changesets found
list of changesets:
- 1a38c1b849e8b70c756d2d80b0b9a3ac0b7ea11a
- 057f4db07f61970e1c11e83be79e9d08adc4dc31
+ d2ae7f538514cd87c17547b0de4cea71fe1af9fb
+ 5ece8e77363e2b5269e27c66828b72da29e4341a
bundling: 1/2 changesets (50.00%)
bundling: 2/2 changesets (100.00%)
bundling: 1/2 manifests (50.00%)
bundling: 2/2 manifests (100.00%)
- bundling: b 1/3 files (33.33%)
- bundling: b1 2/3 files (66.67%)
- bundling: x 3/3 files (100.00%)
+ bundling: b 1/2 files (50.00%)
+ bundling: b1 2/2 files (100.00%)
-== Test for issue3441
-
- $ hg clone -q -r0 . part2
- $ hg -q -R part2 pull bundle.hg
- $ hg -R part2 verify
- checking changesets
- checking manifests
- crosschecking files in changesets and manifests
- checking files
- 4 files, 3 changesets, 5 total revisions
-
- $ cd ..
diff --git a/tests/test-casecollision-i18n.t b/tests/test-casecollision-i18n.t
new file mode 100644
index 0000000..6be2dcc
--- /dev/null
+++ b/tests/test-casecollision-i18n.t
@@ -0,0 +1,43 @@
+run only on case-insensitive filesystems, because collision check at
+"hg update" is done only on case-insensitive filesystems
+
+ $ "$TESTDIR/hghave" icasefs || exit 80
+
+setup repository, and target files
+
+ $ HGENCODING=cp932
+ $ export HGENCODING
+ $ hg init t
+ $ cd t
+ $ python << EOF
+ > names = ["\x83\x41", # cp932(0x83, 0x41='A'), UNICODE(0x30a2)
+ > "\x83\x5A", # cp932(0x83, 0x5A='Z'), UNICODE(0x30bb)
+ > "\x83\x61", # cp932(0x83, 0x61='a'), UNICODE(0x30c2)
+ > "\x83\x7A", # cp932(0x83, 0x7A='z'), UNICODE(0x30db)
+ > ]
+ > for num, name in zip(range(len(names)), names):
+ > # file for getting target filename of "hg add"
+ > f = file(str(num), 'w'); f.write(name); f.close()
+ > # target file of "hg add"
+ > f = file(name, 'w'); f.write(name); f.close()
+ > EOF
+
+test filename collison check at "hg add"
+
+ $ hg add --config ui.portablefilenames=abort `cat 0`
+ $ hg add --config ui.portablefilenames=abort `cat 1`
+ $ hg add --config ui.portablefilenames=abort `cat 2`
+ $ hg add --config ui.portablefilenames=abort `cat 3`
+ $ hg status -a
+ A \x83A (esc)
+ A \x83Z (esc)
+ A \x83a (esc)
+ A \x83z (esc)
+
+test filename collision check at "hg update"
+
+ $ hg commit -m 'revision 0'
+ $ hg update null
+ 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
+ $ hg update tip
+ 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
diff --git a/tests/test-casecollision-merge.t b/tests/test-casecollision-merge.t
deleted file mode 100644
index 39e0ed2..0000000
--- a/tests/test-casecollision-merge.t
+++ /dev/null
@@ -1,209 +0,0 @@
-run only on case-insensitive filesystems
-
- $ "$TESTDIR/hghave" icasefs || exit 80
-
-################################
-test for branch merging
-################################
-
-test for rename awareness of case-folding collision check:
-
-(1) colliding file is one renamed from collided file:
-this is also case for issue3370.
-
- $ hg init merge_renameaware_1
- $ cd merge_renameaware_1
-
- $ echo a > a
- $ hg add a
- $ hg commit -m '#0'
- $ hg rename a tmp
- $ hg rename tmp A
- $ hg commit -m '#1'
- $ hg update 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo 'modified at #2' > a
- $ hg commit -m '#2'
- created new head
-
- $ hg merge
- merging a and A to A
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg status -A
- M A
- a
- R a
- $ cat A
- modified at #2
-
- $ hg update --clean 1
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg merge
- merging A and a to A
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg status -A
- M A
- a
- $ cat A
- modified at #2
-
- $ cd ..
-
-(2) colliding file is not related to collided file
-
- $ hg init merge_renameaware_2
- $ cd merge_renameaware_2
-
- $ echo a > a
- $ hg add a
- $ hg commit -m '#0'
- $ hg remove a
- $ hg commit -m '#1'
- $ echo A > A
- $ hg add A
- $ hg commit -m '#2'
- $ hg update --clean 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo 'modified at #3' > a
- $ hg commit -m '#3'
- created new head
-
- $ hg merge
- abort: case-folding collision between A and a
- [255]
- $ hg parents --template '{rev}\n'
- 3
- $ hg status -A
- C a
- $ cat a
- modified at #3
-
- $ hg update --clean 2
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg merge
- abort: case-folding collision between a and A
- [255]
- $ hg parents --template '{rev}\n'
- 2
- $ hg status -A
- C A
- $ cat A
- A
-
- $ cd ..
-
-
-################################
-test for linear updates
-################################
-
-test for rename awareness of case-folding collision check:
-
-(1) colliding file is one renamed from collided file
-
- $ hg init linearupdate_renameaware_1
- $ cd linearupdate_renameaware_1
-
- $ echo a > a
- $ hg add a
- $ hg commit -m '#0'
- $ hg rename a tmp
- $ hg rename tmp A
- $ hg commit -m '#1'
-
- $ hg update 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
- $ echo 'this is added line' >> a
- $ hg update 1
- merging a and A to A
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
- $ hg status -A
- M A
- $ cat A
- a
- this is added line
-
- $ cd ..
-
-(2) colliding file is not related to collided file
-
- $ hg init linearupdate_renameaware_2
- $ cd linearupdate_renameaware_2
-
- $ echo a > a
- $ hg add a
- $ hg commit -m '#0'
- $ hg remove a
- $ hg commit -m '#1'
- $ echo A > A
- $ hg add A
- $ hg commit -m '#2'
-
- $ hg update 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg parents --template '{rev}\n'
- 0
- $ hg status -A
- C a
- $ cat A
- a
- $ hg up -qC 2
-
- $ hg update --check 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg parents --template '{rev}\n'
- 0
- $ hg status -A
- C a
- $ cat a
- a
-
- $ hg update --clean 2
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg parents --template '{rev}\n'
- 2
- $ hg status -A
- C A
- $ cat A
- A
-
- $ cd ..
-
-(3) colliding file is not related to collided file: added in working dir
-
- $ hg init linearupdate_renameaware_3
- $ cd linearupdate_renameaware_3
-
- $ echo a > a
- $ hg add a
- $ hg commit -m '#0'
- $ hg rename a b
- $ hg commit -m '#1'
- $ hg update 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
- $ echo B > B
- $ hg add B
- $ hg status
- A B
- $ hg update
- abort: case-folding collision between b and B
- [255]
-
- $ hg update --check
- abort: uncommitted local changes
- [255]
-
- $ hg update --clean
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg parents --template '{rev}\n'
- 1
- $ hg status -A
- C b
- $ cat b
- a
-
- $ cd ..
diff --git a/tests/test-casecollision.t b/tests/test-casecollision.t
index 235c7f2..efb014a 100644
--- a/tests/test-casecollision.t
+++ b/tests/test-casecollision.t
@@ -31,37 +31,6 @@ test file addition with colliding case
$ hg st
A A
A a
- $ mkdir b
- $ touch b/c b/D
- $ hg add b
- adding b/D
- adding b/c
- $ touch b/d b/C
- $ hg add b/C
- warning: possible case-folding collision for b/C
- $ hg add b/d
- warning: possible case-folding collision for b/d
- $ touch b/a1 b/a2
- $ hg add b
- adding b/a1
- adding b/a2
- $ touch b/A2 b/a1.1
- $ hg add b/a1.1 b/A2
- warning: possible case-folding collision for b/A2
- $ touch b/f b/F
- $ hg add b/f b/F
- warning: possible case-folding collision for b/f
- $ touch g G
- $ hg add g G
- warning: possible case-folding collision for g
- $ mkdir h H
- $ touch h/x H/x
- $ hg add h/x H/x
- warning: possible case-folding collision for h/x
- $ touch h/s H/s
- $ hg add h/s
- $ hg add H/s
- warning: possible case-folding collision for H/s
case changing rename must not warn or abort
diff --git a/tests/test-casefolding.t b/tests/test-casefolding.t
index 5f59617..88f4831 100644
--- a/tests/test-casefolding.t
+++ b/tests/test-casefolding.t
@@ -1,8 +1,5 @@
$ "$TESTDIR/hghave" icasefs || exit 80
- $ hg debugfs | grep 'case-sensitive:'
- case-sensitive: no
-
test file addition with bad case
$ hg init repo1
@@ -26,48 +23,13 @@ test case collision on rename (issue750)
adding a
a
committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9
-
-Case-changing renames should work:
-
$ hg mv a A
- $ hg mv A a
- $ hg st
+ A: not overwriting - file exists
-test changing case of path components
+'a' used to be removed under windows
- $ mkdir D
- $ echo b > D/b
- $ hg ci -Am addb D/b
- $ hg mv D/b d/b
- D/b: not overwriting - file exists
- $ hg mv D/b d/c
- $ hg st
- A D/c
- R D/b
- $ mv D temp
- $ mv temp d
- $ hg st
- A D/c
- R D/b
- $ hg revert -aq
- $ rm d/c
- $ echo c > D/c
- $ hg add D/c
+ $ test -f a || echo 'a is missing'
$ hg st
- A D/c
- $ hg ci -m addc D/c
- $ hg mv d/b d/e
- moving D/b to D/e (glob)
- $ hg st
- A D/e
- R D/b
- $ hg revert -aq
- $ rm d/e
- $ hg mv d/b D/B
- moving D/b to D/B (glob)
- $ hg st
- A D/B
- R D/b
$ cd ..
test case collision between revisions (issue912)
@@ -94,70 +56,4 @@ used to fail under case insensitive fs
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg up -C
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
-no clobbering of untracked files with wrong casing
-
- $ hg up -r null
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo gold > a
- $ hg up
- A: untracked file differs
- abort: untracked files in working directory differ from files in requested revision
- [255]
- $ cat a
- gold
-
- $ cd ..
-
-issue 3342: file in nested directory causes unexpected abort
-
- $ hg init issue3342
- $ cd issue3342
-
- $ mkdir -p a/B/c/D
- $ echo e > a/B/c/D/e
- $ hg add a/B/c/D/e
-
- $ cd ..
-
-issue 3340: mq does not handle case changes correctly
-
-in addition to reported case, 'hg qrefresh' is also tested against
-case changes.
-
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "mq=" >> $HGRCPATH
-
- $ hg init issue3340
- $ cd issue3340
-
- $ echo a > mIxEdCaSe
- $ hg add mIxEdCaSe
- $ hg commit -m '#0'
- $ hg rename mIxEdCaSe tmp
- $ hg rename tmp MiXeDcAsE
- $ hg status -A
- A MiXeDcAsE
- mIxEdCaSe
- R mIxEdCaSe
- $ hg qnew changecase
- $ hg status -A
- C MiXeDcAsE
-
- $ hg qpop -a
- popping changecase
- patch queue now empty
- $ hg qnew refresh-casechange
- $ hg status -A
- C mIxEdCaSe
- $ hg rename mIxEdCaSe tmp
- $ hg rename tmp MiXeDcAsE
- $ hg status -A
- A MiXeDcAsE
- mIxEdCaSe
- R mIxEdCaSe
- $ hg qrefresh
- $ hg status -A
- C MiXeDcAsE
-
$ cd ..
diff --git a/tests/test-changelog-exec.t b/tests/test-changelog-exec.t
index 028f8e5..c2ace8c 100644
--- a/tests/test-changelog-exec.t
+++ b/tests/test-changelog-exec.t
@@ -49,7 +49,5 @@ this should not mention bar:
$ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 5 ..... 1 b004912a8510 000000000000 000000000000 (re)
-
- $ cd ..
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 5 0 1 b004912a8510 000000000000 000000000000
diff --git a/tests/test-check-code-hg.py b/tests/test-check-code-hg.py
new file mode 100644
index 0000000..b480ca9
--- /dev/null
+++ b/tests/test-check-code-hg.py
@@ -0,0 +1,24 @@
+# Pass all working directory files through check-code.py
+
+import sys, os, imp
+rootdir = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..'))
+if not os.path.isdir(os.path.join(rootdir, '.hg')):
+ sys.stderr.write('skipped: cannot check code on non-repository sources\n')
+ sys.exit(80)
+
+checkpath = os.path.join(rootdir, 'contrib/check-code.py')
+checkcode = imp.load_source('checkcode', checkpath)
+
+from mercurial import hg, ui
+u = ui.ui()
+repo = hg.repository(u, rootdir)
+checked = 0
+wctx = repo[None]
+for f in wctx:
+ # ignore removed and unknown files
+ if f not in wctx:
+ continue
+ checked += 1
+ checkcode.checkfile(os.path.join(rootdir, f))
+if not checked:
+ sys.stderr.write('no file checked!\n')
diff --git a/tests/test-check-code-hg.t b/tests/test-check-code-hg.t
deleted file mode 100644
index 89f1d1a..0000000
--- a/tests/test-check-code-hg.t
+++ /dev/null
@@ -1,183 +0,0 @@
- $ check_code="$TESTDIR"/../contrib/check-code.py
- $ cd "$TESTDIR"/..
- $ if hg identify -q > /dev/null; then :
- > else
- > echo "skipped: not a Mercurial working dir" >&2
- > exit 80
- > fi
- $ hg manifest | xargs "$check_code" || echo 'FAILURE IS NOT AN OPTION!!!'
-
- $ hg manifest | xargs "$check_code" --warnings --nolineno --per-file=0 || true
- hgext/convert/cvsps.py:0:
- > ui.write('Ancestors: %s\n' % (','.join(r)))
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Parent: %d\n' % cs.parents[0].id)
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Parents: %s\n' %
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Branchpoints: %s \n' % ', '.join(branchpoints))
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Author: %s\n' % cs.author)
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Branch: %s\n' % (cs.branch or 'HEAD'))
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Date: %s\n' % util.datestr(cs.date,
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Log:\n')
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Members: \n')
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('PatchSet %d \n' % cs.id)
- warning: unwrapped ui message
- hgext/convert/cvsps.py:0:
- > ui.write('Tag%s: %s \n' % (['', 's'][len(cs.tags) > 1],
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write("parent %s\n" % p)
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write('k=%s\nv=%s\n' % (name, value))
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write("author %s %s %s\n" % (ctx.user(), int(date[0]), date[1]))
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write("branch %s\n\n" % ctx.branch())
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write("committer %s %s %s\n" % (committer, int(date[0]), date[1]))
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write("revision %d\n" % ctx.rev())
- warning: unwrapped ui message
- hgext/hgk.py:0:
- > ui.write("tree %s\n" % short(ctx.changeset()[0]))
- warning: unwrapped ui message
- hgext/mq.py:0:
- > ui.write("mq: %s\n" % ', '.join(m))
- warning: unwrapped ui message
- hgext/patchbomb.py:0:
- > ui.write('Subject: %s\n' % subj)
- warning: unwrapped ui message
- hgext/patchbomb.py:0:
- > ui.write('From: %s\n' % sender)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.note('branch %s\n' % data)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.note('node %s\n' % str(data))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.note('tag %s\n' % name)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("unpruned common: %s\n" % " ".join([short(n)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("format: id, p1, p2, cset, delta base, len(delta)\n")
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("local is subset\n")
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("remote is subset\n")
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('deltas against other : ' + fmt % pcfmt(numother,
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('deltas against p1 : ' + fmt % pcfmt(nump1, numdeltas))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('deltas against p2 : ' + fmt % pcfmt(nump2, numdeltas))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("common heads: %s\n" % " ".join([short(n) for n in common]))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("match: %s\n" % m(d[0]))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('deltas against prev : ' + fmt % pcfmt(numprev, numdeltas))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('path %s\n' % k)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('uncompressed data size (min/max/avg) : %d / %d / %d\n'
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("digraph G {\n")
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("internal: %s %s\n" % d)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write("standard: %s\n" % util.datestr(d))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('avg chain length : ' + fmt % avgchainlen)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('case-sensitive: %s\n' % (util.checkcase('.debugfsinfo')
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('compression ratio : ' + fmt % compratio)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('delta size (min/max/avg) : %d / %d / %d\n'
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('exec: %s\n' % (util.checkexec(path) and 'yes' or 'no'))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('flags : %s\n' % ', '.join(flags))
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('format : %d\n' % format)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('full revision size (min/max/avg) : %d / %d / %d\n'
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('revision size : ' + fmt2 % totalsize)
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('revisions : ' + fmt2 % numrevs)
- warning: unwrapped ui message
- warning: unwrapped ui message
- mercurial/commands.py:0:
- > ui.write('symlink: %s\n' % (util.checklink(path) and 'yes' or 'no'))
- warning: unwrapped ui message
- tests/autodiff.py:0:
- > ui.write('data lost for: %s\n' % fn)
- warning: unwrapped ui message
- tests/test-convert-mtn.t:0:
- > > function get_passphrase(keypair_id)
- don't use 'function', use old style
- tests/test-import-git.t:0:
- > > Mc\${NkU|\`?^000jF3jhEB
- ^ must be quoted
- tests/test-import.t:0:
- > > diff -Naur proj-orig/foo proj-new/foo
- don't use 'diff -N'
- don't use 'diff -N'
- tests/test-schemes.t:0:
- > > z = file:\$PWD/
- don't use $PWD, use `pwd`
- tests/test-ui-color.py:0:
- > testui.warn('warning\n')
- warning: unwrapped ui message
- tests/test-ui-color.py:0:
- > testui.write('buffered\n')
- warning: unwrapped ui message
diff --git a/tests/test-check-code.t b/tests/test-check-code.t
index ee061d8..193020e 100644
--- a/tests/test-check-code.t
+++ b/tests/test-check-code.t
@@ -26,23 +26,6 @@
> # Do not complain about our own definition
> def any(x):
> pass
- >
- > # try/except/finally block does not exist in Python 2.4
- > try:
- > pass
- > except StandardError, inst:
- > pass
- > finally:
- > pass
- >
- > # nested try/finally+try/except is allowed
- > try:
- > try:
- > pass
- > except StandardError, inst:
- > pass
- > finally:
- > pass
> EOF
$ cat > classstyle.py <<EOF
> class newstyle_class(object):
@@ -67,8 +50,8 @@
Python keyword is not a function
./wrong.py:3:
> return ( 5+6, 9)
- gratuitous whitespace in () or []
missing whitespace in expression
+ gratuitous whitespace in () or []
./quote.py:5:
> '"""', 42+1, """and
missing whitespace in expression
@@ -81,9 +64,6 @@
./non-py24.py:4:
> y = format(x)
any/all/format not available in Python 2.4
- ./non-py24.py:11:
- > try:
- no try/except/finally in Py2.4
./classstyle.py:4:
> class oldstyle_class:
old-style class, use class foo(object)
@@ -132,11 +112,3 @@
object comparison with literal
[1]
- $ cat > warning.py <<EOF
- > except:
- > EOF
- $ "$check_code" warning.py --warning --nolineno
- warning.py:0:
- > except:
- warning: naked except clause
- [1]
diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t
index 3b5c272..6d87e60 100644
--- a/tests/test-check-pyflakes.t
+++ b/tests/test-check-pyflakes.t
@@ -1,6 +1,14 @@
$ "$TESTDIR/hghave" pyflakes || exit 80
- $ cd "`dirname "$TESTDIR"`"
- $ pyflakes mercurial hgext 2>&1 | "$TESTDIR/filterpyflakes.py"
+ $ cd $(dirname $TESTDIR)
+ $ pyflakes mercurial hgext 2>&1 | $TESTDIR/filterpyflakes.py
+ mercurial/hgweb/server.py:*: 'activeCount' imported but unused (glob)
+ mercurial/commands.py:*: 'base85' imported but unused (glob)
+ mercurial/commands.py:*: 'bdiff' imported but unused (glob)
+ mercurial/commands.py:*: 'mpatch' imported but unused (glob)
+ mercurial/commands.py:*: 'osutil' imported but unused (glob)
hgext/inotify/linux/__init__.py:*: 'from _inotify import *' used; unable to detect undefined names (glob)
+ mercurial/util.py:*: 'from posix import *' used; unable to detect undefined names (glob)
+ mercurial/windows.py:*: 'from win32 import *' used; unable to detect undefined names (glob)
+ mercurial/util.py:*: 'from windows import *' used; unable to detect undefined names (glob)
diff --git a/tests/test-children.t b/tests/test-children.t
index ca812ef..a1abf5f 100644
--- a/tests/test-children.t
+++ b/tests/test-children.t
@@ -121,5 +121,3 @@ hg children file0 at revision 0 (should be 2)
date: Thu Jan 01 00:00:02 1970 +0000
summary: 2
-
- $ cd ..
diff --git a/tests/test-churn.t b/tests/test-churn.t
index b744d64..b38d166 100644
--- a/tests/test-churn.t
+++ b/tests/test-churn.t
@@ -158,5 +158,3 @@ Ignore trailing or leading spaces in emails
user4@x.com 2 *****************************
user2 2 *****************************
with space 1 **************
-
- $ cd ..
diff --git a/tests/test-clone-cgi.t b/tests/test-clone-cgi.t
index f857f07..e925237 100644
--- a/tests/test-clone-cgi.t
+++ b/tests/test-clone-cgi.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
-
This is a test of the wire protocol over CGI-based hgweb.
initialize repository
diff --git a/tests/test-clone-failure.t b/tests/test-clone-failure.t
new file mode 100644
index 0000000..07759c4
--- /dev/null
+++ b/tests/test-clone-failure.t
@@ -0,0 +1,78 @@
+No local source
+
+ $ hg clone a b
+ abort: repository a not found!
+ [255]
+
+No remote source
+
+ $ hg clone http://127.0.0.1:3121/a b
+ abort: error: Connection refused
+ [255]
+ $ rm -rf b # work around bug with http clone
+
+Inaccessible source
+
+ $ mkdir a
+ $ chmod 000 a
+ $ hg clone a b
+ abort: repository a not found!
+ [255]
+
+Inaccessible destination
+
+ $ hg init b
+ $ cd b
+ $ hg clone . ../a
+ abort: Permission denied: ../a
+ [255]
+ $ cd ..
+ $ chmod 700 a
+ $ rm -r a b
+
+Source of wrong type
+
+ $ if "$TESTDIR/hghave" -q fifo; then
+ > mkfifo a
+ > hg clone a b
+ > rm a
+ > else
+ > echo "abort: repository a not found!"
+ > fi
+ abort: repository a not found!
+
+Default destination, same directory
+
+ $ hg init q
+ $ hg clone q
+ destination directory: q
+ abort: destination 'q' is not empty
+ [255]
+
+destination directory not empty
+
+ $ mkdir a
+ $ echo stuff > a/a
+ $ hg clone q a
+ abort: destination 'a' is not empty
+ [255]
+
+leave existing directory in place after clone failure
+
+ $ hg init c
+ $ cd c
+ $ echo c > c
+ $ hg commit -A -m test
+ adding c
+ $ chmod -rx .hg/store/data
+ $ cd ..
+ $ mkdir d
+ $ hg clone c d 2> err
+ [255]
+ $ test -d d
+ $ test -d d/.hg
+ [1]
+
+reenable perm to allow deletion
+
+ $ chmod +rx c/.hg/store/data
diff --git a/tests/test-clone-pull-corruption.t b/tests/test-clone-pull-corruption.t
index b92269c..2d0ba9b 100644
--- a/tests/test-clone-pull-corruption.t
+++ b/tests/test-clone-pull-corruption.t
@@ -15,8 +15,8 @@ Create two repos, so that one of them can pull from the other one.
Add a hook to wait 5 seconds and then abort the commit
$ cd ../corrupted
- $ echo "[hooks]" >> .hg/hgrc
- $ echo "pretxncommit = sh -c 'sleep 5; exit 1'" >> .hg/hgrc
+ $ echo '[hooks]' >> .hg/hgrc
+ $ echo 'pretxncommit = sleep 5; exit 1' >> .hg/hgrc
start a commit...
@@ -48,5 +48,3 @@ see what happened
crosschecking files in changesets and manifests
checking files
1 files, 2 changesets, 2 total revisions
-
- $ cd ..
diff --git a/tests/test-clone-r.t b/tests/test-clone-r.t
index afd8498..96040ae 100644
--- a/tests/test-clone-r.t
+++ b/tests/test-clone-r.t
@@ -38,33 +38,33 @@
$ hg commit -m "0.3m"
$ hg debugindex -f 1 afile
- rev flag offset length size ..... link p1 p2 nodeid (re)
- 0 0000 0 3 2 ..... 0 -1 -1 362fef284ce2 (re)
- 1 0000 3 5 4 ..... 1 0 -1 125144f7e028 (re)
- 2 0000 8 7 6 ..... 2 1 -1 4c982badb186 (re)
- 3 0000 15 9 8 ..... 3 2 -1 19b1fc555737 (re)
+ rev flag offset length size base link p1 p2 nodeid
+ 0 0000 0 3 2 0 0 -1 -1 362fef284ce2
+ 1 0000 3 5 4 1 1 0 -1 125144f7e028
+ 2 0000 8 7 6 2 2 1 -1 4c982badb186
+ 3 0000 15 9 8 3 3 2 -1 19b1fc555737
$ hg debugindex adifferentfile
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 75 ..... 7 2565f3199a74 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 75 0 7 2565f3199a74 000000000000 000000000000
$ hg debugindex anotherfile
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 75 ..... 8 2565f3199a74 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 75 0 8 2565f3199a74 000000000000 000000000000
$ hg debugindex fred
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 8 ..... 6 12ab3bcc5ea4 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 8 0 6 12ab3bcc5ea4 000000000000 000000000000
$ hg debugindex --manifest
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 48 ..... 0 43eadb1d2d06 000000000000 000000000000 (re)
- 1 48 48 ..... 1 8b89697eba2c 43eadb1d2d06 000000000000 (re)
- 2 96 48 ..... 2 626a32663c2f 8b89697eba2c 000000000000 (re)
- 3 144 48 ..... 3 f54c32f13478 626a32663c2f 000000000000 (re)
- 4 192 .. ..... 6 de68e904d169 626a32663c2f 000000000000 (re)
- 5 2.. 68 ..... 7 09bb521d218d de68e904d169 000000000000 (re)
- 6 3.. 54 ..... 8 1fde233dfb0f f54c32f13478 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 48 0 0 43eadb1d2d06 000000000000 000000000000
+ 1 48 48 1 1 8b89697eba2c 43eadb1d2d06 000000000000
+ 2 96 48 2 2 626a32663c2f 8b89697eba2c 000000000000
+ 3 144 48 3 3 f54c32f13478 626a32663c2f 000000000000
+ 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000
+ 5 250 68 3 7 09bb521d218d de68e904d169 000000000000
+ 6 318 54 6 8 1fde233dfb0f f54c32f13478 000000000000
$ hg verify
checking changesets
diff --git a/tests/test-clone-update-order.t b/tests/test-clone-update-order.t
index 8a4f89d..222d03e 100644
--- a/tests/test-clone-update-order.t
+++ b/tests/test-clone-update-order.t
@@ -6,7 +6,6 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch mine
marked working directory as branch mine
- (branches are permanent and global, did you want a bookmark?)
$ echo hello > world
$ hg commit -Am hello
adding world
@@ -14,7 +13,6 @@
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch other
marked working directory as branch other
- (branches are permanent and global, did you want a bookmark?)
$ echo good > bye
$ hg commit -Am other
adding bye
diff --git a/tests/test-clone.t b/tests/test-clone.t
index 3f83949..4e2aded 100644
--- a/tests/test-clone.t
+++ b/tests/test-clone.t
@@ -10,7 +10,7 @@ Prepare repo a:
Create a non-inlined filelog:
- $ python -c 'file("data1", "wb").write("".join("%s\n" % x for x in range(10000)))'
+ $ python -c 'for x in range(10000): print x' >> data1
$ for j in 0 1 2 3 4 5 6 7 8 9; do
> cat data1 >> b
> hg commit -m test
@@ -43,20 +43,13 @@ Default operation:
Invalid dest '' must abort:
$ hg clone . ''
- abort: empty destination path is not valid
+ abort: No such file or directory
[255]
No update, with debug option:
-#if hardlink
$ hg --debug clone -U . ../c
linked 8 files
- listing keys for "bookmarks"
-#else
- $ hg --debug clone -U . ../c
- copied 8 files
- listing keys for "bookmarks"
-#endif
$ cd ../c
$ cat a 2>/dev/null || echo "a not present"
a not present
@@ -92,7 +85,7 @@ Check that path aliases are expanded:
$ hg clone -q -U --config 'paths.foobar=a#0' foobar f
$ hg -R f showconfig paths.default
- $TESTTMP/a#0 (glob)
+ $TESTTMP/a#0
Use --pull:
@@ -114,7 +107,7 @@ Use --pull:
Invalid dest '' with --pull must abort (issue2528):
$ hg clone --pull a ''
- abort: empty destination path is not valid
+ abort: No such file or directory
[255]
Clone to '.':
@@ -139,7 +132,6 @@ Adding some more history to repo a:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch stable
marked working directory as branch stable
- (branches are permanent and global, did you want a bookmark?)
$ echo some text >a
$ hg ci -m "starting branch stable"
$ hg tag ref2
@@ -451,9 +443,8 @@ iterable in addbranchrevs()
$ rm -r ua
$ cat <<EOF > branchclone.py
- > from mercurial import ui, hg, extensions
+ > from mercurial import ui, hg
> myui = ui.ui()
- > extensions.loadall(myui)
> repo = hg.repository(myui, 'a')
> hg.clone(myui, {}, repo, dest="ua", branch=["stable",])
> EOF
@@ -466,102 +457,3 @@ iterable in addbranchrevs()
updating to branch stable
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm -r ua
-
-
-Testing failures:
-
- $ mkdir fail
- $ cd fail
-
-No local source
-
- $ hg clone a b
- abort: repository a not found!
- [255]
-
-No remote source
-
- $ hg clone http://127.0.0.1:3121/a b
- abort: error: *refused* (glob)
- [255]
- $ rm -rf b # work around bug with http clone
-
-
-#if unix-permissions
-
-Inaccessible source
-
- $ mkdir a
- $ chmod 000 a
- $ hg clone a b
- abort: repository a not found!
- [255]
-
-Inaccessible destination
-
- $ hg init b
- $ cd b
- $ hg clone . ../a
- abort: Permission denied: ../a
- [255]
- $ cd ..
- $ chmod 700 a
- $ rm -r a b
-
-#endif
-
-
-#if fifo
-
-Source of wrong type
-
- $ mkfifo a
- $ hg clone a b
- abort: repository a not found!
- [255]
- $ rm a
-
-#endif
-
-Default destination, same directory
-
- $ hg init q
- $ hg clone q
- destination directory: q
- abort: destination 'q' is not empty
- [255]
-
-destination directory not empty
-
- $ mkdir a
- $ echo stuff > a/a
- $ hg clone q a
- abort: destination 'a' is not empty
- [255]
-
-
-#if unix-permissions
-
-leave existing directory in place after clone failure
-
- $ hg init c
- $ cd c
- $ echo c > c
- $ hg commit -A -m test
- adding c
- $ chmod -rx .hg/store/data
- $ cd ..
- $ mkdir d
- $ hg clone c d 2> err
- [255]
- $ test -d d
- $ test -d d/.hg
- [1]
-
-reenable perm to allow deletion
-
- $ chmod +rx c/.hg/store/data
-
-#endif
-
- $ cd ..
diff --git a/tests/test-command-template.t b/tests/test-command-template.t
index d3fa338..81989bd 100644
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -43,15 +43,6 @@ Second branch starting at nullrev:
$ hg mv second fourth
$ hg commit -m third -d "2020-01-01 10:01"
-Quoting for ui.logtemplate
-
- $ hg tip --config "ui.logtemplate={rev}\n"
- 8
- $ hg tip --config "ui.logtemplate='{rev}\n'"
- 8
- $ hg tip --config 'ui.logtemplate="{rev}\n"'
- 8
-
Make sure user/global hgrc does not affect tests
$ echo '[ui]' > .hg/hgrc
@@ -442,13 +433,11 @@ Test xml styles:
Error if style not readable:
-#if unix-permissions
$ touch q
$ chmod 0 q
$ hg log --style ./q
abort: Permission denied: ./q
[255]
-#endif
Error if no style:
@@ -466,15 +455,13 @@ Error if style missing key:
Error if include fails:
$ echo 'changeset = q' >> t
-#if unix-permissions
$ hg log --style ./t
abort: template file ./q: Permission denied
[255]
- $ rm q
-#endif
Include works:
+ $ rm q
$ echo '{rev}' > q
$ hg log --style ./t
8
@@ -1125,6 +1112,10 @@ Filters work:
other
user
+ $ hg log --template '{date|age}\n' > /dev/null || exit 1
+
+ $ hg log -l1 --template '{date|age}\n'
+ 8 years from now
$ hg log --template '{date|date}\n'
Wed Jan 01 10:01:00 2020 +0000
Mon Jan 12 13:46:40 1970 +0000
@@ -1227,20 +1218,6 @@ Formatnode filter works:
$ hg --debug log -r 0 --template '{node|formatnode}\n'
1e4e1b8f71e05681d422154f5421e385fec3454f
-Age filter:
-
- $ hg log --template '{date|age}\n' > /dev/null || exit 1
-
- >>> from datetime import datetime
- >>> fp = open('a', 'w')
- >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00')
- >>> fp.close()
- $ hg add a
- $ hg commit -m future -d "`cat a`"
-
- $ hg log -l1 --template '{date|age}\n'
- 7 years from now
-
Error on syntax:
$ echo 'x = "f' >> t
diff --git a/tests/test-commandserver.py b/tests/test-commandserver.py
index db6e76d..66e405e 100644
--- a/tests/test-commandserver.py
+++ b/tests/test-commandserver.py
@@ -18,7 +18,7 @@ def writeblock(server, data):
def readchannel(server):
data = server.stdout.read(5)
if not data:
- raise EOFError
+ raise EOFError()
channel, length = struct.unpack('>cI', data)
if channel in 'IL':
return channel, length
@@ -26,8 +26,6 @@ def readchannel(server):
return channel, server.stdout.read(length)
def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None):
- print ' runcommand', ' '.join(args)
- sys.stdout.flush()
server.stdin.write('runcommand\n')
writeblock(server, '\0'.join(args))
@@ -54,10 +52,6 @@ def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None):
return
def check(func, repopath=None):
- print
- print 'testing %s:' % func.__name__
- print
- sys.stdout.flush()
server = connect(repopath)
try:
return func(server)
@@ -71,8 +65,7 @@ def unknowncommand(server):
def hellomessage(server):
ch, data = readchannel(server)
# escaping python tests output not supported
- print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***',
- data))
+ print '%c, %r' % (ch, re.sub('encoding: [a-zA-Z0-9-]+', 'encoding: ***', data))
# run an arbitrary command to make sure the next thing the server sends
# isn't part of the hello message
@@ -131,7 +124,7 @@ def cwd(server):
""" check that --cwd doesn't persist between requests """
readchannel(server)
os.mkdir('foo')
- f = open('foo/bar', 'wb')
+ f = open('foo/bar', 'w')
f.write('a')
f.close()
runcommand(server, ['--cwd', 'foo', 'st', 'bar'])
@@ -143,13 +136,12 @@ def localhgrc(server):
is used """
readchannel(server)
- # the cached repo local hgrc contains ui.foo=bar, so showconfig should
- # show it
+ # the cached repo local hgrc contains ui.foo=bar, so showconfig should show it
runcommand(server, ['showconfig'])
# but not for this repo
runcommand(server, ['init', 'foo'])
- runcommand(server, ['-R', 'foo', 'showconfig', 'ui', 'defaults'])
+ runcommand(server, ['-R', 'foo', 'showconfig'])
shutil.rmtree('foo')
def hook(**args):
@@ -159,83 +151,9 @@ def hook(**args):
def hookoutput(server):
readchannel(server)
runcommand(server, ['--config',
- 'hooks.pre-identify=python:test-commandserver.hook',
- 'id'],
+ 'hooks.pre-identify=python:test-commandserver.hook', 'id'],
input=cStringIO.StringIO('some input'))
-def outsidechanges(server):
- readchannel(server)
- f = open('a', 'ab')
- f.write('a\n')
- f.close()
- runcommand(server, ['status'])
- os.system('hg ci -Am2')
- runcommand(server, ['tip'])
- runcommand(server, ['status'])
-
-def bookmarks(server):
- readchannel(server)
- runcommand(server, ['bookmarks'])
-
- # changes .hg/bookmarks
- os.system('hg bookmark -i bm1')
- os.system('hg bookmark -i bm2')
- runcommand(server, ['bookmarks'])
-
- # changes .hg/bookmarks.current
- os.system('hg upd bm1 -q')
- runcommand(server, ['bookmarks'])
-
- runcommand(server, ['bookmarks', 'bm3'])
- f = open('a', 'ab')
- f.write('a\n')
- f.close()
- runcommand(server, ['commit', '-Amm'])
- runcommand(server, ['bookmarks'])
-
-def tagscache(server):
- readchannel(server)
- runcommand(server, ['id', '-t', '-r', '0'])
- os.system('hg tag -r 0 foo')
- runcommand(server, ['id', '-t', '-r', '0'])
-
-def setphase(server):
- readchannel(server)
- runcommand(server, ['phase', '-r', '.'])
- os.system('hg phase -r . -p')
- runcommand(server, ['phase', '-r', '.'])
-
-def rollback(server):
- readchannel(server)
- runcommand(server, ['phase', '-r', '.', '-p'])
- f = open('a', 'ab')
- f.write('a\n')
- f.close()
- runcommand(server, ['commit', '-Am.'])
- runcommand(server, ['rollback'])
- runcommand(server, ['phase', '-r', '.'])
-
-def branch(server):
- readchannel(server)
- runcommand(server, ['branch'])
- os.system('hg branch foo')
- runcommand(server, ['branch'])
- os.system('hg branch default')
-
-def hgignore(server):
- readchannel(server)
- f = open('.hgignore', 'ab')
- f.write('')
- f.close()
- runcommand(server, ['commit', '-Am.'])
- f = open('ignored-file', 'ab')
- f.write('')
- f.close()
- f = open('.hgignore', 'ab')
- f.write('ignored-file')
- f.close()
- runcommand(server, ['status', '-i', '-u'])
-
if __name__ == '__main__':
os.system('hg init')
@@ -251,10 +169,3 @@ if __name__ == '__main__':
hgrc.close()
check(localhgrc)
check(hookoutput)
- check(outsidechanges)
- check(bookmarks)
- check(tagscache)
- check(setphase)
- check(rollback)
- check(branch)
- check(hgignore)
diff --git a/tests/test-commandserver.py.out b/tests/test-commandserver.py.out
index 054ba6c..d9301b1 100644
--- a/tests/test-commandserver.py.out
+++ b/tests/test-commandserver.py.out
@@ -1,165 +1,54 @@
-
-testing hellomessage:
-
o, 'capabilities: getencoding runcommand\nencoding: ***'
- runcommand id
000000000000 tip
-
-testing unknowncommand:
-
abort: unknown command unknowncommand
-
-testing checkruncommand:
-
- runcommand
Mercurial Distributed SCM
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
- runcommand id --quiet
000000000000
- runcommand id
000000000000 tip
- runcommand id --config ui.quiet=True
000000000000
- runcommand id
000000000000 tip
-
-testing inputeof:
-
server exit code = 1
-
-testing serverinput:
-
- runcommand import -
applying patch from stdin
- runcommand log
changeset: 0:eff892de26ec
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: 1
-
-testing cwd:
-
- runcommand --cwd foo st bar
? bar
- runcommand st foo/bar
? foo/bar
-
-testing localhgrc:
-
- runcommand showconfig
bundle.mainreporoot=$TESTTMP
defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
defaults.tag=-d "0 0"
ui.slash=True
ui.foo=bar
- runcommand init foo
- runcommand -R foo showconfig ui defaults
+bundle.mainreporoot=$TESTTMP/foo
defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
defaults.tag=-d "0 0"
ui.slash=True
-
-testing hookoutput:
-
- runcommand --config hooks.pre-identify=python:test-commandserver.hook id
hook talking
now try to read something: 'some input'
eff892de26ec tip
-
-testing outsidechanges:
-
- runcommand status
-M a
- runcommand tip
-changeset: 1:d3a0a68be6de
-tag: tip
-user: test
-date: Thu Jan 01 00:00:00 1970 +0000
-summary: 2
-
- runcommand status
-
-testing bookmarks:
-
- runcommand bookmarks
-no bookmarks set
- runcommand bookmarks
- bm1 1:d3a0a68be6de
- bm2 1:d3a0a68be6de
- runcommand bookmarks
- * bm1 1:d3a0a68be6de
- bm2 1:d3a0a68be6de
- runcommand bookmarks bm3
- runcommand commit -Amm
- runcommand bookmarks
- bm1 1:d3a0a68be6de
- bm2 1:d3a0a68be6de
- * bm3 2:aef17e88f5f0
-
-testing tagscache:
-
- runcommand id -t -r 0
-
- runcommand id -t -r 0
-foo
-
-testing setphase:
-
- runcommand phase -r .
-3: draft
- runcommand phase -r .
-3: public
-
-testing rollback:
-
- runcommand phase -r . -p
-no phases changed
- runcommand commit -Am.
- runcommand rollback
-repository tip rolled back to revision 3 (undo commit)
-working directory now based on revision 3
- runcommand phase -r .
-3: public
-
-testing branch:
-
- runcommand branch
-default
-marked working directory as branch foo
-(branches are permanent and global, did you want a bookmark?)
- runcommand branch
-foo
-marked working directory as branch default
-(branches are permanent and global, did you want a bookmark?)
-
-testing hgignore:
-
- runcommand commit -Am.
-adding .hgignore
- runcommand status -i -u
-I ignored-file
diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t
deleted file mode 100644
index 8550fb5..0000000
--- a/tests/test-commit-amend.t
+++ /dev/null
@@ -1,357 +0,0 @@
- $ hg init
-
-Setup:
-
- $ echo a >> a
- $ hg ci -Am 'base'
- adding a
-
-Refuse to amend public csets:
-
- $ hg phase -r . -p
- $ hg ci --amend
- abort: cannot amend public changesets
- [255]
- $ hg phase -r . -f -d
-
- $ echo a >> a
- $ hg ci -Am 'base1'
-
-Nothing to amend:
-
- $ hg ci --amend
- nothing changed
- [1]
-
- $ cat >> $HGRCPATH <<EOF
- > [hooks]
- > pretxncommit.foo = sh -c "echo \"pretxncommit \$HG_NODE\"; hg id -r \$HG_NODE"
- > EOF
-
-Amending changeset with changes in working dir:
-
- $ echo a >> a
- $ hg ci --amend -m 'amend base1'
- pretxncommit 9cd25b479c51be2f4ed2c38e7abdf7ce67d8e0dc
- 9cd25b479c51 tip
- saved backup bundle to $TESTTMP/.hg/strip-backup/489edb5b847d-amend-backup.hg (glob)
- $ echo 'pretxncommit.foo = ' >> $HGRCPATH
- $ hg diff -c .
- diff -r ad120869acf0 -r 9cd25b479c51 a
- --- a/a Thu Jan 01 00:00:00 1970 +0000
- +++ b/a Thu Jan 01 00:00:00 1970 +0000
- @@ -1,1 +1,3 @@
- a
- +a
- +a
- $ hg log
- changeset: 1:9cd25b479c51
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: amend base1
-
- changeset: 0:ad120869acf0
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: base
-
-
-Add new file:
-
- $ echo b > b
- $ hg ci --amend -Am 'amend base1 new file'
- adding b
- saved backup bundle to $TESTTMP/.hg/strip-backup/9cd25b479c51-amend-backup.hg (glob)
-
-Remove file that was added in amended commit:
-
- $ hg rm b
- $ hg ci --amend -m 'amend base1 remove new file'
- saved backup bundle to $TESTTMP/.hg/strip-backup/e2bb3ecffd2f-amend-backup.hg (glob)
-
- $ hg cat b
- b: no such file in rev 664a9b2d60cd
- [1]
-
-No changes, just a different message:
-
- $ hg ci -v --amend -m 'no changes, new message'
- amending changeset 664a9b2d60cd
- copying changeset 664a9b2d60cd to ad120869acf0
- a
- stripping amended changeset 664a9b2d60cd
- 1 changesets found
- saved backup bundle to $TESTTMP/.hg/strip-backup/664a9b2d60cd-amend-backup.hg (glob)
- 1 changesets found
- adding branch
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- committed changeset 1:ea6e356ff2ad
- $ hg diff -c .
- diff -r ad120869acf0 -r ea6e356ff2ad a
- --- a/a Thu Jan 01 00:00:00 1970 +0000
- +++ b/a Thu Jan 01 00:00:00 1970 +0000
- @@ -1,1 +1,3 @@
- a
- +a
- +a
- $ hg log
- changeset: 1:ea6e356ff2ad
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: no changes, new message
-
- changeset: 0:ad120869acf0
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: base
-
-
-Disable default date on commit so when -d isn't given, the old date is preserved:
-
- $ echo '[defaults]' >> $HGRCPATH
- $ echo 'commit=' >> $HGRCPATH
-
-Test -u/-d:
-
- $ hg ci --amend -u foo -d '1 0'
- saved backup bundle to $TESTTMP/.hg/strip-backup/ea6e356ff2ad-amend-backup.hg (glob)
- $ echo a >> a
- $ hg ci --amend -u foo -d '1 0'
- saved backup bundle to $TESTTMP/.hg/strip-backup/377b91ce8b56-amend-backup.hg (glob)
- $ hg log -r .
- changeset: 1:2c94e4a5756f
- tag: tip
- user: foo
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: no changes, new message
-
-
-Open editor with old commit message if a message isn't given otherwise:
-
- $ cat > editor.sh << '__EOF__'
- > #!/bin/sh
- > cat $1
- > echo "another precious commit message" > "$1"
- > __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
- amending changeset 2c94e4a5756f
- copying changeset 2c94e4a5756f to ad120869acf0
- no changes, new message
-
-
- HG: Enter commit message. Lines beginning with 'HG:' are removed.
- HG: Leave message empty to abort commit.
- HG: --
- HG: user: foo
- HG: branch 'default'
- HG: changed a
- a
- stripping amended changeset 2c94e4a5756f
- 1 changesets found
- saved backup bundle to $TESTTMP/.hg/strip-backup/2c94e4a5756f-amend-backup.hg (glob)
- 1 changesets found
- adding branch
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- committed changeset 1:ffb49186f961
-
-Same, but with changes in working dir (different code path):
-
- $ echo a >> a
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg commit --amend -v
- amending changeset ffb49186f961
- another precious commit message
-
-
- HG: Enter commit message. Lines beginning with 'HG:' are removed.
- HG: Leave message empty to abort commit.
- HG: --
- HG: user: foo
- HG: branch 'default'
- HG: changed a
- a
- copying changeset 27f3aacd3011 to ad120869acf0
- a
- stripping intermediate changeset 27f3aacd3011
- stripping amended changeset ffb49186f961
- 2 changesets found
- saved backup bundle to $TESTTMP/.hg/strip-backup/ffb49186f961-amend-backup.hg (glob)
- 1 changesets found
- adding branch
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- committed changeset 1:fb6cca43446f
-
- $ rm editor.sh
- $ hg log -r .
- changeset: 1:fb6cca43446f
- tag: tip
- user: foo
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: another precious commit message
-
-
-Moving bookmarks, preserve active bookmark:
-
- $ hg book book1
- $ hg book book2
- $ hg ci --amend -m 'move bookmarks'
- saved backup bundle to $TESTTMP/.hg/strip-backup/fb6cca43446f-amend-backup.hg (glob)
- $ hg book
- book1 1:0cf1c7a51bcf
- * book2 1:0cf1c7a51bcf
- $ echo a >> a
- $ hg ci --amend -m 'move bookmarks'
- saved backup bundle to $TESTTMP/.hg/strip-backup/0cf1c7a51bcf-amend-backup.hg (glob)
- $ hg book
- book1 1:7344472bd951
- * book2 1:7344472bd951
-
- $ echo '[defaults]' >> $HGRCPATH
- $ echo "commit=-d '0 0'" >> $HGRCPATH
-
-Moving branches:
-
- $ hg branch foo
- marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
- $ echo a >> a
- $ hg ci -m 'branch foo'
- $ hg branch default -f
- marked working directory as branch default
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci --amend -m 'back to default'
- saved backup bundle to $TESTTMP/.hg/strip-backup/1661ca36a2db-amend-backup.hg (glob)
- $ hg branches
- default 2:f24ee5961967
-
-Close branch:
-
- $ hg up -q 0
- $ echo b >> b
- $ hg branch foo
- marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -Am 'fork'
- adding b
- $ echo b >> b
- $ hg ci -mb
- $ hg ci --amend --close-branch -m 'closing branch foo'
- saved backup bundle to $TESTTMP/.hg/strip-backup/c962248fa264-amend-backup.hg (glob)
-
-Same thing, different code path:
-
- $ echo b >> b
- $ hg ci -m 'reopen branch'
- reopening closed branch head 4
- $ echo b >> b
- $ hg ci --amend --close-branch
- saved backup bundle to $TESTTMP/.hg/strip-backup/5e302dcc12b8-amend-backup.hg (glob)
- $ hg branches
- default 2:f24ee5961967
-
-Refuse to amend merges:
-
- $ hg up -q default
- $ hg merge foo
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci --amend
- abort: cannot amend while merging
- [255]
- $ hg ci -m 'merge'
- $ hg ci --amend
- abort: cannot amend merge changesets
- [255]
-
-Follow copies/renames:
-
- $ hg mv b c
- $ hg ci -m 'b -> c'
- $ hg mv c d
- $ hg ci --amend -m 'b -> d'
- saved backup bundle to $TESTTMP/.hg/strip-backup/9c207120aa98-amend-backup.hg (glob)
- $ hg st --rev '.^' --copies d
- A d
- b
- $ hg cp d e
- $ hg ci -m 'e = d'
- $ hg cp e f
- $ hg ci --amend -m 'f = d'
- saved backup bundle to $TESTTMP/.hg/strip-backup/fda2b3b27b22-amend-backup.hg (glob)
- $ hg st --rev '.^' --copies f
- A f
- d
-
- $ mv f f.orig
- $ hg rm -A f
- $ hg ci -m removef
- $ hg cp a f
- $ mv f.orig f
- $ hg ci --amend -m replacef
- saved backup bundle to $TESTTMP/.hg/strip-backup/20a7413547f9-amend-backup.hg (glob)
- $ hg st --change . --copies
- $ hg log -r . --template "{file_copies}\n"
-
-
-Move added file (issue3410):
-
- $ echo g >> g
- $ hg ci -Am g
- adding g
- $ hg mv g h
- $ hg ci --amend
- saved backup bundle to $TESTTMP/.hg/strip-backup/5daa77a5d616-amend-backup.hg (glob)
- $ hg st --change . --copies h
- A h
- $ hg log -r . --template "{file_copies}\n"
-
-
-Can't rollback an amend:
-
- $ hg rollback
- no rollback information available
- [1]
-
-Preserve extra dict (issue3430):
-
- $ hg branch a
- marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
- $ echo a >> a
- $ hg ci -ma
- $ hg ci --amend -m "a'"
- saved backup bundle to $TESTTMP/.hg/strip-backup/167f8e3031df-amend-backup.hg (glob)
- $ hg log -r . --template "{branch}\n"
- a
- $ hg ci --amend -m "a''"
- saved backup bundle to $TESTTMP/.hg/strip-backup/ceac1a44c806-amend-backup.hg (glob)
- $ hg log -r . --template "{branch}\n"
- a
-
-Also preserve other entries in the dict that are in the old commit,
-first graft something so there's an additional entry:
-
- $ hg up 0 -q
- $ echo z > z
- $ hg ci -Am 'fork'
- adding z
- created new head
- $ hg up 11
- 5 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg graft 12
- grafting revision 12
- $ hg ci --amend -m 'graft amend'
- saved backup bundle to $TESTTMP/.hg/strip-backup/18a5124daf7a-amend-backup.hg (glob)
- $ hg log -r . --debug | grep extra
- extra: branch=a
- extra: source=2647734878ef0236dda712fae9c1651cf694ea8a
diff --git a/tests/test-commit-copy.t b/tests/test-commit-copy.t
new file mode 100644
index 0000000..4ca44c2
--- /dev/null
+++ b/tests/test-commit-copy.t
@@ -0,0 +1,16 @@
+ $ hg init dir
+ $ cd dir
+ $ echo bleh > bar
+ $ hg add bar
+ $ hg ci -m 'add bar'
+
+ $ hg cp bar foo
+ $ echo >> bar
+ $ hg ci -m 'cp bar foo; change bar'
+
+ $ hg debugrename foo
+ foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
+ $ hg debugindex bar
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 6 0 0 26d3ca0dfd18 000000000000 000000000000
+ 1 6 7 1 1 d267bddd54f7 26d3ca0dfd18 000000000000
diff --git a/tests/test-commit-multiple.t b/tests/test-commit-multiple.t
index 3337b76..a7dcc90 100644
--- a/tests/test-commit-multiple.t
+++ b/tests/test-commit-multiple.t
@@ -31,7 +31,6 @@ add initial changesets
commit bug fixes on bug fix branch
$ hg branch fixes
marked working directory as branch fixes
- (branches are permanent and global, did you want a bookmark?)
$ echo fix1 > bugfix
$ echo fix1 >> file1
$ hg ci -Am"fix 1"
@@ -53,7 +52,6 @@ transplant bug fixes onto release branch
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg branch release
marked working directory as branch release
- (branches are permanent and global, did you want a bookmark?)
$ hg transplant 2 3
applying [0-9a-f]{12} (re)
[0-9a-f]{12} transplanted to [0-9a-f]{12} (re)
@@ -129,5 +127,3 @@ Do a size-preserving modification outside of that process
5 fix 2 bugfix file1
6 x bugfix file1
7 y file1
-
- $ cd ..
diff --git a/tests/test-commit-unresolved.t b/tests/test-commit-unresolved.t
index 70a3300..9a96698 100644
--- a/tests/test-commit-unresolved.t
+++ b/tests/test-commit-unresolved.t
@@ -29,7 +29,7 @@ Merging a conflict araises
$ hg merge
merging A
warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging A failed!
1 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -45,5 +45,3 @@ Mark the conflict as resolved and commit
$ hg resolve -m A
$ hg commit -m "Merged"
-
- $ cd ..
diff --git a/tests/test-commit.t b/tests/test-commit.t
index 21fd277..afe4b79 100644
--- a/tests/test-commit.t
+++ b/tests/test-commit.t
@@ -43,7 +43,7 @@ commit added file that has been deleted
$ mkdir dir
$ echo boo > dir/file
$ hg add
- adding dir/file (glob)
+ adding dir/file
$ hg -v commit -m commit-9 dir
dir/file
committed changeset 2:d2a76177cb42
@@ -71,16 +71,12 @@ commit added file that has been deleted
$ cd ..
$ hg commit -m commit-14 does-not-exist
- abort: does-not-exist: * (glob)
+ abort: does-not-exist: No such file or directory
[255]
-
-#if symlink
$ ln -s foo baz
$ hg commit -m commit-15 baz
abort: baz: file not tracked!
[255]
-#endif
-
$ touch quux
$ hg commit -m commit-16 quux
abort: quux: file not tracked!
@@ -117,8 +113,8 @@ partial subdir commit test
$ mkdir bar
$ echo bar > bar/bar
$ hg add
- adding bar/bar (glob)
- adding foo/foo (glob)
+ adding bar/bar
+ adding foo/foo
$ hg ci -m commit-subdir-1 foo
$ hg ci -m commit-subdir-2 bar
@@ -222,6 +218,7 @@ subdir log
Issue1049: Hg permits partial commit of merge without warning
+ $ cd ..
$ hg init issue1049
$ cd issue1049
$ echo a > a
@@ -282,26 +279,3 @@ test commit message content
HG: removed removed
abort: empty commit message
[255]
- $ cd ..
-
-
-commit copy
-
- $ hg init dir2
- $ cd dir2
- $ echo bleh > bar
- $ hg add bar
- $ hg ci -m 'add bar'
-
- $ hg cp bar foo
- $ echo >> bar
- $ hg ci -m 'cp bar foo; change bar'
-
- $ hg debugrename foo
- foo renamed from bar:26d3ca0dfd18e44d796b564e38dd173c9668d3a9
- $ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 6 ..... 0 26d3ca0dfd18 000000000000 000000000000 (re)
- 1 6 7 ..... 1 d267bddd54f7 26d3ca0dfd18 000000000000 (re)
-
- $ cd ..
diff --git a/tests/test-committer.t b/tests/test-committer.t
index 5208f4e..ab35790 100644
--- a/tests/test-committer.t
+++ b/tests/test-committer.t
@@ -53,7 +53,7 @@
[255]
$ rm .hg/hgrc
$ hg commit -m commit-1 2>&1
- no username found, using '[^']*' instead (re)
+ No username found, using '[^']*' instead (re)
$ echo space > asdf
$ hg commit -u ' ' -m commit-1
@@ -61,5 +61,3 @@
rollback completed
abort: empty username!
[255]
-
- $ cd ..
diff --git a/tests/test-config-case.t b/tests/test-config-case.t
index 9ef0be8..da0eeba 100644
--- a/tests/test-config-case.t
+++ b/tests/test-config-case.t
@@ -1,6 +1,3 @@
-hide outer repo
- $ hg init
-
$ echo '[Section]' >> $HGRCPATH
$ echo 'KeY = Case Sensitive' >> $HGRCPATH
$ echo 'key = lower case' >> $HGRCPATH
diff --git a/tests/test-conflict.t b/tests/test-conflict.t
index 113b429..30c8b9b 100644
--- a/tests/test-conflict.t
+++ b/tests/test-conflict.t
@@ -13,7 +13,7 @@
$ hg merge 1
merging a
warning: conflicts during merge.
- merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
diff --git a/tests/test-contrib.t b/tests/test-contrib.t
index 98acb43..a1e7683 100644
--- a/tests/test-contrib.t
+++ b/tests/test-contrib.t
@@ -1,6 +1,6 @@
Set vars:
- $ CONTRIBDIR="$TESTDIR/../contrib"
+ $ CONTRIBDIR=$TESTDIR/../contrib
Prepare repo-a:
@@ -26,7 +26,7 @@ Prepare repo-a:
Dumping revlog of file a to stdout:
- $ python "$CONTRIBDIR/dumprevlog" .hg/store/data/a.i
+ $ python $CONTRIBDIR/dumprevlog .hg/store/data/a.i
file: .hg/store/data/a.i
node: 183d2312b35066fb6b3b449b84efc370d50993d0
linkrev: 0
@@ -58,14 +58,14 @@ Dumping revlog of file a to stdout:
Dump all revlogs to file repo.dump:
- $ find .hg/store -name "*.i" | sort | xargs python "$CONTRIBDIR/dumprevlog" > ../repo.dump
+ $ find .hg/store -name "*.i" | sort | xargs python $CONTRIBDIR/dumprevlog > ../repo.dump
$ cd ..
Undumping into repo-b:
$ hg init repo-b
$ cd repo-b
- $ python "$CONTRIBDIR/undumprevlog" < ../repo.dump
+ $ python $CONTRIBDIR/undumprevlog < ../repo.dump
.hg/store/00changelog.i
.hg/store/00manifest.i
.hg/store/data/a.i
@@ -104,12 +104,10 @@ Compare repos:
[1]
-#if hardlink
-
Test shrink-revlog:
$ cd repo-a
- $ hg --config extensions.shrink="$CONTRIBDIR/shrink-revlog.py" shrink
- shrinking $TESTTMP/repo-a/.hg/store/00manifest.i (glob)
+ $ hg --config extensions.shrink=$CONTRIBDIR/shrink-revlog.py shrink
+ shrinking $TESTTMP/repo-a/.hg/store/00manifest.i
reading revs
sorting revs
writing revs
@@ -117,8 +115,8 @@ Test shrink-revlog:
new file size: 324 bytes ( 0.0 MiB)
shrinkage: 0.0% (1.0x)
note: old revlog saved in:
- $TESTTMP/repo-a/.hg/store/00manifest.i.old (glob)
- $TESTTMP/repo-a/.hg/store/00manifest.d.old (glob)
+ $TESTTMP/repo-a/.hg/store/00manifest.i.old
+ $TESTTMP/repo-a/.hg/store/00manifest.d.old
(You can delete those files when you are satisfied that your
repository is still sane. Running 'hg verify' is strongly recommended.)
$ hg verify
@@ -129,8 +127,6 @@ Test shrink-revlog:
1 files, 3 changesets, 3 total revisions
$ cd ..
-#endif
-
Test simplemerge command:
$ cp "$CONTRIBDIR/simplemerge" .
diff --git a/tests/test-convert-authormap.t b/tests/test-convert-authormap.t
index 9d5ca9f..bc17837 100644
--- a/tests/test-convert-authormap.t
+++ b/tests/test-convert-authormap.t
@@ -22,12 +22,12 @@ Explicit --authors
> EOF
$ hg convert --authors authormap.txt orig new
initializing destination new repository
- ignoring bad line in author map file authormap.txt: this line is ignored
+ Ignoring bad line in author map file authormap.txt: this line is ignored
scanning source...
sorting...
converting...
0 foo
- writing author map file $TESTTMP/new/.hg/authormap (glob)
+ Writing author map file new/.hg/authormap
$ cat new/.hg/authormap
user name=Long User Name
$ hg -Rnew log
@@ -44,7 +44,7 @@ Implicit .hg/authormap
$ hg init new
$ mv authormap.txt new/.hg/authormap
$ hg convert orig new
- ignoring bad line in author map file $TESTTMP/new/.hg/authormap: this line is ignored (glob)
+ Ignoring bad line in author map file new/.hg/authormap: this line is ignored
scanning source...
sorting...
converting...
diff --git a/tests/test-convert-baz b/tests/test-convert-baz
new file mode 100755
index 0000000..699cca5
--- /dev/null
+++ b/tests/test-convert-baz
@@ -0,0 +1,79 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" baz || exit 80
+
+baz my-id "mercurial <mercurial@selenic.com>"
+
+echo "[extensions]" >> $HGRCPATH
+echo "convert=" >> $HGRCPATH
+echo 'graphlog =' >> $HGRCPATH
+
+echo % create baz archive
+baz make-archive baz@mercurial--convert hg-test-convert-baz
+
+echo % initialize baz repo
+mkdir baz-repo
+cd baz-repo/
+baz init-tree baz@mercurial--convert/baz--test--0
+baz import
+
+echo % create initial files
+echo 'this is a file' > a
+baz add a
+mkdir src
+baz add src
+cd src
+dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null
+baz add b
+# HACK: hide GNU tar-1.22 "tar: The --preserve option is deprecated, use --preserve-permissions --preserve-order instead"
+baz commit -s "added a file, src and src/b (binary)" 2>&1 | grep -v '^tar'
+
+echo % create link file and modify a
+ln -s ../a a-link
+baz add a-link
+echo 'this a modification to a' >> ../a
+baz commit -s "added link to a and modify a"
+
+echo % create second link and modify b
+ln -s ../a a-link-2
+baz add a-link-2
+dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null
+baz commit -s "added second link and modify b"
+
+echo % b file to link and a-link-2 to regular file
+rm -f a-link-2
+echo 'this is now a regular file' > a-link-2
+ln -sf ../a b
+baz commit -s "file to link and link to file test"
+
+echo % move a-link-2 file and src directory
+cd ..
+baz mv src/a-link-2 c
+baz mv src test
+baz commit -s "move and rename a-link-2 file and src directory"
+
+echo % move and add the moved file again
+echo e > e
+baz add e
+baz commit -s "add e"
+baz mv e f
+echo ee > e
+baz add e
+baz commit -s "move e and recreate it again"
+cd ..
+
+echo % converting baz repo to Mercurial
+hg convert baz-repo baz-repo-hg
+
+baz register-archive -d baz@mercurial--convert
+
+glog()
+{
+ hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
+}
+
+echo % show graph log
+glog -R baz-repo-hg
+hg up -q -R baz-repo-hg
+hg -R baz-repo-hg manifest --debug
+hg -R baz-repo-hg log -r 5 -r 7 -C --debug | grep copies
diff --git a/tests/test-convert-baz.out b/tests/test-convert-baz.out
new file mode 100644
index 0000000..fc7d35e
--- /dev/null
+++ b/tests/test-convert-baz.out
@@ -0,0 +1,96 @@
+% create baz archive
+% initialize baz repo
+* creating version baz@mercurial--convert/baz--test--0
+* imported baz@mercurial--convert/baz--test--0
+% create initial files
+* build pristine tree for baz@mercurial--convert/baz--test--0--base-0
+* Scanning for full-tree revision: .
+* from import revision: baz@mercurial--convert/baz--test--0--base-0
+A/ .arch-ids
+A/ src
+A/ src/.arch-ids
+A .arch-ids/a.id
+A a
+A src/.arch-ids/=id
+A src/.arch-ids/b.id
+A src/b
+* update pristine tree (baz@mercurial--convert/baz--test--0--base-0 => baz--test--0--patch-1)
+* committed baz@mercurial--convert/baz--test--0--patch-1
+% create link file and modify a
+A src/.arch-ids/a-link.id
+A src/a-link
+M a
+* update pristine tree (baz@mercurial--convert/baz--test--0--patch-1 => baz--test--0--patch-2)
+* committed baz@mercurial--convert/baz--test--0--patch-2
+% create second link and modify b
+A src/.arch-ids/a-link-2.id
+A src/a-link-2
+Mb src/b
+* update pristine tree (baz@mercurial--convert/baz--test--0--patch-2 => baz--test--0--patch-3)
+* committed baz@mercurial--convert/baz--test--0--patch-3
+% b file to link and a-link-2 to regular file
+fl src/b
+lf src/a-link-2
+* update pristine tree (baz@mercurial--convert/baz--test--0--patch-3 => baz--test--0--patch-4)
+* committed baz@mercurial--convert/baz--test--0--patch-4
+% move a-link-2 file and src directory
+D/ src/.arch-ids
+A/ test/.arch-ids
+/> src test
+=> src/.arch-ids/a-link-2.id .arch-ids/c.id
+=> src/a-link-2 c
+=> src/.arch-ids/=id test/.arch-ids/=id
+=> src/.arch-ids/a-link.id test/.arch-ids/a-link.id
+=> src/.arch-ids/b.id test/.arch-ids/b.id
+* update pristine tree (baz@mercurial--convert/baz--test--0--patch-4 => baz--test--0--patch-5)
+* committed baz@mercurial--convert/baz--test--0--patch-5
+% move and add the moved file again
+A .arch-ids/e.id
+A e
+* update pristine tree (baz@mercurial--convert/baz--test--0--patch-5 => baz--test--0--patch-6)
+* committed baz@mercurial--convert/baz--test--0--patch-6
+A .arch-ids/e.id
+A e
+=> .arch-ids/e.id .arch-ids/f.id
+=> e f
+* update pristine tree (baz@mercurial--convert/baz--test--0--patch-6 => baz--test--0--patch-7)
+* committed baz@mercurial--convert/baz--test--0--patch-7
+% converting baz repo to Mercurial
+initializing destination baz-repo-hg repository
+analyzing tree version baz@mercurial--convert/baz--test--0...
+scanning source...
+sorting...
+converting...
+7 initial import
+6 added a file, src and src/b (binary)
+5 added link to a and modify a
+4 added second link and modify b
+3 file to link and link to file test
+2 move and rename a-link-2 file and src directory
+1 add e
+0 move e and recreate it again
+% show graph log
+o 7 "move e and recreate it again" files: e f
+|
+o 6 "add e" files: e
+|
+o 5 "move and rename a-link-2 file and src directory" files: c src/a-link src/a-link-2 src/b test/a-link test/b
+|
+o 4 "file to link and link to file test" files: src/a-link-2 src/b
+|
+o 3 "added second link and modify b" files: src/a-link-2 src/b
+|
+o 2 "added link to a and modify a" files: a src/a-link
+|
+o 1 "added a file, src and src/b (binary)" files: a src/b
+|
+o 0 "initial import" files:
+
+c4072c4b72e1cabace081888efa148ee80ca3cbb 644 a
+0201ac32a3a8e86e303dff60366382a54b48a72e 644 c
+1a4a864db0073705a11b1439f563bfa4b46d9246 644 e
+09e0222742fc3f75777fa9d68a5d8af7294cb5e7 644 f
+c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link
+375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b
+copies: c (src/a-link-2) test/a-link (src/a-link) test/b (src/b)
+copies: f (e)
diff --git a/tests/test-convert-baz.t b/tests/test-convert-baz.t
deleted file mode 100644
index 763e83c..0000000
--- a/tests/test-convert-baz.t
+++ /dev/null
@@ -1,163 +0,0 @@
- $ "$TESTDIR/hghave" baz symlink || exit 80
-
- $ baz my-id "mercurial <mercurial@selenic.com>"
-
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "convert=" >> $HGRCPATH
- $ echo 'graphlog =' >> $HGRCPATH
-
-create baz archive
- $ baz make-archive baz@mercurial--convert hg-test-convert-baz
-
-initialize baz repo
- $ mkdir baz-repo
- $ cd baz-repo/
- $ baz init-tree baz@mercurial--convert/baz--test--0
- $ baz import
- * creating version baz@mercurial--convert/baz--test--0
- * imported baz@mercurial--convert/baz--test--0
-
-create initial files
- $ echo 'this is a file' > a
- $ baz add a
- $ mkdir src
- $ baz add src
- $ cd src
- $ dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null
- $ baz add b
-HACK: hide GNU tar-1.22 "tar: The --preserve option is deprecated, use --preserve-permissions --preserve-order instead"
- $ baz commit -s "added a file, src and src/b (binary)" 2>&1 | grep -v '^tar'
- * build pristine tree for baz@mercurial--convert/baz--test--0--base-0
- * Scanning for full-tree revision: .
- * from import revision: baz@mercurial--convert/baz--test--0--base-0
- A/ .arch-ids
- A/ src
- A/ src/.arch-ids
- A .arch-ids/a.id
- A a
- A src/.arch-ids/=id
- A src/.arch-ids/b.id
- A src/b
- * update pristine tree (baz@mercurial--convert/baz--test--0--base-0 => baz--test--0--patch-1)
- * committed baz@mercurial--convert/baz--test--0--patch-1
-
-create link file and modify a
- $ ln -s ../a a-link
- $ baz add a-link
- $ echo 'this a modification to a' >> ../a
- $ baz commit -s "added link to a and modify a"
- A src/.arch-ids/a-link.id
- A src/a-link
- M a
- * update pristine tree (baz@mercurial--convert/baz--test--0--patch-1 => baz--test--0--patch-2)
- * committed baz@mercurial--convert/baz--test--0--patch-2
-
-create second link and modify b
- $ ln -s ../a a-link-2
- $ baz add a-link-2
- $ dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null
- $ baz commit -s "added second link and modify b"
- A src/.arch-ids/a-link-2.id
- A src/a-link-2
- Mb src/b
- * update pristine tree (baz@mercurial--convert/baz--test--0--patch-2 => baz--test--0--patch-3)
- * committed baz@mercurial--convert/baz--test--0--patch-3
-
-b file to link and a-link-2 to regular file
- $ rm -f a-link-2
- $ echo 'this is now a regular file' > a-link-2
- $ ln -sf ../a b
- $ baz commit -s "file to link and link to file test"
- fl src/b
- lf src/a-link-2
- * update pristine tree (baz@mercurial--convert/baz--test--0--patch-3 => baz--test--0--patch-4)
- * committed baz@mercurial--convert/baz--test--0--patch-4
-
-move a-link-2 file and src directory
- $ cd ..
- $ baz mv src/a-link-2 c
- $ baz mv src test
- $ baz commit -s "move and rename a-link-2 file and src directory"
- D/ src/.arch-ids
- A/ test/.arch-ids
- /> src test
- => src/.arch-ids/a-link-2.id .arch-ids/c.id
- => src/a-link-2 c
- => src/.arch-ids/=id test/.arch-ids/=id
- => src/.arch-ids/a-link.id test/.arch-ids/a-link.id
- => src/.arch-ids/b.id test/.arch-ids/b.id
- * update pristine tree (baz@mercurial--convert/baz--test--0--patch-4 => baz--test--0--patch-5)
- * committed baz@mercurial--convert/baz--test--0--patch-5
-
-move and add the moved file again
- $ echo e > e
- $ baz add e
- $ baz commit -s "add e"
- A .arch-ids/e.id
- A e
- * update pristine tree (baz@mercurial--convert/baz--test--0--patch-5 => baz--test--0--patch-6)
- * committed baz@mercurial--convert/baz--test--0--patch-6
- $ baz mv e f
- $ echo ee > e
- $ baz add e
- $ baz commit -s "move e and recreate it again"
- A .arch-ids/e.id
- A e
- => .arch-ids/e.id .arch-ids/f.id
- => e f
- * update pristine tree (baz@mercurial--convert/baz--test--0--patch-6 => baz--test--0--patch-7)
- * committed baz@mercurial--convert/baz--test--0--patch-7
- $ cd ..
-
-converting baz repo to Mercurial
- $ hg convert baz-repo baz-repo-hg
- initializing destination baz-repo-hg repository
- analyzing tree version baz@mercurial--convert/baz--test--0...
- scanning source...
- sorting...
- converting...
- 7 initial import
- 6 added a file, src and src/b (binary)
- 5 added link to a and modify a
- 4 added second link and modify b
- 3 file to link and link to file test
- 2 move and rename a-link-2 file and src directory
- 1 add e
- 0 move e and recreate it again
-
- $ baz register-archive -d baz@mercurial--convert
-
- $ glog()
- > {
- > hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
- > }
-
-show graph log
- $ glog -R baz-repo-hg
- o 7 "move e and recreate it again" files: e f
- |
- o 6 "add e" files: e
- |
- o 5 "move and rename a-link-2 file and src directory" files: c src/a-link src/a-link-2 src/b test/a-link test/b
- |
- o 4 "file to link and link to file test" files: src/a-link-2 src/b
- |
- o 3 "added second link and modify b" files: src/a-link-2 src/b
- |
- o 2 "added link to a and modify a" files: a src/a-link
- |
- o 1 "added a file, src and src/b (binary)" files: a src/b
- |
- o 0 "initial import" files:
-
- $ hg up -q -R baz-repo-hg
- $ hg -R baz-repo-hg manifest --debug
- c4072c4b72e1cabace081888efa148ee80ca3cbb 644 a
- 0201ac32a3a8e86e303dff60366382a54b48a72e 644 c
- 1a4a864db0073705a11b1439f563bfa4b46d9246 644 e
- 09e0222742fc3f75777fa9d68a5d8af7294cb5e7 644 f
- c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link
- 375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b
- $ hg -R baz-repo-hg log -r 5 -r 7 -C --debug | grep copies
- copies: c (src/a-link-2) test/a-link (src/a-link) test/b (src/b)
- copies: f (e)
diff --git a/tests/test-convert-bzr-directories.t b/tests/test-convert-bzr-directories.t
index 653d7b1..613fd6a 100644
--- a/tests/test-convert-bzr-directories.t
+++ b/tests/test-convert-bzr-directories.t
@@ -149,45 +149,3 @@ directory replace
644 second/something
644 third/dummy
$ cd ..
-
-divergent nested renames (issue3089)
-
- $ mkdir test-divergent-renames
- $ cd test-divergent-renames
- $ bzr init -q source
- $ cd source
- $ mkdir -p a/c
- $ echo a > a/fa
- $ echo c > a/c/fc
- $ bzr add -q a
- $ bzr commit -q -m 'Initial layout'
- $ bzr mv a b
- a => b
- $ mkdir a
- $ bzr add a
- add(ed|ing) a (re)
- $ bzr mv b/c a/c
- b/c => a/c
- $ bzr status
- added:
- a/
- renamed:
- a/? => b/? (re)
- a/c/? => a/c/? (re)
- $ bzr commit -q -m 'Divergent renames'
- $ cd ..
- $ hg convert source source-hg
- initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial layout
- 0 Divergent renames
- $ hg -R source-hg st -C --change 1
- A b/fa
- a/fa
- R a/fa
- $ hg -R source-hg manifest -r 1
- a/c/fc
- b/fa
- $ cd ..
diff --git a/tests/test-convert-bzr-ghosts.t b/tests/test-convert-bzr-ghosts.t
index ef9cd96..d463115 100644
--- a/tests/test-convert-bzr-ghosts.t
+++ b/tests/test-convert-bzr-ghosts.t
@@ -30,9 +30,7 @@ ghost revisions
1 Initial layout setup
0 Commit with ghost revision
$ glog -R source-hg
- o 1@source "Commit with ghost revision" files: somefile
+ o 1 "Commit with ghost revision" files: somefile
|
- o 0@source "Initial layout setup" files: somefile
+ o 0 "Initial layout setup" files: somefile
-
- $ cd ..
diff --git a/tests/test-convert-bzr-merges.t b/tests/test-convert-bzr-merges.t
index 1c10bbc..92d45af 100644
--- a/tests/test-convert-bzr-merges.t
+++ b/tests/test-convert-bzr-merges.t
@@ -48,17 +48,17 @@ test multiple merges at once
1 Added brach2 file
0 Merged branches
$ glog -R source-hg
- o 5@source "(octopus merge fixup)" files:
+ o 5 "(octopus merge fixup)" files:
|\
- | o 4@source "Merged branches" files: file-branch2
+ | o 4 "Merged branches" files: file-branch2
| |\
- o---+ 3@source-branch2 "Added brach2 file" files: file-branch2
+ o---+ 3 "Added brach2 file" files: file-branch2
/ /
- | o 2@source "Added parent file" files: file-parent
+ | o 2 "Added parent file" files: file-parent
| |
- o | 1@source-branch1 "Added branch1 file" files: file file-branch1
+ o | 1 "Added branch1 file" files: file file-branch1
|/
- o 0@source "Initial add" files: file
+ o 0 "Initial add" files: file
$ manifest source-hg tip
% manifest of tip
@@ -66,5 +66,3 @@ test multiple merges at once
644 file-branch1
644 file-branch2
644 file-parent
-
- $ cd ..
diff --git a/tests/test-convert-bzr-treeroot.t b/tests/test-convert-bzr-treeroot.t
index 5e59e32..2929fe4 100644
--- a/tests/test-convert-bzr-treeroot.t
+++ b/tests/test-convert-bzr-treeroot.t
@@ -31,5 +31,3 @@ change the id of the tree root
$ manifest source-hg tip
% manifest of tip
644 file
-
- $ cd ..
diff --git a/tests/test-convert-bzr.t b/tests/test-convert-bzr.t
index 709df79..d75ef94 100644
--- a/tests/test-convert-bzr.t
+++ b/tests/test-convert-bzr.t
@@ -1,3 +1,4 @@
+
$ . "$TESTDIR/bzr-definitions"
create and rename on the same file in the same step
@@ -5,17 +6,6 @@ create and rename on the same file in the same step
$ mkdir test-createandrename
$ cd test-createandrename
$ bzr init -q source
-
-test empty repo conversion (issue3233)
-
- $ hg convert source source-hg
- initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
-
-back to the rename stuff
-
$ cd source
$ echo a > a
$ echo c > c
@@ -34,15 +24,16 @@ back to the rename stuff
$ bzr commit -q -m 'rename a into b, create a, rename c into d'
$ cd ..
$ hg convert source source-hg
+ initializing destination source-hg repository
scanning source...
sorting...
converting...
1 Initial add: a, c, e
0 rename a into b, create a, rename c into d
$ glog -R source-hg
- o 1@source "rename a into b, create a, rename c into d" files: a b c d e f
+ o 1 "rename a into b, create a, rename c into d" files: a b c d e f
|
- o 0@source "Initial add: a, c, e" files: a c e
+ o 0 "Initial add: a, c, e" files: a c e
manifest
@@ -62,7 +53,7 @@ test --rev option
converting...
0 Initial add: a, c, e
$ glog -R source-1-hg
- o 0@source "Initial add: a, c, e" files: a c e
+ o 0 "Initial add: a, c, e" files: a c e
test with filemap
@@ -85,12 +76,22 @@ test with filemap
convert from lightweight checkout
$ bzr checkout --lightweight source source-light
- $ hg convert -s bzr source-light source-light-hg
+ $ hg convert source-light source-light-hg
initializing destination source-light-hg repository
warning: lightweight checkouts may cause conversion failures, try with a regular branch instead.
- $TESTTMP/test-createandrename/source-light does not look like a Bazaar repository
- abort: source-light: missing or unsupported repository
- [255]
+ scanning source...
+ sorting...
+ converting...
+ 1 Initial add: a, c, e
+ 0 rename a into b, create a, rename c into d
+
+lightweight manifest
+
+ $ hg manifest -R source-light-hg -r tip
+ a
+ b
+ d
+ f
extract timestamps that look just like hg's {date|isodate}:
yyyy-mm-dd HH:MM zzzz (no seconds!)
@@ -145,18 +146,16 @@ merge
1 Editing b
0 Merged improve branch
$ glog -R source-hg
- o 3@source "Merged improve branch" files:
+ o 3 "Merged improve branch" files:
|\
- | o 2@source-improve "Editing b" files: b
+ | o 2 "Editing b" files: b
| |
- o | 1@source "Editing a" files: a
+ o | 1 "Editing a" files: a
|/
- o 0@source "Initial add" files: a b
+ o 0 "Initial add" files: a b
$ cd ..
-#if symlink execbit
-
symlinks and executable files
$ mkdir test-symlinks
@@ -199,88 +198,12 @@ symlinks and executable files
755 * newprog
644 program
644 @ syma
+ $ cd source-hg
test the symlinks can be recreated
- $ cd source-hg
$ hg up
5 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg cat syma; echo
a
- $ cd ../..
-
-#endif
-
-Multiple branches
-
- $ bzr init-repo -q --no-trees repo
- $ bzr init -q repo/trunk
- $ bzr co repo/trunk repo-trunk
- $ cd repo-trunk
- $ echo a > a
- $ bzr add -q a
- $ bzr ci -qm adda
- $ bzr tag trunk-tag
- Created tag trunk-tag.
- $ bzr switch -b branch
- Tree is up to date at revision 1.
- Switched to branch: *repo/branch/ (glob)
- $ sleep 1
- $ echo b > b
- $ bzr add -q b
- $ bzr ci -qm addb
- $ bzr tag branch-tag
- Created tag branch-tag.
- $ bzr switch --force ../repo/trunk
- Updated to revision 1.
- Switched to branch: */repo/trunk/ (glob)
- $ sleep 1
- $ echo a >> a
- $ bzr ci -qm changea
- $ cd ..
- $ hg convert --datesort repo repo-bzr
- initializing destination repo-bzr repository
- scanning source...
- sorting...
- converting...
- 2 adda
- 1 addb
- 0 changea
- updating tags
- $ (cd repo-bzr; glog)
- o 3@default "update tags" files: .hgtags
- |
- o 2@default "changea" files: a
- |
- | o 1@branch "addb" files: b
- |/
- o 0@default "adda" files: a
-
-
-Test tags (converted identifiers are not stable because bzr ones are
-not and get incorporated in extra fields).
-
- $ hg -R repo-bzr tags
- tip 3:* (glob)
- branch-tag 1:* (glob)
- trunk-tag 0:* (glob)
-Nested repositories (issue3254)
-
- $ bzr init-repo -q --no-trees repo/inner
- $ bzr init -q repo/inner/trunk
- $ bzr co repo/inner/trunk inner-trunk
- $ cd inner-trunk
- $ echo b > b
- $ bzr add -q b
- $ bzr ci -qm addb
- $ cd ..
- $ hg convert --datesort repo noinner-bzr
- initializing destination noinner-bzr repository
- scanning source...
- sorting...
- converting...
- 2 adda
- 1 addb
- 0 changea
- updating tags
diff --git a/tests/test-convert-clonebranches.t b/tests/test-convert-clonebranches.t
index 6a297ef..fa27e73 100644
--- a/tests/test-convert-clonebranches.t
+++ b/tests/test-convert-clonebranches.t
@@ -15,7 +15,6 @@ Add a merge with one parent in the same branch
$ hg up -qC 0
$ hg branch branch0
marked working directory as branch branch0
- (branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -qAm addb
$ hg up -qC
@@ -53,13 +52,11 @@ Add a merge with both parents and child in different branches
$ cd source
$ hg branch branch1
marked working directory as branch branch1
- (branches are permanent and global, did you want a bookmark?)
$ echo a > file1
$ hg ci -qAm c1
$ hg up -qC mergeab
$ hg branch branch2
marked working directory as branch branch2
- (branches are permanent and global, did you want a bookmark?)
$ echo a > file2
$ hg ci -qAm c2
$ hg merge branch1
@@ -67,7 +64,6 @@ Add a merge with both parents and child in different branches
(branch merge, don't forget to commit)
$ hg branch branch3
marked working directory as branch branch3
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -qAm c3
$ cd ..
diff --git a/tests/test-convert-cvs-branch.t b/tests/test-convert-cvs-branch.t
index ba35c02..d33d43f 100644
--- a/tests/test-convert-cvs-branch.t
+++ b/tests/test-convert-cvs-branch.t
@@ -190,4 +190,3 @@ issue 1447
b.txt:1.2->1.2.2.1
- $ cd ..
diff --git a/tests/test-convert-cvs.t b/tests/test-convert-cvs.t
index 365db71..91ace60 100644
--- a/tests/test-convert-cvs.t
+++ b/tests/test-convert-cvs.t
@@ -112,6 +112,7 @@ convert fresh repo with --filemap
1 import
filtering out empty revision
repository tip rolled back to revision 0 (undo commit)
+ working directory now based on revision -1
0 ci0
updating tags
$ hgcat b/c
@@ -143,9 +144,9 @@ convert full repository (issue1649)
sorting...
converting...
updating tags
- $ hg cat -r tip --cwd srcfull-hg src/a
+ $ hg cat -r tip srcfull-hg/src/a
a
- $ hg cat -r tip --cwd srcfull-hg src/b/c
+ $ hg cat -r tip srcfull-hg/src/b/c
c
c
@@ -458,4 +459,3 @@ testing debugcvsps
b/c:1.1.2.1->1.1.2.2
- $ cd ..
diff --git a/tests/test-convert-cvsnt-mergepoints.t b/tests/test-convert-cvsnt-mergepoints.t
index 1e3d02b..6e945da 100644
--- a/tests/test-convert-cvsnt-mergepoints.t
+++ b/tests/test-convert-cvsnt-mergepoints.t
@@ -91,8 +91,6 @@ script)
$ echo xyzzy > foo.txt
$ cvsci -m "merge1+clobber" foo.txt
-#if unix-permissions
-
return to trunk and merge MYBRANCH1_2
$ cvscall -Q update -P -A
@@ -103,7 +101,7 @@ return to trunk and merge MYBRANCH1_2
Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt
$ cvsci -m "merge2" foo.txt
$ REALCVS=`which cvs`
- $ echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat \"$TESTDIR/test-convert-cvsnt-mergepoints.rlog\"; exit 0; fi; done; $REALCVS \$*" > ../cvs
+ $ echo "for x in \$*; do if [ \"\$x\" = \"rlog\" ]; then echo \"RCS file: $CVSROOT/foo/foo.txt,v\"; cat $TESTDIR/test-convert-cvsnt-mergepoints.rlog; exit 0; fi; done; $REALCVS \$*" > ../cvs
$ chmod +x ../cvs
$ PATH=..:${PATH} hg debugcvsps --parents foo
collecting CVS rlog
@@ -202,6 +200,3 @@ return to trunk and merge MYBRANCH1_2
Members:
foo.txt:1.1.4.1->1.1.4.2
-#endif
-
- $ cd ..
diff --git a/tests/test-convert-darcs.t b/tests/test-convert-darcs.t
index b32cbde..0b4c17f 100644
--- a/tests/test-convert-darcs.t
+++ b/tests/test-convert-darcs.t
@@ -14,16 +14,12 @@ skip if we can't import elementtree
> exit 80
> fi
-#if no-outer-repo
-
try converting darcs1 repository
$ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs
$ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
darcs-1.0 repository format is unsupported, please upgrade
-#endif
-
initialize darcs repo
$ mkdir darcs-repo
@@ -36,7 +32,7 @@ initialize darcs repo
branch and update
- $ darcs get -q darcs-repo darcs-clone >/dev/null
+ $ darcs get darcs-repo darcs-clone >/dev/null
$ cd darcs-clone
$ echo c >> a
$ echo c > c
@@ -52,10 +48,11 @@ update source
$ darcs record -a -l -m p1.2
Finished recording patch 'p1.2'
- $ darcs pull -q -a --no-set-default ../darcs-clone
- Backing up ./a(*) (glob)
+ $ darcs pull -a ../darcs-clone
+ Backing up ./a(-darcs-backup0)
We have conflicts in the following files:
./a
+ Finished pulling and applying.
$ sleep 1
$ echo e > a
$ echo f > f
@@ -77,30 +74,64 @@ Test remove + move
$ darcs record -a -l -m p3
Finished recording patch 'p3'
-The converter does not currently handle patch conflicts very well.
-When they occur, it reverts *all* changes and moves forward,
-letting the conflict resolving patch fix collisions.
-Unfortunately, non-conflicting changes, like the addition of the
-"c" file in p1.1 patch are reverted too.
-Just to say that manifest not listing "c" here is a bug.
+test utf-8 commit message and author
+
+ $ echo g > g
+
+darcs is encoding agnostic, so it takes whatever bytes it's given
+ $ darcs record -a -l -m 'p4: desc ñ' -A 'author ñ'
+ Finished recording patch 'p4: desc \xc3\xb1' (esc)
+
+Test latin-1 commit message
+
+ $ echo h > h
+ $ printf "p5: desc " > ../p5
+ $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5
+ $ darcs record -a -l --logfile ../p5
+ Finished recording patch 'p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' (esc)
+
+ $ glog()
+ > {
+ > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
+ > }
$ cd ..
$ hg convert darcs-repo darcs-repo-hg
initializing destination darcs-repo-hg repository
scanning source...
sorting...
converting...
- 4 p0
- 3 p1.2
- 2 p1.1
- 1 p2
- 0 p3
- $ hg log -R darcs-repo-hg -g --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@"
- 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
- 3 "p2" (test@example.org) files: a dir/d dir/d2 f
- 2 "p1.1" (test@example.org) files:
- 1 "p1.2" (test@example.org) files: a b
- 0 "p0" (test@example.org) files: a
+ 6 p0
+ 5 p1.2
+ 4 p1.1
+ 3 p2
+ 2 p3
+ 1 p4: desc ?
+ 0 p5: desc ????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
+
+The converter does not currently handle patch conflicts very well.
+When they occur, it reverts *all* changes and moves forward,
+letting the conflict resolving patch fix collisions.
+Unfortunately, non-conflicting changes, like the addition of the
+"c" file in p1.1 patch are reverted too.
+Just to say that manifest not listing "c" here is a bug.
+
+ $ HGENCODING=latin-1 glog -R darcs-repo-hg -r 6
+ o 6 "p5: desc \xc2\x80\xc2\x81\xc2\x82\xc2\x83\xc2\x84\xc2\x85\xc2\x86\xc2\x87\xc2\x88\xc2\x89\xc2\x8a\xc2\x8b\xc2\x8c\xc2\x8d\xc2\x8e\xc2\x8f\xc2\x90\xc2\x91\xc2\x92\xc2\x93\xc2\x94\xc2\x95\xc2\x96\xc2\x97\xc2\x98\xc2\x99\xc2\x9a\xc2\x9b\xc2\x9c\xc2\x9d\xc2\x9e\xc2\x9f\xc2\xa0\xc2\xa1\xc2\xa2\xc2\xa3\xc2\xa4\xc2\xa5\xc2\xa6\xc2\xa7\xc2\xa8\xc2\xa9\xc2\xaa\xc2\xab\xc2\xac\xc2\xad\xc2\xae\xc2\xaf\xc2\xb0\xc2\xb1\xc2\xb2\xc2\xb3\xc2\xb4\xc2\xb5\xc2\xb6\xc2\xb7\xc2\xb8\xc2\xb9\xc2\xba\xc2\xbb\xc2\xbc\xc2\xbd\xc2\xbe\xc2\xbf\xc3\x80\xc3\x81\xc3\x82\xc3\x83\xc3\x84\xc3\x85\xc3\x86\xc3\x87\xc3\x88\xc3\x89\xc3\x8a\xc3\x8b\xc3\x8c\xc3\x8d\xc3\x8e\xc3\x8f\xc3\x90\xc3\x91\xc3\x92\xc3\x93\xc3\x94\xc3\x95\xc3\x96\xc3\x97\xc3\x98\xc3\x99\xc3\x9a\xc3\x9b\xc3\x9c\xc3\x9d\xc3\x9e\xc3\x9f\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4\xc3\xa5\xc3\xa6\xc3\xa7\xc3\xa8\xc3\xa9\xc3\xaa\xc3\xab\xc3\xac\xc3\xad\xc3\xae\xc3\xaf\xc3\xb0\xc3\xb1\xc3\xb2\xc3\xb3\xc3\xb4\xc3\xb5\xc3\xb6\xc3\xb7\xc3\xb8\xc3\xb9\xc3\xba\xc3\xbb\xc3\xbc\xc3\xbd\xc3\xbe\xc3\xbf" (test@example.org) files: h (esc)
+ |
+ $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5
+ o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g (esc)
+ |
+ o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff
+ |
+ o 3 "p2" (test@example.org) files: a dir/d dir/d2 f
+ |
+ o 2 "p1.1" (test@example.org) files:
+ |
+ o 1 "p1.2" (test@example.org) files: a b
+ |
+ o 0 "p0" (test@example.org) files: a
+
$ hg up -q -R darcs-repo-hg
$ hg -R darcs-repo-hg manifest --debug
@@ -108,3 +139,5 @@ Just to say that manifest not listing "c" here is a bug.
1e88685f5ddec574a34c70af492f95b6debc8741 644 b
37406831adc447ec2385014019599dfec953c806 644 dir2/d
b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff
+ 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g
+ fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h
diff --git a/tests/test-convert-datesort.t b/tests/test-convert-datesort.t
index 486f656..014d103 100644
--- a/tests/test-convert-datesort.t
+++ b/tests/test-convert-datesort.t
@@ -11,7 +11,6 @@
adding a
$ hg branch brancha
marked working directory as branch brancha
- (branches are permanent and global, did you want a bookmark?)
$ echo a >> a
$ hg ci -m a1 -d '2 0'
$ echo a >> a
@@ -22,7 +21,6 @@
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchb
marked working directory as branch branchb
- (branches are permanent and global, did you want a bookmark?)
$ echo b >> b
$ hg ci -Am b0 -d '6 0'
adding b
diff --git a/tests/test-convert-filemap.t b/tests/test-convert-filemap.t
index e351d7c..026284f 100644
--- a/tests/test-convert-filemap.t
+++ b/tests/test-convert-filemap.t
@@ -86,7 +86,8 @@ final file versions in this repo:
bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux
$ hg debugrename copied
copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
-
+ $ echo
+
$ cd ..
$ splitrepo()
> {
@@ -299,7 +300,6 @@ test branch closing revision pruning if branch is pruned
$ cd branchpruning
$ hg branch foo
marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
$ echo a > a
$ hg ci -Am adda
adding a
@@ -308,14 +308,12 @@ test branch closing revision pruning if branch is pruned
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch empty
marked working directory as branch empty
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m emptybranch
$ hg ci --close-branch -m closeempty
$ hg up 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch default
marked working directory as branch default
- (branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -Am addb
adding b
@@ -375,222 +373,3 @@ exercise incremental conversion at the same time
|
o 0 "addb" files: b
-
-filemap rename undoing revision rename
-
- $ hg init renameundo
- $ cd renameundo
- $ echo 1 > a
- $ echo 1 > c
- $ hg ci -qAm add
- $ hg mv -q a b/a
- $ hg mv -q c b/c
- $ hg ci -qm rename
- $ echo 2 > b/a
- $ echo 2 > b/c
- $ hg ci -qm modify
- $ cd ..
-
- $ echo "rename b ." > renameundo.fmap
- $ hg convert --filemap renameundo.fmap renameundo renameundo2
- initializing destination renameundo2 repository
- scanning source...
- sorting...
- converting...
- 2 add
- 1 rename
- filtering out empty revision
- repository tip rolled back to revision 0 (undo commit)
- 0 modify
- $ glog -R renameundo2
- o 1 "modify" files: a c
- |
- o 0 "add" files: a c
-
-
-
-test merge parents/empty merges pruning
-
- $ glog()
- > {
- > hg glog --template '{rev}:{node|short}@{branch} "{desc}" files: {files}\n' "$@"
- > }
-
-test anonymous branch pruning
-
- $ hg init anonymousbranch
- $ cd anonymousbranch
- $ echo a > a
- $ echo b > b
- $ hg ci -Am add
- adding a
- adding b
- $ echo a >> a
- $ hg ci -m changea
- $ hg up 0
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo b >> b
- $ hg ci -m changeb
- created new head
- $ hg up 1
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg merge
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m merge
- $ cd ..
-
- $ cat > filemap <<EOF
- > include a
- > EOF
- $ hg convert --filemap filemap anonymousbranch anonymousbranch-hg
- initializing destination anonymousbranch-hg repository
- scanning source...
- sorting...
- converting...
- 3 add
- 2 changea
- 1 changeb
- 0 merge
- $ glog -R anonymousbranch
- @ 3:c71d5201a498@default "merge" files:
- |\
- | o 2:607eb44b17f9@default "changeb" files: b
- | |
- o | 1:1f60ea617824@default "changea" files: a
- |/
- o 0:0146e6129113@default "add" files: a b
-
- $ glog -R anonymousbranch-hg
- o 1:cda818e7219b@default "changea" files: a
- |
- o 0:c334dc3be0da@default "add" files: a
-
- $ cat anonymousbranch-hg/.hg/shamap
- 0146e6129113dba9ac90207cfdf2d7ed35257ae5 c334dc3be0daa2a4e9ce4d2e2bdcba40c09d4916
- 1f60ea61782421edf8d051ff4fcb61b330f26a4a cda818e7219b5f7f3fb9f49780054ed6a1905ec3
- 607eb44b17f9348cd5cbd26e16af87ba77b0b037 c334dc3be0daa2a4e9ce4d2e2bdcba40c09d4916
- c71d5201a498b2658d105a6bf69d7a0df2649aea cda818e7219b5f7f3fb9f49780054ed6a1905ec3
-
- $ cat > filemap <<EOF
- > include b
- > EOF
- $ hg convert --filemap filemap anonymousbranch anonymousbranch-hg2
- initializing destination anonymousbranch-hg2 repository
- scanning source...
- sorting...
- converting...
- 3 add
- 2 changea
- 1 changeb
- 0 merge
- $ glog -R anonymousbranch
- @ 3:c71d5201a498@default "merge" files:
- |\
- | o 2:607eb44b17f9@default "changeb" files: b
- | |
- o | 1:1f60ea617824@default "changea" files: a
- |/
- o 0:0146e6129113@default "add" files: a b
-
- $ glog -R anonymousbranch-hg2
- o 1:62dd350b0df6@default "changeb" files: b
- |
- o 0:4b9ced861657@default "add" files: b
-
- $ cat anonymousbranch-hg2/.hg/shamap
- 0146e6129113dba9ac90207cfdf2d7ed35257ae5 4b9ced86165703791653059a1db6ed864630a523
- 1f60ea61782421edf8d051ff4fcb61b330f26a4a 4b9ced86165703791653059a1db6ed864630a523
- 607eb44b17f9348cd5cbd26e16af87ba77b0b037 62dd350b0df695f7d2c82a02e0499b16fd790f22
- c71d5201a498b2658d105a6bf69d7a0df2649aea 62dd350b0df695f7d2c82a02e0499b16fd790f22
-
-test named branch pruning
-
- $ hg init namedbranch
- $ cd namedbranch
- $ echo a > a
- $ echo b > b
- $ hg ci -Am add
- adding a
- adding b
- $ echo a >> a
- $ hg ci -m changea
- $ hg up 0
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg branch foo
- marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
- $ echo b >> b
- $ hg ci -m changeb
- $ hg up default
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg merge foo
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m merge
- $ cd ..
-
- $ cat > filemap <<EOF
- > include a
- > EOF
- $ hg convert --filemap filemap namedbranch namedbranch-hg
- initializing destination namedbranch-hg repository
- scanning source...
- sorting...
- converting...
- 3 add
- 2 changea
- 1 changeb
- 0 merge
- $ glog -R namedbranch
- @ 3:73899bcbe45c@default "merge" files:
- |\
- | o 2:8097982d19fc@foo "changeb" files: b
- | |
- o | 1:1f60ea617824@default "changea" files: a
- |/
- o 0:0146e6129113@default "add" files: a b
-
- $ glog -R namedbranch-hg
- o 1:cda818e7219b@default "changea" files: a
- |
- o 0:c334dc3be0da@default "add" files: a
-
-
- $ cd namedbranch
- $ hg --config extensions.mq= strip tip
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/namedbranch/.hg/strip-backup/73899bcbe45c-backup.hg (glob)
- $ hg up foo
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg merge default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m merge
- $ cd ..
-
- $ hg convert --filemap filemap namedbranch namedbranch-hg2
- initializing destination namedbranch-hg2 repository
- scanning source...
- sorting...
- converting...
- 3 add
- 2 changea
- 1 changeb
- 0 merge
- $ glog -R namedbranch
- @ 3:e1959de76e1b@foo "merge" files:
- |\
- | o 2:8097982d19fc@foo "changeb" files: b
- | |
- o | 1:1f60ea617824@default "changea" files: a
- |/
- o 0:0146e6129113@default "add" files: a b
-
- $ glog -R namedbranch-hg2
- o 2:dcf314454667@foo "merge" files:
- |\
- | o 1:cda818e7219b@default "changea" files: a
- |/
- o 0:c334dc3be0da@default "add" files: a
-
diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
index e4261b7..7b1c2aa 100644
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -1,9 +1,5 @@
$ "$TESTDIR/hghave" git || exit 80
- $ echo "[core]" >> $HOME/.gitconfig
- $ echo "autocrlf = false" >> $HOME/.gitconfig
- $ echo "[core]" >> $HOME/.gitconfig
- $ echo "autocrlf = false" >> $HOME/.gitconfig
$ echo "[extensions]" >> $HGRCPATH
$ echo "convert=" >> $HGRCPATH
$ echo 'hgext.graphlog =' >> $HGRCPATH
@@ -202,6 +198,8 @@ full conversion
354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz
9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo
88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux
+ $ echo
+
test binary conversion (issue 1359)
@@ -228,6 +226,8 @@ convert binary file
$ python -c 'print len(file("b", "rb").read())'
4096
$ cd ..
+ $ echo
+
test author vs committer
@@ -285,12 +285,9 @@ damage git repository and convert again
$ cat > damage.py <<EOF
> import os
- > import stat
> for root, dirs, files in os.walk('git-repo4/.git/objects'):
> if files:
> path = os.path.join(root, files[0])
- > if os.name == 'nt':
- > os.chmod(path, stat.S_IWUSR)
> os.remove(path)
> break
> EOF
diff --git a/tests/test-convert-hg-source.t b/tests/test-convert-hg-source.t
index a39b2b7..919d83e 100644
--- a/tests/test-convert-hg-source.t
+++ b/tests/test-convert-hg-source.t
@@ -1,3 +1,4 @@
+
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert=
@@ -17,7 +18,7 @@
$ hg ci -m 'make bar and baz copies of foo' -d '2 0'
created new head
$ hg bookmark premerge1
- $ hg merge -r 1
+ $ hg merge
merging baz and foo to baz
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
@@ -31,11 +32,7 @@
(branch merge, don't forget to commit)
$ hg ci -m 'merge remote copy' -d '4 0'
created new head
-#if execbit
$ chmod +x baz
-#else
- $ echo some other change to make sure we get a rev 5 > baz
-#endif
$ hg ci -m 'mark baz executable' -d '5 0'
$ cd ..
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
@@ -56,16 +53,9 @@
searching for changes
no changes found
[1]
-#if execbit
$ hg bookmarks
premerge1 3:973ef48a98a4
premerge2 5:13d9b87cf8f8
-#else
-Different hash because no x bit
- $ hg bookmarks
- premerge1 3:973ef48a98a4
- premerge2 5:df0779bcf33c
-#endif
$ cd ..
check shamap LF and CRLF handling
diff --git a/tests/test-convert-hg-startrev.t b/tests/test-convert-hg-startrev.t
index 4d62cf2..7424d89 100644
--- a/tests/test-convert-hg-startrev.t
+++ b/tests/test-convert-hg-startrev.t
@@ -115,7 +115,6 @@ Convert from merge parent
o 0 "1: add c" files: a b c
$ cd conv1
- $ hg up -q
Check copy preservation
diff --git a/tests/test-convert-hg-svn.t b/tests/test-convert-hg-svn.t
index d7ebedd..ef002a7 100644
--- a/tests/test-convert-hg-svn.t
+++ b/tests/test-convert-hg-svn.t
@@ -1,18 +1,15 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80
+ $ fix_path()
+ > {
+ > tr '\\' /
+ > }
$ echo "[extensions]" >> $HGRCPATH
$ echo "convert = " >> $HGRCPATH
$ echo "mq = " >> $HGRCPATH
-
- $ SVNREPOPATH=`pwd`/svn-repo
-#if windows
- $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#else
- $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#endif
-
- $ svnadmin create "$SVNREPOPATH"
- $ cat > "$SVNREPOPATH"/hooks/pre-revprop-change <<EOF
+ $ svnpath=`pwd | fix_path`/svn-repo
+ $ svnadmin create "$svnpath"
+ $ cat > "$svnpath"/hooks/pre-revprop-change <<EOF
> #!/bin/sh
>
> REPOS="$1"
@@ -28,10 +25,16 @@
> echo "Changing prohibited revision property" >&2
> exit 1
> EOF
- $ chmod +x "$SVNREPOPATH"/hooks/pre-revprop-change
- $ svn co "$SVNREPOURL" "$SVNREPOPATH"-wc
+ $ chmod +x "$svnpath"/hooks/pre-revprop-change
+ $
+ $ # SVN wants all paths to start with a slash. Unfortunately,
+ $ # Windows ones don't. Handle that.
+ $ svnurl="$svnpath"
+ $ expr "$svnurl" : "\/" > /dev/null || svnurl="/$svnurl"
+ $ svnurl="file://$svnurl"
+ $ svn co "$svnurl" "$svnpath"-wc
Checked out revision 0.
- $ cd "$SVNREPOPATH"-wc
+ $ cd "$svnpath"-wc
$ echo a > a
$ svn add a
A a
@@ -43,33 +46,33 @@
initial roundtrip
- $ hg convert -s svn -d hg "$SVNREPOPATH"-wc "$SVNREPOPATH"-hg | grep -v initializing
+ $ hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg | grep -v initializing
scanning source...
sorting...
converting...
0 added a
- $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
+ $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
scanning source...
sorting...
converting...
second roundtrip should do nothing
- $ hg convert -s svn -d hg "$SVNREPOPATH"-wc "$SVNREPOPATH"-hg
+ $ hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg
scanning source...
sorting...
converting...
- $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
+ $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
scanning source...
sorting...
converting...
new hg rev
- $ hg clone "$SVNREPOPATH"-hg "$SVNREPOPATH"-work
+ $ hg clone "$svnpath"-hg "$svnpath"-work
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd "$SVNREPOPATH"-work
+ $ cd "$svnpath"-work
$ echo b > b
$ hg add b
$ hg ci -mb
@@ -82,8 +85,8 @@ adding an empty revision
echo hg to svn
- $ hg --cwd "$SVNREPOPATH"-hg pull -q "$SVNREPOPATH"-work
- $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
+ $ hg --cwd "$svnpath"-hg pull -q "$svnpath"-work
+ $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
scanning source...
sorting...
converting...
@@ -92,14 +95,14 @@ echo hg to svn
svn back to hg should do nothing
- $ hg convert -s svn -d hg "$SVNREPOPATH"-wc "$SVNREPOPATH"-hg
+ $ hg convert -s svn -d hg "$svnpath"-wc "$svnpath"-hg
scanning source...
sorting...
converting...
hg back to svn should do nothing
- $ hg convert -s hg -d svn "$SVNREPOPATH"-hg "$SVNREPOPATH"-wc
+ $ hg convert -s hg -d svn "$svnpath"-hg "$svnpath"-wc
scanning source...
sorting...
converting...
diff --git a/tests/test-convert-p4 b/tests/test-convert-p4
new file mode 100755
index 0000000..3ae3c72
--- /dev/null
+++ b/tests/test-convert-p4
@@ -0,0 +1,75 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" p4 || exit 80
+
+echo "[extensions]" >> $HGRCPATH
+echo "convert = " >> $HGRCPATH
+
+echo % create p4 depot
+P4ROOT=`pwd`/depot; export P4ROOT
+P4AUDIT=$P4ROOT/audit; export P4AUDIT
+P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
+P4LOG=$P4ROOT/log; export P4LOG
+P4PORT=localhost:16661; export P4PORT
+P4DEBUG=1; export P4DEBUG
+
+echo % start the p4 server
+[ ! -d $P4ROOT ] && mkdir $P4ROOT
+p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
+trap "echo % stop the p4 server ; p4 admin stop" EXIT
+
+# wait for the server to initialize
+while ! p4 ; do
+ sleep 1
+done >/dev/null 2>/dev/null
+
+echo % create a client spec
+P4CLIENT=hg-p4-import; export P4CLIENT
+DEPOTPATH=//depot/test-mercurial-import/...
+p4 client -o | sed '/^View:/,$ d' >p4client
+echo View: >>p4client
+echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
+p4 client -i <p4client
+
+echo % populate the depot
+echo a > a
+mkdir b
+echo c > b/c
+p4 add a b/c
+p4 submit -d initial
+
+echo % change some files
+p4 edit a
+echo aa >> a
+p4 submit -d "change a"
+
+p4 edit b/c
+echo cc >> b/c
+p4 submit -d "change b/c"
+
+echo % convert
+hg convert -s p4 $DEPOTPATH dst
+hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
+
+echo % change some files
+p4 edit a b/c
+echo aaa >> a
+echo ccc >> b/c
+p4 submit -d "change a b/c"
+
+echo % convert again
+hg convert -s p4 $DEPOTPATH dst
+hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
+
+echo % interesting names
+echo dddd > "d d"
+mkdir " e"
+echo fff >" e/ f"
+p4 add "d d" " e/ f"
+p4 submit -d "add d e f"
+
+echo % convert again
+hg convert -s p4 $DEPOTPATH dst
+hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
+
+
diff --git a/tests/test-convert-p4-filetypes b/tests/test-convert-p4-filetypes
new file mode 100755
index 0000000..5c0e1a8
--- /dev/null
+++ b/tests/test-convert-p4-filetypes
@@ -0,0 +1,104 @@
+#!/bin/sh
+
+"$TESTDIR/hghave" p4 execbit symlink || exit 80
+
+echo "[extensions]" >> $HGRCPATH
+echo "convert = " >> $HGRCPATH
+
+echo % create p4 depot
+P4ROOT=`pwd`/depot; export P4ROOT
+P4AUDIT=$P4ROOT/audit; export P4AUDIT
+P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
+P4LOG=$P4ROOT/log; export P4LOG
+P4PORT=localhost:16661; export P4PORT
+P4DEBUG=1; export P4DEBUG
+P4CHARSET=utf8; export P4CHARSET
+
+echo % start the p4 server
+[ ! -d $P4ROOT ] && mkdir $P4ROOT
+p4d -f -J off -xi >$P4ROOT/stdout 2>$P4ROOT/stderr
+p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
+trap "echo % stop the p4 server ; p4 admin stop" EXIT
+
+# wait for the server to initialize
+while ! p4 ; do
+ sleep 1
+done >/dev/null 2>/dev/null
+
+echo % create a client spec
+P4CLIENT=hg-p4-import; export P4CLIENT
+DEPOTPATH=//depot/test-mercurial-import/...
+p4 client -o | sed '/^View:/,$ d' >p4client
+echo View: >>p4client
+echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
+p4 client -i <p4client
+
+echo % populate the depot
+TYPES="text binary symlink"
+TYPES="$TYPES text+m text+w text+x text+k text+kx text+ko text+l text+C text+D text+F text+S text+S2"
+TYPES="$TYPES binary+k binary+x binary+kx symlink+k"
+TYPES="$TYPES ctext cxtext ktext kxtext ltext tempobj ubinary uxbinary xbinary xltext xtempobj xtext"
+# not testing these
+#TYPES="$TYPES apple resource unicode utf16 uresource xunicode xutf16"
+for T in $TYPES ; do
+ T2=`echo $T | tr [:upper:] [:lower:]`
+ case $T in
+ apple)
+ ;;
+ symlink*)
+ echo "this is target $T" >target_$T2
+ ln -s target_$T file_$T2
+ p4 add target_$T2
+ p4 add -t $T file_$T2
+ ;;
+ binary*)
+ python -c "file('file_$T2', 'wb').write('this is $T')"
+ p4 add -t $T file_$T2
+ ;;
+ *)
+ echo "this is $T" >file_$T2
+ p4 add -t $T file_$T2
+ ;;
+ esac
+done
+p4 submit -d initial
+
+echo % test keyword expansion
+p4 edit file_* target_*
+for T in $TYPES ; do
+ T2=`echo $T | tr [:upper:] [:lower:]`
+ echo '$Id$' >>file_$T2
+ echo '$Header$' >>file_$T2
+ echo '$Date$' >>file_$T2
+ echo '$DateTime$' >>file_$T2
+ echo '$Change$' >>file_$T2
+ echo '$File$' >>file_$T2
+ echo '$Revision$' >>file_$T2
+ echo '$Header$$Header$Header$' >>file_$T2
+done
+
+ln -s 'target_$Header$' crazy_symlink+k
+p4 add -t symlink+k crazy_symlink+k
+
+p4 submit -d keywords
+
+echo % check keywords in p4
+grep -H Header file_*
+
+echo % convert
+hg convert -s p4 $DEPOTPATH dst
+hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'g
+
+echo % revision 0
+hg -R dst update 0
+head dst/file_* | cat -v
+
+echo
+echo % revision 1
+hg -R dst update 1
+head dst/file_* | cat -v
+echo
+echo % crazy_symlink
+readlink crazy_symlink+k
+readlink dst/crazy_symlink+k
+
diff --git a/tests/test-convert-p4-filetypes.out b/tests/test-convert-p4-filetypes.out
new file mode 100644
index 0000000..372c0d8
--- /dev/null
+++ b/tests/test-convert-p4-filetypes.out
@@ -0,0 +1,642 @@
+% create p4 depot
+% start the p4 server
+% create a client spec
+Client hg-p4-import saved.
+% populate the depot
+//depot/test-mercurial-import/file_text#1 - opened for add
+//depot/test-mercurial-import/file_binary#1 - opened for add
+//depot/test-mercurial-import/target_symlink#1 - opened for add
+//depot/test-mercurial-import/file_symlink#1 - opened for add
+//depot/test-mercurial-import/file_text+m#1 - opened for add
+//depot/test-mercurial-import/file_text+w#1 - opened for add
+//depot/test-mercurial-import/file_text+x#1 - opened for add
+//depot/test-mercurial-import/file_text+k#1 - opened for add
+//depot/test-mercurial-import/file_text+kx#1 - opened for add
+//depot/test-mercurial-import/file_text+ko#1 - opened for add
+//depot/test-mercurial-import/file_text+l#1 - opened for add
+//depot/test-mercurial-import/file_text+c#1 - opened for add
+//depot/test-mercurial-import/file_text+d#1 - opened for add
+//depot/test-mercurial-import/file_text+f#1 - opened for add
+//depot/test-mercurial-import/file_text+s#1 - opened for add
+//depot/test-mercurial-import/file_text+s2#1 - opened for add
+//depot/test-mercurial-import/file_binary+k#1 - opened for add
+//depot/test-mercurial-import/file_binary+x#1 - opened for add
+//depot/test-mercurial-import/file_binary+kx#1 - opened for add
+//depot/test-mercurial-import/target_symlink+k#1 - opened for add
+//depot/test-mercurial-import/file_symlink+k#1 - opened for add
+//depot/test-mercurial-import/file_ctext#1 - opened for add
+//depot/test-mercurial-import/file_cxtext#1 - opened for add
+//depot/test-mercurial-import/file_ktext#1 - opened for add
+//depot/test-mercurial-import/file_kxtext#1 - opened for add
+//depot/test-mercurial-import/file_ltext#1 - opened for add
+//depot/test-mercurial-import/file_tempobj#1 - opened for add
+//depot/test-mercurial-import/file_ubinary#1 - opened for add
+//depot/test-mercurial-import/file_uxbinary#1 - opened for add
+//depot/test-mercurial-import/file_xbinary#1 - opened for add
+//depot/test-mercurial-import/file_xltext#1 - opened for add
+//depot/test-mercurial-import/file_xtempobj#1 - opened for add
+//depot/test-mercurial-import/file_xtext#1 - opened for add
+Submitting change 1.
+Locking 33 files ...
+add //depot/test-mercurial-import/file_binary#1
+add //depot/test-mercurial-import/file_binary+k#1
+add //depot/test-mercurial-import/file_binary+kx#1
+add //depot/test-mercurial-import/file_binary+x#1
+add //depot/test-mercurial-import/file_ctext#1
+add //depot/test-mercurial-import/file_cxtext#1
+add //depot/test-mercurial-import/file_ktext#1
+add //depot/test-mercurial-import/file_kxtext#1
+add //depot/test-mercurial-import/file_ltext#1
+add //depot/test-mercurial-import/file_symlink#1
+add //depot/test-mercurial-import/file_symlink+k#1
+add //depot/test-mercurial-import/file_tempobj#1
+add //depot/test-mercurial-import/file_text#1
+add //depot/test-mercurial-import/file_text+c#1
+add //depot/test-mercurial-import/file_text+d#1
+add //depot/test-mercurial-import/file_text+f#1
+add //depot/test-mercurial-import/file_text+k#1
+add //depot/test-mercurial-import/file_text+ko#1
+add //depot/test-mercurial-import/file_text+kx#1
+add //depot/test-mercurial-import/file_text+l#1
+add //depot/test-mercurial-import/file_text+m#1
+add //depot/test-mercurial-import/file_text+s#1
+add //depot/test-mercurial-import/file_text+s2#1
+add //depot/test-mercurial-import/file_text+w#1
+add //depot/test-mercurial-import/file_text+x#1
+add //depot/test-mercurial-import/file_ubinary#1
+add //depot/test-mercurial-import/file_uxbinary#1
+add //depot/test-mercurial-import/file_xbinary#1
+add //depot/test-mercurial-import/file_xltext#1
+add //depot/test-mercurial-import/file_xtempobj#1
+add //depot/test-mercurial-import/file_xtext#1
+add //depot/test-mercurial-import/target_symlink#1
+add //depot/test-mercurial-import/target_symlink+k#1
+Change 1 submitted.
+//depot/test-mercurial-import/file_binary+k#1 - refreshing
+//depot/test-mercurial-import/file_binary+kx#1 - refreshing
+//depot/test-mercurial-import/file_ktext#1 - refreshing
+//depot/test-mercurial-import/file_kxtext#1 - refreshing
+//depot/test-mercurial-import/file_symlink+k#1 - refreshing
+//depot/test-mercurial-import/file_text+k#1 - refreshing
+//depot/test-mercurial-import/file_text+ko#1 - refreshing
+//depot/test-mercurial-import/file_text+kx#1 - refreshing
+% test keyword expansion
+//depot/test-mercurial-import/file_binary#1 - opened for edit
+//depot/test-mercurial-import/file_binary+k#1 - opened for edit
+//depot/test-mercurial-import/file_binary+kx#1 - opened for edit
+//depot/test-mercurial-import/file_binary+x#1 - opened for edit
+//depot/test-mercurial-import/file_ctext#1 - opened for edit
+//depot/test-mercurial-import/file_cxtext#1 - opened for edit
+//depot/test-mercurial-import/file_ktext#1 - opened for edit
+//depot/test-mercurial-import/file_kxtext#1 - opened for edit
+//depot/test-mercurial-import/file_ltext#1 - opened for edit
+//depot/test-mercurial-import/file_symlink#1 - opened for edit
+//depot/test-mercurial-import/file_symlink+k#1 - opened for edit
+//depot/test-mercurial-import/file_tempobj#1 - opened for edit
+//depot/test-mercurial-import/file_text#1 - opened for edit
+//depot/test-mercurial-import/file_text+c#1 - opened for edit
+//depot/test-mercurial-import/file_text+d#1 - opened for edit
+//depot/test-mercurial-import/file_text+f#1 - opened for edit
+//depot/test-mercurial-import/file_text+k#1 - opened for edit
+//depot/test-mercurial-import/file_text+ko#1 - opened for edit
+//depot/test-mercurial-import/file_text+kx#1 - opened for edit
+//depot/test-mercurial-import/file_text+l#1 - opened for edit
+//depot/test-mercurial-import/file_text+m#1 - opened for edit
+//depot/test-mercurial-import/file_text+s#1 - opened for edit
+//depot/test-mercurial-import/file_text+s2#1 - opened for edit
+//depot/test-mercurial-import/file_text+w#1 - opened for edit
+//depot/test-mercurial-import/file_text+x#1 - opened for edit
+//depot/test-mercurial-import/file_ubinary#1 - opened for edit
+//depot/test-mercurial-import/file_uxbinary#1 - opened for edit
+//depot/test-mercurial-import/file_xbinary#1 - opened for edit
+//depot/test-mercurial-import/file_xltext#1 - opened for edit
+//depot/test-mercurial-import/file_xtempobj#1 - opened for edit
+//depot/test-mercurial-import/file_xtext#1 - opened for edit
+//depot/test-mercurial-import/target_symlink#1 - opened for edit
+//depot/test-mercurial-import/target_symlink+k#1 - opened for edit
+//depot/test-mercurial-import/crazy_symlink+k#1 - opened for add
+Submitting change 2.
+Locking 34 files ...
+add //depot/test-mercurial-import/crazy_symlink+k#1
+edit //depot/test-mercurial-import/file_binary#2
+edit //depot/test-mercurial-import/file_binary+k#2
+edit //depot/test-mercurial-import/file_binary+kx#2
+edit //depot/test-mercurial-import/file_binary+x#2
+edit //depot/test-mercurial-import/file_ctext#2
+edit //depot/test-mercurial-import/file_cxtext#2
+edit //depot/test-mercurial-import/file_ktext#2
+edit //depot/test-mercurial-import/file_kxtext#2
+edit //depot/test-mercurial-import/file_ltext#2
+edit //depot/test-mercurial-import/file_symlink#2
+edit //depot/test-mercurial-import/file_symlink+k#2
+edit //depot/test-mercurial-import/file_tempobj#2
+edit //depot/test-mercurial-import/file_text#2
+edit //depot/test-mercurial-import/file_text+c#2
+edit //depot/test-mercurial-import/file_text+d#2
+edit //depot/test-mercurial-import/file_text+f#2
+edit //depot/test-mercurial-import/file_text+k#2
+edit //depot/test-mercurial-import/file_text+ko#2
+edit //depot/test-mercurial-import/file_text+kx#2
+edit //depot/test-mercurial-import/file_text+l#2
+edit //depot/test-mercurial-import/file_text+m#2
+edit //depot/test-mercurial-import/file_text+s#2
+edit //depot/test-mercurial-import/file_text+s2#2
+edit //depot/test-mercurial-import/file_text+w#2
+edit //depot/test-mercurial-import/file_text+x#2
+edit //depot/test-mercurial-import/file_ubinary#2
+edit //depot/test-mercurial-import/file_uxbinary#2
+edit //depot/test-mercurial-import/file_xbinary#2
+edit //depot/test-mercurial-import/file_xltext#2
+edit //depot/test-mercurial-import/file_xtempobj#2
+edit //depot/test-mercurial-import/file_xtext#2
+edit //depot/test-mercurial-import/target_symlink#2
+edit //depot/test-mercurial-import/target_symlink+k#2
+Change 2 submitted.
+//depot/test-mercurial-import/crazy_symlink+k#1 - refreshing
+//depot/test-mercurial-import/file_binary+k#2 - refreshing
+//depot/test-mercurial-import/file_binary+kx#2 - refreshing
+//depot/test-mercurial-import/file_ktext#2 - refreshing
+//depot/test-mercurial-import/file_kxtext#2 - refreshing
+//depot/test-mercurial-import/file_symlink+k#2 - refreshing
+//depot/test-mercurial-import/file_text+k#2 - refreshing
+//depot/test-mercurial-import/file_text+ko#2 - refreshing
+//depot/test-mercurial-import/file_text+kx#2 - refreshing
+% check keywords in p4
+file_binary:$Header$
+file_binary:$Header$$Header$Header$
+file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $
+file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $$Header: //depot/test-mercurial-import/file_binary+k#2 $Header$
+file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $
+file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $$Header: //depot/test-mercurial-import/file_binary+kx#2 $Header$
+file_binary+x:$Header$
+file_binary+x:$Header$$Header$Header$
+file_ctext:$Header$
+file_ctext:$Header$$Header$Header$
+file_cxtext:$Header$
+file_cxtext:$Header$$Header$Header$
+file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $
+file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $$Header: //depot/test-mercurial-import/file_ktext#2 $Header$
+file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $
+file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $$Header: //depot/test-mercurial-import/file_kxtext#2 $Header$
+file_ltext:$Header$
+file_ltext:$Header$$Header$Header$
+file_symlink:$Header$
+file_symlink:$Header$$Header$Header$
+file_symlink+k:$Header$
+file_symlink+k:$Header$$Header$Header$
+file_tempobj:$Header$
+file_tempobj:$Header$$Header$Header$
+file_text:$Header$
+file_text:$Header$$Header$Header$
+file_text+c:$Header$
+file_text+c:$Header$$Header$Header$
+file_text+d:$Header$
+file_text+d:$Header$$Header$Header$
+file_text+f:$Header$
+file_text+f:$Header$$Header$Header$
+file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $
+file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $$Header: //depot/test-mercurial-import/file_text+k#2 $Header$
+file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $
+file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $$Header: //depot/test-mercurial-import/file_text+ko#2 $Header$
+file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $
+file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $$Header: //depot/test-mercurial-import/file_text+kx#2 $Header$
+file_text+l:$Header$
+file_text+l:$Header$$Header$Header$
+file_text+m:$Header$
+file_text+m:$Header$$Header$Header$
+file_text+s:$Header$
+file_text+s:$Header$$Header$Header$
+file_text+s2:$Header$
+file_text+s2:$Header$$Header$Header$
+file_text+w:$Header$
+file_text+w:$Header$$Header$Header$
+file_text+x:$Header$
+file_text+x:$Header$$Header$Header$
+file_ubinary:$Header$
+file_ubinary:$Header$$Header$Header$
+file_uxbinary:$Header$
+file_uxbinary:$Header$$Header$Header$
+file_xbinary:$Header$
+file_xbinary:$Header$$Header$Header$
+file_xltext:$Header$
+file_xltext:$Header$$Header$Header$
+file_xtempobj:$Header$
+file_xtempobj:$Header$$Header$Header$
+file_xtext:$Header$
+file_xtext:$Header$$Header$Header$
+% convert
+initializing destination dst repository
+reading p4 views
+collecting p4 changelists
+1 initial
+2 keywords
+scanning source...
+sorting...
+converting...
+1 initial
+0 keywords
+rev=1 desc="keywords" tags="tip" files="crazy_symlink+k file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k"
+grev=0 desc="initial" tags="" files="file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_symlink file_symlink+k file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k"
+g% revision 0
+30 files updated, 0 files merged, 0 files removed, 0 files unresolved
+==> dst/file_binary <==
+this is binary
+==> dst/file_binary+k <==
+this is binary+k
+==> dst/file_binary+kx <==
+this is binary+kx
+==> dst/file_binary+x <==
+this is binary+x
+==> dst/file_ctext <==
+this is ctext
+
+==> dst/file_cxtext <==
+this is cxtext
+
+==> dst/file_ktext <==
+this is ktext
+
+==> dst/file_kxtext <==
+this is kxtext
+
+==> dst/file_ltext <==
+this is ltext
+
+==> dst/file_symlink <==
+this is target symlink
+
+==> dst/file_symlink+k <==
+this is target symlink+k
+
+==> dst/file_text <==
+this is text
+
+==> dst/file_text+c <==
+this is text+C
+
+==> dst/file_text+d <==
+this is text+D
+
+==> dst/file_text+f <==
+this is text+F
+
+==> dst/file_text+k <==
+this is text+k
+
+==> dst/file_text+ko <==
+this is text+ko
+
+==> dst/file_text+kx <==
+this is text+kx
+
+==> dst/file_text+l <==
+this is text+l
+
+==> dst/file_text+m <==
+this is text+m
+
+==> dst/file_text+s2 <==
+this is text+S2
+
+==> dst/file_text+w <==
+this is text+w
+
+==> dst/file_text+x <==
+this is text+x
+
+==> dst/file_ubinary <==
+this is ubinary
+
+==> dst/file_uxbinary <==
+this is uxbinary
+
+==> dst/file_xbinary <==
+this is xbinary
+
+==> dst/file_xltext <==
+this is xltext
+
+==> dst/file_xtext <==
+this is xtext
+
+% revision 1
+30 files updated, 0 files merged, 0 files removed, 0 files unresolved
+==> dst/file_binary <==
+this is binary$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_binary+k <==
+this is binary+k$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_binary+kx <==
+this is binary+kx$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_binary+x <==
+this is binary+x$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_ctext <==
+this is ctext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_cxtext <==
+this is cxtext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_ktext <==
+this is ktext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_kxtext <==
+this is kxtext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_ltext <==
+this is ltext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_symlink <==
+this is target symlink
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_symlink+k <==
+this is target symlink+k
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text <==
+this is text
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+c <==
+this is text+C
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+d <==
+this is text+D
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+f <==
+this is text+F
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+k <==
+this is text+k
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+ko <==
+this is text+ko
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+kx <==
+this is text+kx
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+l <==
+this is text+l
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+m <==
+this is text+m
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+s <==
+this is text+S
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+s2 <==
+this is text+S2
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+w <==
+this is text+w
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_text+x <==
+this is text+x
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_ubinary <==
+this is ubinary
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_uxbinary <==
+this is uxbinary
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_xbinary <==
+this is xbinary
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_xltext <==
+this is xltext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+==> dst/file_xtext <==
+this is xtext
+$Id$
+$Header$
+$Date$
+$DateTime$
+$Change$
+$File$
+$Revision$
+$Header$$Header$Header$
+
+% crazy_symlink
+target_$Header: //depot/test-mercurial-import/crazy_symlink+k#1 $
+target_$Header$
+% stop the p4 server
diff --git a/tests/test-convert-p4-filetypes.t b/tests/test-convert-p4-filetypes.t
deleted file mode 100644
index 3405486..0000000
--- a/tests/test-convert-p4-filetypes.t
+++ /dev/null
@@ -1,733 +0,0 @@
- $ "$TESTDIR/hghave" p4 execbit symlink || exit 80
-
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "convert = " >> $HGRCPATH
-
-create p4 depot
- $ P4ROOT=`pwd`/depot; export P4ROOT
- $ P4AUDIT=$P4ROOT/audit; export P4AUDIT
- $ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
- $ P4LOG=$P4ROOT/log; export P4LOG
- $ P4PORT=localhost:16661; export P4PORT
- $ P4DEBUG=1; export P4DEBUG
- $ P4CHARSET=utf8; export P4CHARSET
-
-start the p4 server
- $ [ ! -d $P4ROOT ] && mkdir $P4ROOT
- $ p4d -f -J off -xi >$P4ROOT/stdout 2>$P4ROOT/stderr
- $ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
- $ echo $! >> $DAEMON_PIDS
- $ trap "echo stopping the p4 server ; p4 admin stop" EXIT
-
-wait for the server to initialize
- $ while ! p4 ; do
- > sleep 1
- > done >/dev/null 2>/dev/null
-
-create a client spec
- $ P4CLIENT=hg-p4-import; export P4CLIENT
- $ DEPOTPATH=//depot/test-mercurial-import/...
- $ p4 client -o | sed '/^View:/,$ d' >p4client
- $ echo View: >>p4client
- $ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
- $ p4 client -i <p4client
- Client hg-p4-import saved.
-
-populate the depot
- $ TYPES="text binary symlink"
- $ TYPES="$TYPES text+m text+w text+x text+k text+kx text+ko text+l text+C text+D text+F text+S text+S2"
- $ TYPES="$TYPES binary+k binary+x binary+kx symlink+k"
- $ TYPES="$TYPES ctext cxtext ktext kxtext ltext tempobj ubinary uxbinary xbinary xltext xtempobj xtext"
-not testing these
- $ #TYPES="$TYPES apple resource unicode utf16 uresource xunicode xutf16"
- $ for T in $TYPES ; do
- > T2=`echo $T | tr [:upper:] [:lower:]`
- > case $T in
- > apple)
- > ;;
- > symlink*)
- > echo "this is target $T" >target_$T2
- > ln -s target_$T file_$T2
- > p4 add target_$T2
- > p4 add -t $T file_$T2
- > ;;
- > binary*)
- > python -c "file('file_$T2', 'wb').write('this is $T')"
- > p4 add -t $T file_$T2
- > ;;
- > *)
- > echo "this is $T" >file_$T2
- > p4 add -t $T file_$T2
- > ;;
- > esac
- > done
- //depot/test-mercurial-import/file_text#1 - opened for add
- //depot/test-mercurial-import/file_binary#1 - opened for add
- //depot/test-mercurial-import/target_symlink#1 - opened for add
- //depot/test-mercurial-import/file_symlink#1 - opened for add
- //depot/test-mercurial-import/file_text+m#1 - opened for add
- //depot/test-mercurial-import/file_text+w#1 - opened for add
- //depot/test-mercurial-import/file_text+x#1 - opened for add
- //depot/test-mercurial-import/file_text+k#1 - opened for add
- //depot/test-mercurial-import/file_text+kx#1 - opened for add
- //depot/test-mercurial-import/file_text+ko#1 - opened for add
- //depot/test-mercurial-import/file_text+l#1 - opened for add
- //depot/test-mercurial-import/file_text+c#1 - opened for add
- //depot/test-mercurial-import/file_text+d#1 - opened for add
- //depot/test-mercurial-import/file_text+f#1 - opened for add
- //depot/test-mercurial-import/file_text+s#1 - opened for add
- //depot/test-mercurial-import/file_text+s2#1 - opened for add
- //depot/test-mercurial-import/file_binary+k#1 - opened for add
- //depot/test-mercurial-import/file_binary+x#1 - opened for add
- //depot/test-mercurial-import/file_binary+kx#1 - opened for add
- //depot/test-mercurial-import/target_symlink+k#1 - opened for add
- //depot/test-mercurial-import/file_symlink+k#1 - opened for add
- //depot/test-mercurial-import/file_ctext#1 - opened for add
- //depot/test-mercurial-import/file_cxtext#1 - opened for add
- //depot/test-mercurial-import/file_ktext#1 - opened for add
- //depot/test-mercurial-import/file_kxtext#1 - opened for add
- //depot/test-mercurial-import/file_ltext#1 - opened for add
- //depot/test-mercurial-import/file_tempobj#1 - opened for add
- //depot/test-mercurial-import/file_ubinary#1 - opened for add
- //depot/test-mercurial-import/file_uxbinary#1 - opened for add
- //depot/test-mercurial-import/file_xbinary#1 - opened for add
- //depot/test-mercurial-import/file_xltext#1 - opened for add
- //depot/test-mercurial-import/file_xtempobj#1 - opened for add
- //depot/test-mercurial-import/file_xtext#1 - opened for add
- $ p4 submit -d initial
- Submitting change 1.
- Locking 33 files ...
- add //depot/test-mercurial-import/file_binary#1
- add //depot/test-mercurial-import/file_binary+k#1
- add //depot/test-mercurial-import/file_binary+kx#1
- add //depot/test-mercurial-import/file_binary+x#1
- add //depot/test-mercurial-import/file_ctext#1
- add //depot/test-mercurial-import/file_cxtext#1
- add //depot/test-mercurial-import/file_ktext#1
- add //depot/test-mercurial-import/file_kxtext#1
- add //depot/test-mercurial-import/file_ltext#1
- add //depot/test-mercurial-import/file_symlink#1
- add //depot/test-mercurial-import/file_symlink+k#1
- add //depot/test-mercurial-import/file_tempobj#1
- add //depot/test-mercurial-import/file_text#1
- add //depot/test-mercurial-import/file_text+c#1
- add //depot/test-mercurial-import/file_text+d#1
- add //depot/test-mercurial-import/file_text+f#1
- add //depot/test-mercurial-import/file_text+k#1
- add //depot/test-mercurial-import/file_text+ko#1
- add //depot/test-mercurial-import/file_text+kx#1
- add //depot/test-mercurial-import/file_text+l#1
- add //depot/test-mercurial-import/file_text+m#1
- add //depot/test-mercurial-import/file_text+s#1
- add //depot/test-mercurial-import/file_text+s2#1
- add //depot/test-mercurial-import/file_text+w#1
- add //depot/test-mercurial-import/file_text+x#1
- add //depot/test-mercurial-import/file_ubinary#1
- add //depot/test-mercurial-import/file_uxbinary#1
- add //depot/test-mercurial-import/file_xbinary#1
- add //depot/test-mercurial-import/file_xltext#1
- add //depot/test-mercurial-import/file_xtempobj#1
- add //depot/test-mercurial-import/file_xtext#1
- add //depot/test-mercurial-import/target_symlink#1
- add //depot/test-mercurial-import/target_symlink+k#1
- Change 1 submitted.
- //depot/test-mercurial-import/file_binary+k#1 - refreshing
- //depot/test-mercurial-import/file_binary+kx#1 - refreshing
- //depot/test-mercurial-import/file_ktext#1 - refreshing
- //depot/test-mercurial-import/file_kxtext#1 - refreshing
- //depot/test-mercurial-import/file_symlink+k#1 - refreshing
- //depot/test-mercurial-import/file_text+k#1 - refreshing
- //depot/test-mercurial-import/file_text+ko#1 - refreshing
- //depot/test-mercurial-import/file_text+kx#1 - refreshing
-
-test keyword expansion
- $ p4 edit file_* target_*
- //depot/test-mercurial-import/file_binary#1 - opened for edit
- //depot/test-mercurial-import/file_binary+k#1 - opened for edit
- //depot/test-mercurial-import/file_binary+kx#1 - opened for edit
- //depot/test-mercurial-import/file_binary+x#1 - opened for edit
- //depot/test-mercurial-import/file_ctext#1 - opened for edit
- //depot/test-mercurial-import/file_cxtext#1 - opened for edit
- //depot/test-mercurial-import/file_ktext#1 - opened for edit
- //depot/test-mercurial-import/file_kxtext#1 - opened for edit
- //depot/test-mercurial-import/file_ltext#1 - opened for edit
- //depot/test-mercurial-import/file_symlink#1 - opened for edit
- //depot/test-mercurial-import/file_symlink+k#1 - opened for edit
- //depot/test-mercurial-import/file_tempobj#1 - opened for edit
- //depot/test-mercurial-import/file_text#1 - opened for edit
- //depot/test-mercurial-import/file_text+c#1 - opened for edit
- //depot/test-mercurial-import/file_text+d#1 - opened for edit
- //depot/test-mercurial-import/file_text+f#1 - opened for edit
- //depot/test-mercurial-import/file_text+k#1 - opened for edit
- //depot/test-mercurial-import/file_text+ko#1 - opened for edit
- //depot/test-mercurial-import/file_text+kx#1 - opened for edit
- //depot/test-mercurial-import/file_text+l#1 - opened for edit
- //depot/test-mercurial-import/file_text+m#1 - opened for edit
- //depot/test-mercurial-import/file_text+s#1 - opened for edit
- //depot/test-mercurial-import/file_text+s2#1 - opened for edit
- //depot/test-mercurial-import/file_text+w#1 - opened for edit
- //depot/test-mercurial-import/file_text+x#1 - opened for edit
- //depot/test-mercurial-import/file_ubinary#1 - opened for edit
- //depot/test-mercurial-import/file_uxbinary#1 - opened for edit
- //depot/test-mercurial-import/file_xbinary#1 - opened for edit
- //depot/test-mercurial-import/file_xltext#1 - opened for edit
- //depot/test-mercurial-import/file_xtempobj#1 - opened for edit
- //depot/test-mercurial-import/file_xtext#1 - opened for edit
- //depot/test-mercurial-import/target_symlink#1 - opened for edit
- //depot/test-mercurial-import/target_symlink+k#1 - opened for edit
- $ for T in $TYPES ; do
- > T2=`echo $T | tr [:upper:] [:lower:]`
- > echo '$Id$' >>file_$T2
- > echo '$Header$' >>file_$T2
- > echo '$Date$' >>file_$T2
- > echo '$DateTime$' >>file_$T2
- > echo '$Change$' >>file_$T2
- > echo '$File$' >>file_$T2
- > echo '$Revision$' >>file_$T2
- > echo '$Header$$Header$Header$' >>file_$T2
- > done
-
- $ ln -s 'target_$Header$' crazy_symlink+k
- $ p4 add -t symlink+k crazy_symlink+k
- //depot/test-mercurial-import/crazy_symlink+k#1 - opened for add
-
- $ p4 submit -d keywords
- Submitting change 2.
- Locking 34 files ...
- add //depot/test-mercurial-import/crazy_symlink+k#1
- edit //depot/test-mercurial-import/file_binary#2
- edit //depot/test-mercurial-import/file_binary+k#2
- edit //depot/test-mercurial-import/file_binary+kx#2
- edit //depot/test-mercurial-import/file_binary+x#2
- edit //depot/test-mercurial-import/file_ctext#2
- edit //depot/test-mercurial-import/file_cxtext#2
- edit //depot/test-mercurial-import/file_ktext#2
- edit //depot/test-mercurial-import/file_kxtext#2
- edit //depot/test-mercurial-import/file_ltext#2
- edit //depot/test-mercurial-import/file_symlink#2
- edit //depot/test-mercurial-import/file_symlink+k#2
- edit //depot/test-mercurial-import/file_tempobj#2
- edit //depot/test-mercurial-import/file_text#2
- edit //depot/test-mercurial-import/file_text+c#2
- edit //depot/test-mercurial-import/file_text+d#2
- edit //depot/test-mercurial-import/file_text+f#2
- edit //depot/test-mercurial-import/file_text+k#2
- edit //depot/test-mercurial-import/file_text+ko#2
- edit //depot/test-mercurial-import/file_text+kx#2
- edit //depot/test-mercurial-import/file_text+l#2
- edit //depot/test-mercurial-import/file_text+m#2
- edit //depot/test-mercurial-import/file_text+s#2
- edit //depot/test-mercurial-import/file_text+s2#2
- edit //depot/test-mercurial-import/file_text+w#2
- edit //depot/test-mercurial-import/file_text+x#2
- edit //depot/test-mercurial-import/file_ubinary#2
- edit //depot/test-mercurial-import/file_uxbinary#2
- edit //depot/test-mercurial-import/file_xbinary#2
- edit //depot/test-mercurial-import/file_xltext#2
- edit //depot/test-mercurial-import/file_xtempobj#2
- edit //depot/test-mercurial-import/file_xtext#2
- edit //depot/test-mercurial-import/target_symlink#2
- edit //depot/test-mercurial-import/target_symlink+k#2
- Change 2 submitted.
- //depot/test-mercurial-import/crazy_symlink+k#1 - refreshing
- //depot/test-mercurial-import/file_binary+k#2 - refreshing
- //depot/test-mercurial-import/file_binary+kx#2 - refreshing
- //depot/test-mercurial-import/file_ktext#2 - refreshing
- //depot/test-mercurial-import/file_kxtext#2 - refreshing
- //depot/test-mercurial-import/file_symlink+k#2 - refreshing
- //depot/test-mercurial-import/file_text+k#2 - refreshing
- //depot/test-mercurial-import/file_text+ko#2 - refreshing
- //depot/test-mercurial-import/file_text+kx#2 - refreshing
-
-check keywords in p4
- $ grep -H Header file_*
- file_binary:$Header$
- file_binary:$Header$$Header$Header$
- file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $
- file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $$Header: //depot/test-mercurial-import/file_binary+k#2 $Header$
- file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $
- file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $$Header: //depot/test-mercurial-import/file_binary+kx#2 $Header$
- file_binary+x:$Header$
- file_binary+x:$Header$$Header$Header$
- file_ctext:$Header$
- file_ctext:$Header$$Header$Header$
- file_cxtext:$Header$
- file_cxtext:$Header$$Header$Header$
- file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $
- file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $$Header: //depot/test-mercurial-import/file_ktext#2 $Header$
- file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $
- file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $$Header: //depot/test-mercurial-import/file_kxtext#2 $Header$
- file_ltext:$Header$
- file_ltext:$Header$$Header$Header$
- file_symlink:$Header$
- file_symlink:$Header$$Header$Header$
- file_symlink+k:$Header$
- file_symlink+k:$Header$$Header$Header$
- file_tempobj:$Header$
- file_tempobj:$Header$$Header$Header$
- file_text:$Header$
- file_text:$Header$$Header$Header$
- file_text+c:$Header$
- file_text+c:$Header$$Header$Header$
- file_text+d:$Header$
- file_text+d:$Header$$Header$Header$
- file_text+f:$Header$
- file_text+f:$Header$$Header$Header$
- file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $
- file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $$Header: //depot/test-mercurial-import/file_text+k#2 $Header$
- file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $
- file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $$Header: //depot/test-mercurial-import/file_text+ko#2 $Header$
- file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $
- file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $$Header: //depot/test-mercurial-import/file_text+kx#2 $Header$
- file_text+l:$Header$
- file_text+l:$Header$$Header$Header$
- file_text+m:$Header$
- file_text+m:$Header$$Header$Header$
- file_text+s:$Header$
- file_text+s:$Header$$Header$Header$
- file_text+s2:$Header$
- file_text+s2:$Header$$Header$Header$
- file_text+w:$Header$
- file_text+w:$Header$$Header$Header$
- file_text+x:$Header$
- file_text+x:$Header$$Header$Header$
- file_ubinary:$Header$
- file_ubinary:$Header$$Header$Header$
- file_uxbinary:$Header$
- file_uxbinary:$Header$$Header$Header$
- file_xbinary:$Header$
- file_xbinary:$Header$$Header$Header$
- file_xltext:$Header$
- file_xltext:$Header$$Header$Header$
- file_xtempobj:$Header$
- file_xtempobj:$Header$$Header$Header$
- file_xtext:$Header$
- file_xtext:$Header$$Header$Header$
-
-convert
- $ hg convert -s p4 $DEPOTPATH dst
- initializing destination dst repository
- reading p4 views
- collecting p4 changelists
- 1 initial
- 2 keywords
- scanning source...
- sorting...
- converting...
- 1 initial
- 0 keywords
- $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
- rev=1 desc="keywords" tags="tip" files="crazy_symlink+k file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k"
- rev=0 desc="initial" tags="" files="file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_symlink file_symlink+k file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k"
-
-revision 0
- $ hg -R dst update 0
- 30 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ head dst/file_* | cat -v
- ==> dst/file_binary <==
- this is binary
- ==> dst/file_binary+k <==
- this is binary+k
- ==> dst/file_binary+kx <==
- this is binary+kx
- ==> dst/file_binary+x <==
- this is binary+x
- ==> dst/file_ctext <==
- this is ctext
-
- ==> dst/file_cxtext <==
- this is cxtext
-
- ==> dst/file_ktext <==
- this is ktext
-
- ==> dst/file_kxtext <==
- this is kxtext
-
- ==> dst/file_ltext <==
- this is ltext
-
- ==> dst/file_symlink <==
- this is target symlink
-
- ==> dst/file_symlink+k <==
- this is target symlink+k
-
- ==> dst/file_text <==
- this is text
-
- ==> dst/file_text+c <==
- this is text+C
-
- ==> dst/file_text+d <==
- this is text+D
-
- ==> dst/file_text+f <==
- this is text+F
-
- ==> dst/file_text+k <==
- this is text+k
-
- ==> dst/file_text+ko <==
- this is text+ko
-
- ==> dst/file_text+kx <==
- this is text+kx
-
- ==> dst/file_text+l <==
- this is text+l
-
- ==> dst/file_text+m <==
- this is text+m
-
- ==> dst/file_text+s2 <==
- this is text+S2
-
- ==> dst/file_text+w <==
- this is text+w
-
- ==> dst/file_text+x <==
- this is text+x
-
- ==> dst/file_ubinary <==
- this is ubinary
-
- ==> dst/file_uxbinary <==
- this is uxbinary
-
- ==> dst/file_xbinary <==
- this is xbinary
-
- ==> dst/file_xltext <==
- this is xltext
-
- ==> dst/file_xtext <==
- this is xtext
-
-revision 1
- $ hg -R dst update 1
- 30 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ head dst/file_* | cat -v
- ==> dst/file_binary <==
- this is binary$Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_binary+k <==
- this is binary+k$Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_binary+kx <==
- this is binary+kx$Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_binary+x <==
- this is binary+x$Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_ctext <==
- this is ctext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_cxtext <==
- this is cxtext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_ktext <==
- this is ktext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_kxtext <==
- this is kxtext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_ltext <==
- this is ltext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_symlink <==
- this is target symlink
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_symlink+k <==
- this is target symlink+k
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text <==
- this is text
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+c <==
- this is text+C
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+d <==
- this is text+D
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+f <==
- this is text+F
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+k <==
- this is text+k
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+ko <==
- this is text+ko
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+kx <==
- this is text+kx
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+l <==
- this is text+l
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+m <==
- this is text+m
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+s <==
- this is text+S
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+s2 <==
- this is text+S2
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+w <==
- this is text+w
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_text+x <==
- this is text+x
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_ubinary <==
- this is ubinary
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_uxbinary <==
- this is uxbinary
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_xbinary <==
- this is xbinary
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_xltext <==
- this is xltext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
- ==> dst/file_xtext <==
- this is xtext
- $Id$
- $Header$
- $Date$
- $DateTime$
- $Change$
- $File$
- $Revision$
- $Header$$Header$Header$
-
-crazy_symlink
- $ readlink crazy_symlink+k
- target_$Header: //depot/test-mercurial-import/crazy_symlink+k#1 $
- $ readlink dst/crazy_symlink+k
- target_$Header$
-
-exit trap:
- stopping the p4 server
diff --git a/tests/test-convert-p4.out b/tests/test-convert-p4.out
new file mode 100644
index 0000000..9451cf8
--- /dev/null
+++ b/tests/test-convert-p4.out
@@ -0,0 +1,88 @@
+% create p4 depot
+% start the p4 server
+% create a client spec
+Client hg-p4-import saved.
+% populate the depot
+//depot/test-mercurial-import/a#1 - opened for add
+//depot/test-mercurial-import/b/c#1 - opened for add
+Submitting change 1.
+Locking 2 files ...
+add //depot/test-mercurial-import/a#1
+add //depot/test-mercurial-import/b/c#1
+Change 1 submitted.
+% change some files
+//depot/test-mercurial-import/a#1 - opened for edit
+Submitting change 2.
+Locking 1 files ...
+edit //depot/test-mercurial-import/a#2
+Change 2 submitted.
+//depot/test-mercurial-import/b/c#1 - opened for edit
+Submitting change 3.
+Locking 1 files ...
+edit //depot/test-mercurial-import/b/c#2
+Change 3 submitted.
+% convert
+initializing destination dst repository
+reading p4 views
+collecting p4 changelists
+1 initial
+2 change a
+3 change b/c
+scanning source...
+sorting...
+converting...
+2 initial
+1 change a
+0 change b/c
+rev=2 desc="change b/c" tags="tip" files="b/c"
+rev=1 desc="change a" tags="" files="a"
+rev=0 desc="initial" tags="" files="a b/c"
+% change some files
+//depot/test-mercurial-import/a#2 - opened for edit
+//depot/test-mercurial-import/b/c#2 - opened for edit
+Submitting change 4.
+Locking 2 files ...
+edit //depot/test-mercurial-import/a#3
+edit //depot/test-mercurial-import/b/c#3
+Change 4 submitted.
+% convert again
+reading p4 views
+collecting p4 changelists
+1 initial
+2 change a
+3 change b/c
+4 change a b/c
+scanning source...
+sorting...
+converting...
+0 change a b/c
+rev=3 desc="change a b/c" tags="tip" files="a b/c"
+rev=2 desc="change b/c" tags="" files="b/c"
+rev=1 desc="change a" tags="" files="a"
+rev=0 desc="initial" tags="" files="a b/c"
+% interesting names
+//depot/test-mercurial-import/d d#1 - opened for add
+//depot/test-mercurial-import/ e/ f#1 - opened for add
+Submitting change 5.
+Locking 2 files ...
+add //depot/test-mercurial-import/ e/ f#1
+add //depot/test-mercurial-import/d d#1
+Change 5 submitted.
+% convert again
+reading p4 views
+collecting p4 changelists
+1 initial
+2 change a
+3 change b/c
+4 change a b/c
+5 add d e f
+scanning source...
+sorting...
+converting...
+0 add d e f
+rev=4 desc="add d e f" tags="tip" files=" e/ f d d"
+rev=3 desc="change a b/c" tags="" files="a b/c"
+rev=2 desc="change b/c" tags="" files="b/c"
+rev=1 desc="change a" tags="" files="a"
+rev=0 desc="initial" tags="" files="a b/c"
+% stop the p4 server
diff --git a/tests/test-convert-p4.t b/tests/test-convert-p4.t
deleted file mode 100644
index 6a59759..0000000
--- a/tests/test-convert-p4.t
+++ /dev/null
@@ -1,152 +0,0 @@
- $ "$TESTDIR/hghave" p4 || exit 80
-
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "convert = " >> $HGRCPATH
-
-create p4 depot
- $ P4ROOT=`pwd`/depot; export P4ROOT
- $ P4AUDIT=$P4ROOT/audit; export P4AUDIT
- $ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
- $ P4LOG=$P4ROOT/log; export P4LOG
- $ P4PORT=localhost:16661; export P4PORT
- $ P4DEBUG=1; export P4DEBUG
-
-start the p4 server
- $ [ ! -d $P4ROOT ] && mkdir $P4ROOT
- $ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
- $ echo $! >> $DAEMON_PIDS
- $ trap "echo stopping the p4 server ; p4 admin stop" EXIT
-
- $ # wait for the server to initialize
- $ while ! p4 ; do
- > sleep 1
- > done >/dev/null 2>/dev/null
-
-create a client spec
- $ P4CLIENT=hg-p4-import; export P4CLIENT
- $ DEPOTPATH=//depot/test-mercurial-import/...
- $ p4 client -o | sed '/^View:/,$ d' >p4client
- $ echo View: >>p4client
- $ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
- $ p4 client -i <p4client
- Client hg-p4-import saved.
-
-populate the depot
- $ echo a > a
- $ mkdir b
- $ echo c > b/c
- $ p4 add a b/c
- //depot/test-mercurial-import/a#1 - opened for add
- //depot/test-mercurial-import/b/c#1 - opened for add
- $ p4 submit -d initial
- Submitting change 1.
- Locking 2 files ...
- add //depot/test-mercurial-import/a#1
- add //depot/test-mercurial-import/b/c#1
- Change 1 submitted.
-
-change some files
- $ p4 edit a
- //depot/test-mercurial-import/a#1 - opened for edit
- $ echo aa >> a
- $ p4 submit -d "change a"
- Submitting change 2.
- Locking 1 files ...
- edit //depot/test-mercurial-import/a#2
- Change 2 submitted.
-
- $ p4 edit b/c
- //depot/test-mercurial-import/b/c#1 - opened for edit
- $ echo cc >> b/c
- $ p4 submit -d "change b/c"
- Submitting change 3.
- Locking 1 files ...
- edit //depot/test-mercurial-import/b/c#2
- Change 3 submitted.
-
-convert
- $ hg convert -s p4 $DEPOTPATH dst
- initializing destination dst repository
- reading p4 views
- collecting p4 changelists
- 1 initial
- 2 change a
- 3 change b/c
- scanning source...
- sorting...
- converting...
- 2 initial
- 1 change a
- 0 change b/c
- $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
- rev=2 desc="change b/c" tags="tip" files="b/c"
- rev=1 desc="change a" tags="" files="a"
- rev=0 desc="initial" tags="" files="a b/c"
-
-change some files
- $ p4 edit a b/c
- //depot/test-mercurial-import/a#2 - opened for edit
- //depot/test-mercurial-import/b/c#2 - opened for edit
- $ echo aaa >> a
- $ echo ccc >> b/c
- $ p4 submit -d "change a b/c"
- Submitting change 4.
- Locking 2 files ...
- edit //depot/test-mercurial-import/a#3
- edit //depot/test-mercurial-import/b/c#3
- Change 4 submitted.
-
-convert again
- $ hg convert -s p4 $DEPOTPATH dst
- reading p4 views
- collecting p4 changelists
- 1 initial
- 2 change a
- 3 change b/c
- 4 change a b/c
- scanning source...
- sorting...
- converting...
- 0 change a b/c
- $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
- rev=3 desc="change a b/c" tags="tip" files="a b/c"
- rev=2 desc="change b/c" tags="" files="b/c"
- rev=1 desc="change a" tags="" files="a"
- rev=0 desc="initial" tags="" files="a b/c"
-
-interesting names
- $ echo dddd > "d d"
- $ mkdir " e"
- $ echo fff >" e/ f"
- $ p4 add "d d" " e/ f"
- //depot/test-mercurial-import/d d#1 - opened for add
- //depot/test-mercurial-import/ e/ f#1 - opened for add
- $ p4 submit -d "add d e f"
- Submitting change 5.
- Locking 2 files ...
- add //depot/test-mercurial-import/ e/ f#1
- add //depot/test-mercurial-import/d d#1
- Change 5 submitted.
-
-convert again
- $ hg convert -s p4 $DEPOTPATH dst
- reading p4 views
- collecting p4 changelists
- 1 initial
- 2 change a
- 3 change b/c
- 4 change a b/c
- 5 add d e f
- scanning source...
- sorting...
- converting...
- 0 add d e f
- $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
- rev=4 desc="add d e f" tags="tip" files=" e/ f d d"
- rev=3 desc="change a b/c" tags="" files="a b/c"
- rev=2 desc="change b/c" tags="" files="b/c"
- rev=1 desc="change a" tags="" files="a"
- rev=0 desc="initial" tags="" files="a b/c"
-
-exit trap:
- stopping the p4 server
diff --git a/tests/test-convert-splicemap.t b/tests/test-convert-splicemap.t
index d5bb15f..6104fdf 100644
--- a/tests/test-convert-splicemap.t
+++ b/tests/test-convert-splicemap.t
@@ -4,8 +4,7 @@
$ echo 'graphlog =' >> $HGRCPATH
$ glog()
> {
- > hg glog --template '{rev}:{node|short} "{desc|firstline}"\
- > files: {files}\n' "$@"
+ > hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
> }
$ hg init repo1
$ cd repo1
@@ -22,14 +21,6 @@
adding c
$ PARENTID2=`hg id --debug -i`
$ cd ..
- $ glog -R repo1
- @ 2:e55c719b85b6 "addc" files: c
- |
- o 1:6d4c2037ddc2 "addb" files: a b
- |
- o 0:07f494440405 "adda" files: a
-
-
$ hg init repo2
$ cd repo2
$ echo b > a
@@ -45,13 +36,6 @@
$ hg ci -Am adde
adding e
$ cd ..
- $ glog -R repo2
- @ 2:a39b65753b0a "adde" files: e
- |
- o 1:e4ea00df9189 "changed" files: d
- |
- o 0:527cdedf31fb "addaandd" files: a d
-
test invalid splicemap
@@ -59,7 +43,7 @@ test invalid splicemap
> $CHILDID2
> EOF
$ hg convert --splicemap splicemap repo2 repo1
- abort: syntax error in splicemap(1): child parent1[,parent2] expected
+ abort: syntax error in splicemap(1): key/value pair expected
[255]
splice repo2 on repo1
@@ -67,12 +51,7 @@ splice repo2 on repo1
$ cat > splicemap <<EOF
> $CHILDID1 $PARENTID1
> $CHILDID2 $PARENTID2,$CHILDID1
- >
> EOF
- $ cat splicemap
- 527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e
- e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db
-
$ hg clone repo1 target1
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -86,137 +65,15 @@ splice repo2 on repo1
spliced in ['e55c719b85b60e5102fac26110ba626e7cb6b7dc', '527cdedf31fbd5ea708aa14eeecf53d4676f38db'] as parents of e4ea00df91897da3079a10fab658c1eddba6617b
0 adde
$ glog -R target1
- o 5:16bc847b02aa "adde" files: e
+ o 5 "adde" files: e
|
- o 4:e30e4fee3418 "changed" files: d
+ o 4 "changed" files: d
|\
- | o 3:e673348c3a3c "addaandd" files: a d
+ | o 3 "addaandd" files: a d
| |
- @ | 2:e55c719b85b6 "addc" files: c
+ @ | 2 "addc" files: c
|/
- o 1:6d4c2037ddc2 "addb" files: a b
+ o 1 "addb" files: a b
|
- o 0:07f494440405 "adda" files: a
-
-
-
-
-Test splicemap and conversion order
-
- $ hg init ordered
- $ cd ordered
- $ echo a > a
- $ hg ci -Am adda
- adding a
- $ hg branch branch
- marked working directory as branch branch
- (branches are permanent and global, did you want a bookmark?)
- $ echo a >> a
- $ hg ci -Am changea
- $ echo a >> a
- $ hg ci -Am changeaagain
- $ hg up 0
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo b > b
- $ hg ci -Am addb
- adding b
-
-We want 2 to depend on 1 and 3. Since 3 is always converted after 2,
-the bug should be exhibited with all conversion orders.
-
- $ cat > ../splicemap <<EOF
- > `(hg id -r 2 -i --debug)` `(hg id -r 1 -i --debug)`, `(hg id -r 3 -i --debug)`
- > EOF
- $ cd ..
- $ cat splicemap
- 7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437, 102a90ea7b4a3361e4082ed620918c261189a36a
-
-Test regular conversion
-
- $ hg convert --splicemap splicemap ordered ordered-hg1
- initializing destination ordered-hg1 repository
- scanning source...
- sorting...
- converting...
- 3 adda
- 2 changea
- 1 addb
- 0 changeaagain
- spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
- $ glog -R ordered-hg1
- o 3:4cb04b9afbf2 "changeaagain" files: a
- |\
- | o 2:102a90ea7b4a "addb" files: b
- | |
- o | 1:717d54d67e6c "changea" files: a
- |/
- o 0:07f494440405 "adda" files: a
+ o 0 "adda" files: a
-
-Test conversion with parent revisions already in dest, using source
-and destination identifiers. Test unknown splicemap target.
-
- $ hg convert -r1 ordered ordered-hg2
- initializing destination ordered-hg2 repository
- scanning source...
- sorting...
- converting...
- 1 adda
- 0 changea
- $ hg convert -r3 ordered ordered-hg2
- scanning source...
- sorting...
- converting...
- 0 addb
- $ cat > splicemap <<EOF
- > `(hg -R ordered id -r 2 -i --debug)` \
- > `(hg -R ordered-hg2 id -r 1 -i --debug)`,\
- > `(hg -R ordered-hg2 id -r 2 -i --debug)`
- > deadbeef102a90ea7b4a3361e4082ed620918c26 deadbeef102a90ea7b4a3361e4082ed620918c27
- > EOF
- $ hg convert --splicemap splicemap ordered ordered-hg2
- scanning source...
- splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
- sorting...
- converting...
- 0 changeaagain
- spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
- $ glog -R ordered-hg2
- o 3:4cb04b9afbf2 "changeaagain" files: a
- |\
- | o 2:102a90ea7b4a "addb" files: b
- | |
- o | 1:717d54d67e6c "changea" files: a
- |/
- o 0:07f494440405 "adda" files: a
-
-
-Test empty conversion
-
- $ hg convert --splicemap splicemap ordered ordered-hg2
- scanning source...
- splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
- sorting...
- converting...
-
-Test clonebranches
-
- $ hg --config convert.hg.clonebranches=true convert \
- > --splicemap splicemap ordered ordered-hg3
- initializing destination ordered-hg3 repository
- scanning source...
- abort: revision 717d54d67e6c31fd75ffef2ff3042bdd98418437 not found in destination repository (lookups with clonebranches=true are not implemented)
- [255]
-
-Test invalid dependency
-
- $ cat > splicemap <<EOF
- > `(hg -R ordered id -r 2 -i --debug)` \
- > deadbeef102a90ea7b4a3361e4082ed620918c26,\
- > `(hg -R ordered-hg2 id -r 2 -i --debug)`
- > EOF
- $ hg convert --splicemap splicemap ordered ordered-hg4
- initializing destination ordered-hg4 repository
- scanning source...
- abort: unknown splice map parent: deadbeef102a90ea7b4a3361e4082ed620918c26
- [255]
diff --git a/tests/test-convert-svn-branches.t b/tests/test-convert-svn-branches.t
index 95df843..0c09f6e 100644
--- a/tests/test-convert-svn-branches.t
+++ b/tests/test-convert-svn-branches.t
@@ -14,8 +14,6 @@ Convert trunk and branches
$ cat > branchmap <<EOF
> old3 newbranch
- >
- >
> EOF
$ hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg
initializing destination A-hg repository
diff --git a/tests/test-convert-svn-move.t b/tests/test-convert-svn-move.t
index b8f0dde..174578d 100644
--- a/tests/test-convert-svn-move.t
+++ b/tests/test-convert-svn-move.t
@@ -1,6 +1,10 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80
+ $ fixpath()
+ > {
+ > tr '\\' /
+ > }
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert =
@@ -9,16 +13,20 @@
$ svnadmin create svn-repo
$ svnadmin load -q svn-repo < "$TESTDIR/svn/move.svndump"
- $ SVNREPOPATH=`pwd`/svn-repo
-#if windows
- $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#else
- $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#endif
+ $ svnpath=`pwd | fixpath`
+
+SVN wants all paths to start with a slash. Unfortunately,
+Windows ones don't. Handle that.
+
+ $ expr "$svnpath" : "\/" > /dev/null
+ > if [ $? -ne 0 ]; then
+ > svnpath="/$svnpath"
+ > fi
+ > svnurl="file://$svnpath/svn-repo"
Convert trunk and branches
- $ hg convert --datesort "$SVNREPOURL"/subproject A-hg
+ $ hg convert --datesort "$svnurl"/subproject A-hg
initializing destination A-hg repository
scanning source...
sorting...
@@ -159,13 +167,12 @@ Test convert progress bar'
> [progress]
> assume-tty = 1
> delay = 0
- > changedelay = 0
> format = topic bar number
> refresh = 0
> width = 60
> EOF
- $ hg convert svn-repo hg-progress 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg convert svn-repo hg-progress 2>&1 | $TESTDIR/filtercr.py
scanning [ <=> ] 1
scanning [ <=> ] 2
@@ -239,5 +246,3 @@ Test convert progress bar'
1 branch
0 clobberdir
-
- $ cd ..
diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t
index ab39f7f..7aa8ebb 100644
--- a/tests/test-convert-svn-sink.t
+++ b/tests/test-convert-svn-sink.t
@@ -1,16 +1,24 @@
- $ "$TESTDIR/hghave" svn13 || exit 80
+ $ "$TESTDIR/hghave" svn no-outer-repo || exit 80
+
+ $ fixpath()
+ > {
+ > tr '\\' /
+ > }
$ svnupanddisplay()
> {
> (
> cd $1;
- > svn up -q;
- > svn st -v | sed 's/ */ /g' | sort
+ > svn up;
+ > svn st -v | fixpath | sed 's/ */ /g'
> limit=''
> if [ $2 -gt 0 ]; then
> limit="--limit=$2"
> fi
- > svn log --xml -v $limit | python "$TESTDIR/svnxml.py"
+ > svn log --xml -v $limit \
+ > | fixpath \
+ > | sed 's,<date>.*,<date/>,' \
+ > | grep -v 'kind="'
> )
> }
@@ -27,16 +35,18 @@ Add
$ echo a > a/a
$ mkdir -p a/d1/d2
$ echo b > a/d1/d2/b
+ $ ln -s a/missing a/link
$ hg --cwd a ci -d '0 0' -A -m 'add a file'
adding a
adding d1/d2/b
+ adding link
Modify
$ "$TESTDIR/svn-safe-append.py" a a/a
$ hg --cwd a ci -d '1 0' -m 'modify a file'
$ hg --cwd a tip -q
- 1:e0e2b8a9156b
+ 1:8231f652da37
$ hg convert -d svn a
assuming destination a-hg
@@ -48,38 +58,64 @@ Modify
1 add a file
0 modify a file
$ svnupanddisplay a-hg-wc 2
- 2 1 test d1
- 2 1 test d1/d2 (glob)
- 2 1 test d1/d2/b (glob)
+ At revision 2.
2 2 test .
2 2 test a
- revision: 2
- author: test
- msg: modify a file
- M /a
- revision: 1
- author: test
- msg: add a file
- A /a
- A /d1
- A /d1/d2
- A /d1/d2/b
+ 2 1 test d1
+ 2 1 test d1/d2
+ 2 1 test d1/d2/b
+ 2 1 test link
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="2">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="M">/a</path>
+ </paths>
+ <msg>modify a file</msg>
+ </logentry>
+ <logentry
+ revision="1">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/a</path>
+ <path
+ action="A">/d1</path>
+ <path
+ action="A">/d1/d2</path>
+ <path
+ action="A">/d1/d2/b</path>
+ <path
+ action="A">/link</path>
+ </paths>
+ <msg>add a file</msg>
+ </logentry>
+ </log>
$ ls a a-hg-wc
a:
a
d1
+ link
a-hg-wc:
a
d1
+ link
$ cmp a/a a-hg-wc/a
Rename
$ hg --cwd a mv a b
+ $ hg --cwd a mv link newlink
+
$ hg --cwd a ci -d '2 0' -m 'rename a file'
$ hg --cwd a tip -q
- 2:eb5169441d43
+ 2:a67e26ccec09
$ hg convert -d svn a
assuming destination a-hg
@@ -89,24 +125,46 @@ Rename
converting...
0 rename a file
$ svnupanddisplay a-hg-wc 1
- 3 1 test d1
- 3 1 test d1/d2 (glob)
- 3 1 test d1/d2/b (glob)
+ At revision 3.
3 3 test .
3 3 test b
- revision: 3
- author: test
- msg: rename a file
- D /a
- A /b (from /a@2)
+ 3 1 test d1
+ 3 1 test d1/d2
+ 3 1 test d1/d2/b
+ 3 3 test newlink
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="3">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="D">/a</path>
+ <path
+ copyfrom-path="/a"
+ copyfrom-rev="2"
+ action="A">/b</path>
+ <path
+ copyfrom-path="/link"
+ copyfrom-rev="2"
+ action="A">/newlink</path>
+ <path
+ action="D">/link</path>
+ </paths>
+ <msg>rename a file</msg>
+ </logentry>
+ </log>
$ ls a a-hg-wc
a:
b
d1
+ newlink
a-hg-wc:
b
d1
+ newlink
Copy
@@ -114,7 +172,7 @@ Copy
$ hg --cwd a ci -d '3 0' -m 'copy a file'
$ hg --cwd a tip -q
- 3:60effef6ab48
+ 3:0cf087b9ab02
$ hg convert -d svn a
assuming destination a-hg
@@ -124,34 +182,48 @@ Copy
converting...
0 copy a file
$ svnupanddisplay a-hg-wc 1
- 4 1 test d1
- 4 1 test d1/d2 (glob)
- 4 1 test d1/d2/b (glob)
- 4 3 test b
+ At revision 4.
4 4 test .
+ 4 3 test b
4 4 test c
- revision: 4
- author: test
- msg: copy a file
- A /c (from /b@3)
+ 4 1 test d1
+ 4 1 test d1/d2
+ 4 1 test d1/d2/b
+ 4 3 test newlink
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="4">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ copyfrom-path="/b"
+ copyfrom-rev="3"
+ action="A">/c</path>
+ </paths>
+ <msg>copy a file</msg>
+ </logentry>
+ </log>
$ ls a a-hg-wc
a:
b
c
d1
+ newlink
a-hg-wc:
b
c
d1
+ newlink
$ hg --cwd a rm b
-
-Remove
-
+ $ echo % remove
+ % remove
$ hg --cwd a ci -d '4 0' -m 'remove a file'
$ hg --cwd a tip -q
- 4:87bbe3013fb6
+ 4:07b2e34a5b17
$ hg convert -d svn a
assuming destination a-hg
@@ -161,39 +233,43 @@ Remove
converting...
0 remove a file
$ svnupanddisplay a-hg-wc 1
- 5 1 test d1
- 5 1 test d1/d2 (glob)
- 5 1 test d1/d2/b (glob)
- 5 4 test c
+ At revision 5.
5 5 test .
- revision: 5
- author: test
- msg: remove a file
- D /b
+ 5 4 test c
+ 5 1 test d1
+ 5 1 test d1/d2
+ 5 1 test d1/d2/b
+ 5 3 test newlink
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="5">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="D">/b</path>
+ </paths>
+ <msg>remove a file</msg>
+ </logentry>
+ </log>
$ ls a a-hg-wc
a:
c
d1
+ newlink
a-hg-wc:
c
d1
+ newlink
-Executable
+Exectutable
-#if execbit
$ chmod +x a/c
-#else
- $ echo fake >> a/c
-#endif
$ hg --cwd a ci -d '5 0' -m 'make a file executable'
-#if execbit
- $ hg --cwd a tip -q
- 5:ff42e473c340
-#else
$ hg --cwd a tip -q
- 5:817a700c8cf1
-#endif
+ 5:31093672760b
$ hg convert -d svn a
assuming destination a-hg
@@ -203,65 +279,36 @@ Executable
converting...
0 make a file executable
$ svnupanddisplay a-hg-wc 1
- 6 1 test d1
- 6 1 test d1/d2 (glob)
- 6 1 test d1/d2/b (glob)
+ At revision 6.
6 6 test .
6 6 test c
- revision: 6
- author: test
- msg: make a file executable
- M /c
-#if execbit
+ 6 1 test d1
+ 6 1 test d1/d2
+ 6 1 test d1/d2/b
+ 6 3 test newlink
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="6">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="M">/c</path>
+ </paths>
+ <msg>make a file executable</msg>
+ </logentry>
+ </log>
$ test -x a-hg-wc/c
-#endif
-
-#if symlink
-
-Symlinks
-
- $ ln -s a/missing a/link
- $ hg --cwd a commit -Am 'add symlink'
- adding link
- $ hg --cwd a mv link newlink
- $ hg --cwd a commit -m 'move symlink'
- $ hg convert -d svn a
- assuming destination a-hg
- initializing svn working copy 'a-hg-wc'
- scanning source...
- sorting...
- converting...
- 1 add symlink
- 0 move symlink
- $ svnupanddisplay a-hg-wc 1
- 8 1 test d1
- 8 1 test d1/d2
- 8 1 test d1/d2/b
- 8 6 test c
- 8 8 test .
- 8 8 test newlink
- revision: 8
- author: test
- msg: move symlink
- D /link
- A /newlink (from /link@7)
-
-#endif
-
- $ rm -rf a a-hg a-hg-wc
-
Executable in new directory
+ $ rm -rf a a-hg a-hg-wc
$ hg init a
$ mkdir a/d1
$ echo a > a/d1/a
-#if execbit
$ chmod +x a/d1/a
-#else
- $ echo fake >> a/d1/a
-#endif
$ hg --cwd a ci -d '0 0' -A -m 'add executable file in new directory'
adding d1/a
@@ -274,17 +321,26 @@ Executable in new directory
converting...
0 add executable file in new directory
$ svnupanddisplay a-hg-wc 1
+ At revision 1.
1 1 test .
1 1 test d1
- 1 1 test d1/a (glob)
- revision: 1
- author: test
- msg: add executable file in new directory
- A /d1
- A /d1/a
-#if execbit
+ 1 1 test d1/a
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="1">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/d1</path>
+ <path
+ action="A">/d1/a</path>
+ </paths>
+ <msg>add executable file in new directory</msg>
+ </logentry>
+ </log>
$ test -x a-hg-wc/d1/a
-#endif
Copy to new directory
@@ -300,16 +356,29 @@ Copy to new directory
converting...
0 copy file to new directory
$ svnupanddisplay a-hg-wc 1
- 2 1 test d1
- 2 1 test d1/a (glob)
+ At revision 2.
2 2 test .
+ 2 1 test d1
+ 2 1 test d1/a
2 2 test d2
- 2 2 test d2/a (glob)
- revision: 2
- author: test
- msg: copy file to new directory
- A /d2
- A /d2/a (from /d1/a@1)
+ 2 2 test d2/a
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="2">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/d2</path>
+ <path
+ copyfrom-path="/d1/a"
+ copyfrom-rev="1"
+ action="A">/d2/a</path>
+ </paths>
+ <msg>copy file to new directory</msg>
+ </logentry>
+ </log>
Branchy history
@@ -347,12 +416,12 @@ Branchy history
$ hg --cwd b merge
merging b
warning: conflicts during merge.
- merging b incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging b failed!
2 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
$ hg --cwd b revert -r 2 b
- $ hg --cwd b resolve -m b
+ $ hg resolve -m b
$ hg --cwd b ci -d '5 0' -m 'merge'
Expect 4 changes
@@ -372,31 +441,62 @@ Expect 4 changes
0 merge
$ svnupanddisplay b-hg-wc 0
- 4 2 test left-1
+ At revision 4.
+ 4 4 test .
4 3 test b
+ 4 2 test left-1
4 3 test left-2
- 4 4 test .
4 4 test right-1
4 4 test right-2
- revision: 4
- author: test
- msg: merge
- A /right-1
- A /right-2
- revision: 3
- author: test
- msg: left-2
- M /b
- A /left-2
- revision: 2
- author: test
- msg: left-1
- M /b
- A /left-1
- revision: 1
- author: test
- msg: base
- A /b
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="4">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/right-1</path>
+ <path
+ action="A">/right-2</path>
+ </paths>
+ <msg>merge</msg>
+ </logentry>
+ <logentry
+ revision="3">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="M">/b</path>
+ <path
+ action="A">/left-2</path>
+ </paths>
+ <msg>left-2</msg>
+ </logentry>
+ <logentry
+ revision="2">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="M">/b</path>
+ <path
+ action="A">/left-1</path>
+ </paths>
+ <msg>left-1</msg>
+ </logentry>
+ <logentry
+ revision="1">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/b</path>
+ </paths>
+ <msg>base</msg>
+ </logentry>
+ </log>
Tags are not supported, but must not break conversion
@@ -418,15 +518,31 @@ Tags are not supported, but must not break conversion
0 Tagged as v1.0
writing Subversion tags is not yet implemented
$ svnupanddisplay a-hg-wc 2
- 2 1 test a
+ At revision 2.
2 2 test .
+ 2 1 test a
2 2 test .hgtags
- revision: 2
- author: test
- msg: Tagged as v1.0
- A /.hgtags
- revision: 1
- author: test
- msg: Add file a
- A /a
+ <?xml version="1.0"?>
+ <log>
+ <logentry
+ revision="2">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/.hgtags</path>
+ </paths>
+ <msg>Tagged as v1.0</msg>
+ </logentry>
+ <logentry
+ revision="1">
+ <author>test</author>
+ <date/>
+ <paths>
+ <path
+ action="A">/a</path>
+ </paths>
+ <msg>Add file a</msg>
+ </logentry>
+ </log>
$ rm -rf a a-hg a-hg-wc
diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t
index 544f3a5..a97adeb 100644
--- a/tests/test-convert-svn-source.t
+++ b/tests/test-convert-svn-source.t
@@ -1,6 +1,10 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80
+ $ fixpath()
+ > {
+ > tr '\\' /
+ > }
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert =
@@ -10,12 +14,14 @@
> EOF
$ svnadmin create svn-repo
- $ SVNREPOPATH=`pwd`/svn-repo
-#if windows
- $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#else
- $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#endif
+ $ svnpath=`pwd | fixpath`
+
+
+ $ expr "$svnpath" : "\/" > /dev/null
+ > if [ $? -ne 0 ]; then
+ > svnpath="/$svnpath"
+ > fi
+ > svnurl="file://$svnpath/svn-repo"
Now test that it works with trunk/tags layout, but no branches yet.
@@ -27,15 +33,16 @@ Initial svn import
$ mkdir tags
$ cd ..
- $ svn import -m "init projB" projB "$SVNREPOURL/proj%20B" | sort
+ $ svnurl="file://$svnpath/svn-repo/proj%20B"
+ $ svn import -m "init projB" projB "$svnurl" | fixpath
+ Adding projB/mytrunk
+ Adding projB/tags
- Adding projB/mytrunk (glob)
- Adding projB/tags (glob)
Committed revision 1.
Update svn repository
- $ svn co "$SVNREPOURL/proj%20B/mytrunk" B
+ $ svn co "$svnurl"/mytrunk B | fixpath
Checked out revision 1.
$ cd B
$ echo hello > 'letter .txt'
@@ -52,7 +59,7 @@ Update svn repository
Transmitting file data .
Committed revision 3.
- $ svn copy -m "tag v0.1" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.1"
+ $ svn copy -m "tag v0.1" "$svnurl"/mytrunk "$svnurl"/tags/v0.1
Committed revision 4.
@@ -65,7 +72,7 @@ Update svn repository
Convert to hg once
- $ hg convert "$SVNREPOURL/proj%20B" B-hg
+ $ hg convert "$svnurl" B-hg
initializing destination B-hg repository
scanning source...
sorting...
@@ -89,7 +96,7 @@ Update svn repository again
Transmitting file data ..
Committed revision 6.
- $ svn copy -m "tag v0.2" "$SVNREPOURL/proj%20B/mytrunk" "$SVNREPOURL/proj%20B/tags/v0.2"
+ $ svn copy -m "tag v0.2" "$svnurl"/mytrunk "$svnurl"/tags/v0.2
Committed revision 7.
@@ -100,7 +107,7 @@ Update svn repository again
Committed revision 8.
$ cd ..
- $ hg convert -s svn "$SVNREPOURL/proj%20B/non-existent-path" dest
+ $ hg convert -s svn "$svnurl/non-existent-path" dest
initializing destination dest repository
abort: no revision found in module /proj B/non-existent-path
[255]
@@ -109,7 +116,7 @@ Update svn repository again
Test incremental conversion
- $ hg convert "$SVNREPOURL/proj%20B" B-hg
+ $ hg convert "$svnurl" B-hg
scanning source...
sorting...
converting...
@@ -143,7 +150,7 @@ Test incremental conversion
Test filemap
$ echo 'include letter2.txt' > filemap
- $ hg convert --filemap filemap "$SVNREPOURL/proj%20B/mytrunk" fmap
+ $ hg convert --filemap filemap "$svnurl"/mytrunk fmap
initializing destination fmap repository
scanning source...
sorting...
@@ -163,7 +170,7 @@ Test filemap
Test stop revision
- $ hg convert --rev 1 "$SVNREPOURL/proj%20B/mytrunk" stoprev
+ $ hg convert --rev 1 "$svnurl"/mytrunk stoprev
initializing destination stoprev repository
scanning source...
sorting...
@@ -180,24 +187,3 @@ This is also the only place testing more than one extra field in a revision.
extra: branch=default
extra: convert_revision=svn:........-....-....-....-............/proj B/mytrunk@1 (re)
$ cd ..
-
-Test converting empty heads (issue3347)
-
- $ svnadmin create svn-empty
- $ svnadmin load -q svn-empty < "$TESTDIR/svn/empty.svndump"
- $ hg --config convert.svn.trunk= convert svn-empty
- assuming destination svn-empty-hg
- initializing destination svn-empty-hg repository
- scanning source...
- sorting...
- converting...
- 1 init projA
- 0 adddir
- $ hg --config convert.svn.trunk= convert "$SVNREPOURL/../svn-empty/trunk"
- assuming destination trunk-hg
- initializing destination trunk-hg repository
- scanning source...
- sorting...
- converting...
- 1 init projA
- 0 adddir
diff --git a/tests/test-convert-tagsbranch-topology.t b/tests/test-convert-tagsbranch-topology.t
index 0af7e79..ab2d15b 100644
--- a/tests/test-convert-tagsbranch-topology.t
+++ b/tests/test-convert-tagsbranch-topology.t
@@ -1,9 +1,5 @@
$ "$TESTDIR/hghave" git || exit 80
- $ echo "[core]" >> $HOME/.gitconfig
- $ echo "autocrlf = false" >> $HOME/.gitconfig
- $ echo "[core]" >> $HOME/.gitconfig
- $ echo "autocrlf = false" >> $HOME/.gitconfig
$ echo "[extensions]" >> $HGRCPATH
$ echo "convert=" >> $HGRCPATH
$ echo 'hgext.graphlog =' >> $HGRCPATH
@@ -86,5 +82,3 @@ Print the log
/
o 0 "rev1" files: a
-
- $ cd ..
diff --git a/tests/test-convert-tla.t b/tests/test-convert-tla.t
index 8437e57..2c5c8dc 100644
--- a/tests/test-convert-tla.t
+++ b/tests/test-convert-tla.t
@@ -1,5 +1,5 @@
- $ "$TESTDIR/hghave" tla symlink || exit 80
+ $ "$TESTDIR/hghave" tla || exit 80
$ tla my-id "mercurial <mercurial@selenic.com>"
$ echo "[extensions]" >> $HGRCPATH
$ echo "convert=" >> $HGRCPATH
diff --git a/tests/test-convert.t b/tests/test-convert.t
index 26a7441..ae767aa 100644
--- a/tests/test-convert.t
+++ b/tests/test-convert.t
@@ -1,3 +1,4 @@
+
$ cat >> $HGRCPATH <<EOF
> [extensions]
> convert=
@@ -120,25 +121,24 @@
to a named branch.
Mercurial Source
- ################
+ ''''''''''''''''
The Mercurial source recognizes the following configuration options, which
you can set on the command line with "--config":
convert.hg.ignoreerrors
- ignore integrity errors when reading. Use it to fix
- Mercurial repositories with missing revlogs, by converting
- from and to Mercurial. Default is False.
+ ignore integrity errors when reading. Use it to fix Mercurial
+ repositories with missing revlogs, by converting from and to
+ Mercurial. Default is False.
convert.hg.saverev
- store original revision ID in changeset (forces target IDs
- to change). It takes a boolean argument and defaults to
- False.
+ store original revision ID in changeset (forces target IDs to
+ change). It takes and boolean argument and defaults to False.
convert.hg.startrev
- convert start revision and its descendants. It takes a hg
- revision identifier and defaults to 0.
+ convert start revision and its descendants. It takes a hg
+ revision identifier and defaults to 0.
CVS Source
- ##########
+ ''''''''''
CVS source will use a sandbox (i.e. a checked-out copy) from CVS to
indicate the starting point of what will be converted. Direct access to
@@ -152,35 +152,36 @@
The following options can be used with "--config":
convert.cvsps.cache
- Set to False to disable remote log caching, for testing and
- debugging purposes. Default is True.
+ Set to False to disable remote log caching, for testing and
+ debugging purposes. Default is True.
convert.cvsps.fuzz
- Specify the maximum time (in seconds) that is allowed
- between commits with identical user and log message in a
- single changeset. When very large files were checked in as
- part of a changeset then the default may not be long enough.
- The default is 60.
+ Specify the maximum time (in seconds) that is allowed between
+ commits with identical user and log message in a single
+ changeset. When very large files were checked in as part of a
+ changeset then the default may not be long enough. The default
+ is 60.
convert.cvsps.mergeto
- Specify a regular expression to which commit log messages
- are matched. If a match occurs, then the conversion process
- will insert a dummy revision merging the branch on which
- this log message occurs to the branch indicated in the
- regex. Default is "{{mergetobranch ([-\w]+)}}"
+ Specify a regular expression to which commit log messages are
+ matched. If a match occurs, then the conversion process will
+ insert a dummy revision merging the branch on which this log
+ message occurs to the branch indicated in the regex. Default
+ is "{{mergetobranch ([-\w]+)}}"
convert.cvsps.mergefrom
- Specify a regular expression to which commit log messages
- are matched. If a match occurs, then the conversion process
- will add the most recent revision on the branch indicated in
- the regex as the second parent of the changeset. Default is
- "{{mergefrombranch ([-\w]+)}}"
- hook.cvslog Specify a Python function to be called at the end of
- gathering the CVS log. The function is passed a list with
- the log entries, and can modify the entries in-place, or add
- or delete them.
+ Specify a regular expression to which commit log messages are
+ matched. If a match occurs, then the conversion process will
+ add the most recent revision on the branch indicated in the
+ regex as the second parent of the changeset. Default is
+ "{{mergefrombranch ([-\w]+)}}"
+ hook.cvslog
+ Specify a Python function to be called at the end of gathering
+ the CVS log. The function is passed a list with the log
+ entries, and can modify the entries in-place, or add or delete
+ them.
hook.cvschangesets
- Specify a Python function to be called after the changesets
- are calculated from the CVS log. The function is passed a
- list with the changeset entries, and can modify the
- changesets in-place, or add or delete them.
+ Specify a Python function to be called after the changesets
+ are calculated from the the CVS log. The function is passed a
+ list with the changeset entries, and can modify the changesets
+ in-place, or add or delete them.
An additional "debugcvsps" Mercurial command allows the builtin changeset
merging code to be run without doing a conversion. Its parameters and
@@ -188,7 +189,7 @@
more details.
Subversion Source
- #################
+ '''''''''''''''''
Subversion source detects classical trunk/branches/tags layouts. By
default, the supplied "svn://repo/path/" source URL is converted as a
@@ -203,24 +204,22 @@
The following options can be set with "--config":
convert.svn.branches
- specify the directory containing branches. The default is
- "branches".
+ specify the directory containing branches. The default is
+ "branches".
convert.svn.tags
- specify the directory containing tags. The default is
- "tags".
+ specify the directory containing tags. The default is "tags".
convert.svn.trunk
- specify the name of the trunk branch. The default is
- "trunk".
+ specify the name of the trunk branch. The default is "trunk".
Source history can be retrieved starting at a specific revision, instead
of being integrally converted. Only single branch conversions are
supported.
convert.svn.startrev
- specify start Subversion revision number. The default is 0.
+ specify start Subversion revision number. The default is 0.
Perforce Source
- ###############
+ '''''''''''''''
The Perforce (P4) importer can be given a p4 depot path or a client
specification as source. It will convert all files in the source to a flat
@@ -232,36 +231,36 @@
specifying an initial Perforce revision:
convert.p4.startrev
- specify initial Perforce revision (a Perforce changelist
- number).
+ specify initial Perforce revision (a Perforce changelist
+ number).
Mercurial Destination
- #####################
+ '''''''''''''''''''''
The following options are supported:
convert.hg.clonebranches
- dispatch source branches in separate clones. The default is
- False.
+ dispatch source branches in separate clones. The default is
+ False.
convert.hg.tagsbranch
- branch name for tag revisions, defaults to "default".
+ branch name for tag revisions, defaults to "default".
convert.hg.usebranchnames
- preserve branch names. The default is True.
+ preserve branch names. The default is True.
options:
- -s --source-type TYPE source repository type
- -d --dest-type TYPE destination repository type
- -r --rev REV import up to target revision REV
- -A --authormap FILE remap usernames using this file
- --filemap FILE remap file names using contents of file
- --splicemap FILE splice synthesized history into place
- --branchmap FILE change branch names while converting
- --branchsort try to sort changesets by branches
- --datesort try to sort changesets by date
- --sourcesort preserve source changesets order
-
- use "hg -v help convert" to show more info
+ -s --source-type TYPE source repository type
+ -d --dest-type TYPE destination repository type
+ -r --rev REV import up to target revision REV
+ -A --authormap FILE remap usernames using this file
+ --filemap FILE remap file names using contents of file
+ --splicemap FILE splice synthesized history into place
+ --branchmap FILE change branch names while converting
+ --branchsort try to sort changesets by branches
+ --datesort try to sort changesets by date
+ --sourcesort preserve source changesets order
+
+ use "hg -v help convert" to show global options
$ hg init a
$ cd a
$ echo a > a
@@ -291,27 +290,24 @@
pulling from ../a
searching for changes
no changes found
+ $ touch bogusfile
-conversion to existing file should fail
+should fail
- $ touch bogusfile
$ hg convert a bogusfile
initializing destination bogusfile repository
abort: cannot create new bundle repository
[255]
-
-#if unix-permissions
-
-conversion to dir without permissions should fail
-
$ mkdir bogusdir
$ chmod 000 bogusdir
+should fail
+
$ hg convert a bogusdir
abort: Permission denied: bogusdir
[255]
-user permissions should succeed
+should succeed
$ chmod 700 bogusdir
$ hg convert a bogusdir
@@ -325,8 +321,6 @@ user permissions should succeed
1 d
0 e
-#endif
-
test pre and post conversion actions
$ echo 'include b' > filemap
@@ -396,52 +390,3 @@ test bogus URL
$ hg convert -q bzr+ssh://foobar@selenic.com/baz baz
abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository
[255]
-
-test revset converted() lookup
-
- $ hg --config convert.hg.saverev=True convert a c
- initializing destination c repository
- scanning source...
- sorting...
- converting...
- 4 a
- 3 b
- 2 c
- 1 d
- 0 e
- $ echo f > c/f
- $ hg -R c ci -d'0 0' -Amf
- adding f
- created new head
- $ hg -R c log -r "converted(09d945a62ce6)"
- changeset: 1:98c3dd46a874
- user: test
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: b
-
- $ hg -R c log -r "converted()"
- changeset: 0:31ed57b2037c
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
- changeset: 1:98c3dd46a874
- user: test
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: b
-
- changeset: 2:3b9ca06ef716
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: c
-
- changeset: 3:4e0debd37cf2
- user: test
- date: Thu Jan 01 00:00:03 1970 +0000
- summary: d
-
- changeset: 4:9de3bc9349c5
- user: test
- date: Thu Jan 01 00:00:04 1970 +0000
- summary: e
-
diff --git a/tests/test-copy-move-merge.t b/tests/test-copy-move-merge.t
index cc64b4c..d5fbb8e 100644
--- a/tests/test-copy-move-merge.t
+++ b/tests/test-copy-move-merge.t
@@ -24,13 +24,13 @@
unmatched files in other:
b
c
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
c -> a *
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: b8bf91eeebbc, local: add3f11052fa+, remote: 17c05bb7fcb6
+ overwrite None partial False
+ ancestor b8bf91eeebbc local add3f11052fa+ remote 17c05bb7fcb6
a: remote moved to c -> m
a: remote moved to b -> m
preserving a for resolve of b
@@ -60,5 +60,3 @@ file c
0
1
2
-
- $ cd ..
diff --git a/tests/test-copy.t b/tests/test-copy.t
index a3cd463..3bad7a4 100644
--- a/tests/test-copy.t
+++ b/tests/test-copy.t
@@ -1,7 +1,3 @@
-
- $ mkdir part1
- $ cd part1
-
$ hg init
$ echo a > a
$ hg add a
@@ -57,8 +53,8 @@ we should see one log entry for a
this should show a revision linked to changeset 0
$ hg debugindex a
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b789fdd96dc2 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b789fdd96dc2 000000000000 000000000000
we should see one log entry for b
@@ -73,8 +69,8 @@ we should see one log entry for b
this should show a revision linked to changeset 1
$ hg debugindex b
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 65 ..... 1 37d9b5d994ea 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 65 0 1 37d9b5d994ea 000000000000 000000000000
this should show the rename information in the metadata
@@ -82,13 +78,13 @@ this should show the rename information in the metadata
copy: a
copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
- $ "$TESTDIR/md5sum.py" .hg/store/data/b.i
+ $ $TESTDIR/md5sum.py .hg/store/data/b.i
4999f120a3b88713bbefddd195cf5133 .hg/store/data/b.i
$ hg cat b > bsum
- $ "$TESTDIR/md5sum.py" bsum
+ $ $TESTDIR/md5sum.py bsum
60b725f10c9c85c70d97880dfe8191b3 bsum
$ hg cat a > asum
- $ "$TESTDIR/md5sum.py" asum
+ $ $TESTDIR/md5sum.py asum
60b725f10c9c85c70d97880dfe8191b3 asum
$ hg verify
checking changesets
@@ -96,121 +92,3 @@ this should show the rename information in the metadata
crosschecking files in changesets and manifests
checking files
2 files, 2 changesets, 2 total revisions
-
- $ cd ..
-
-
- $ mkdir part2
- $ cd part2
-
- $ hg init
- $ echo foo > foo
-should fail - foo is not managed
- $ hg mv foo bar
- foo: not copying - file is not managed
- abort: no files to copy
- [255]
- $ hg st -A
- ? foo
- $ hg add foo
-dry-run; print a warning that this is not a real copy; foo is added
- $ hg mv --dry-run foo bar
- foo has not been committed yet, so no copy data will be stored for bar.
- $ hg st -A
- A foo
-should print a warning that this is not a real copy; bar is added
- $ hg mv foo bar
- foo has not been committed yet, so no copy data will be stored for bar.
- $ hg st -A
- A bar
-should print a warning that this is not a real copy; foo is added
- $ hg cp bar foo
- bar has not been committed yet, so no copy data will be stored for foo.
- $ hg rm -f bar
- $ rm bar
- $ hg st -A
- A foo
- $ hg commit -m1
-
-moving a missing file
- $ rm foo
- $ hg mv foo foo3
- foo: deleted in working copy
- foo3 does not exist!
- $ hg up -qC .
-
-copy --after to a nonexistant target filename
- $ hg cp -A foo dummy
- foo: not recording copy - dummy does not exist
-
-dry-run; should show that foo is clean
- $ hg copy --dry-run foo bar
- $ hg st -A
- C foo
-should show copy
- $ hg copy foo bar
- $ hg st -C
- A bar
- foo
-
-shouldn't show copy
- $ hg commit -m2
- $ hg st -C
-
-should match
- $ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re)
- $ hg debugrename bar
- bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
-
- $ echo bleah > foo
- $ echo quux > bar
- $ hg commit -m3
-
-should not be renamed
- $ hg debugrename bar
- bar not renamed
-
- $ hg copy -f foo bar
-should show copy
- $ hg st -C
- M bar
- foo
- $ hg commit -m3
-
-should show no parents for tip
- $ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 69 ..... 1 7711d36246cc 000000000000 000000000000 (re)
- 1 69 6 ..... 2 bdf70a2b8d03 7711d36246cc 000000000000 (re)
- 2 75 81 ..... 3 b2558327ea8d 000000000000 000000000000 (re)
-should match
- $ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re)
- 1 5 7 ..... 2 dd12c926cf16 2ed2a3912a0b 000000000000 (re)
- $ hg debugrename bar
- bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
-
-should show no copies
- $ hg st -C
-
-copy --after on an added file
- $ cp bar baz
- $ hg add baz
- $ hg cp -A bar baz
- $ hg st -C
- A baz
- bar
-
-foo was clean:
- $ hg st -AC foo
- C foo
-but it's considered modified after a copy --after --force
- $ hg copy -Af bar foo
- $ hg st -AC foo
- M foo
- bar
-
- $ cd ..
diff --git a/tests/test-copy2.t b/tests/test-copy2.t
new file mode 100644
index 0000000..6c0aa8a
--- /dev/null
+++ b/tests/test-copy2.t
@@ -0,0 +1,109 @@
+ $ hg init
+ $ echo foo > foo
+should fail - foo is not managed
+ $ hg mv foo bar
+ foo: not copying - file is not managed
+ abort: no files to copy
+ [255]
+ $ hg st -A
+ ? foo
+ $ hg add foo
+dry-run; print a warning that this is not a real copy; foo is added
+ $ hg mv --dry-run foo bar
+ foo has not been committed yet, so no copy data will be stored for bar.
+ $ hg st -A
+ A foo
+should print a warning that this is not a real copy; bar is added
+ $ hg mv foo bar
+ foo has not been committed yet, so no copy data will be stored for bar.
+ $ hg st -A
+ A bar
+should print a warning that this is not a real copy; foo is added
+ $ hg cp bar foo
+ bar has not been committed yet, so no copy data will be stored for foo.
+ $ hg rm -f bar
+ $ rm bar
+ $ hg st -A
+ A foo
+ $ hg commit -m1
+
+moving a missing file
+ $ rm foo
+ $ hg mv foo foo3
+ foo: deleted in working copy
+ foo3 does not exist!
+ $ hg up -qC .
+
+copy --after to a nonexistant target filename
+ $ hg cp -A foo dummy
+ foo: not recording copy - dummy does not exist
+
+dry-run; should show that foo is clean
+ $ hg copy --dry-run foo bar
+ $ hg st -A
+ C foo
+should show copy
+ $ hg copy foo bar
+ $ hg st -C
+ A bar
+ foo
+
+shouldn't show copy
+ $ hg commit -m2
+ $ hg st -C
+
+should match
+ $ hg debugindex foo
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
+ $ hg debugrename bar
+ bar renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
+
+ $ echo bleah > foo
+ $ echo quux > bar
+ $ hg commit -m3
+
+should not be renamed
+ $ hg debugrename bar
+ bar not renamed
+
+ $ hg copy -f foo bar
+should show copy
+ $ hg st -C
+ M bar
+ foo
+ $ hg commit -m3
+
+should show no parents for tip
+ $ hg debugindex bar
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 69 0 1 7711d36246cc 000000000000 000000000000
+ 1 69 6 1 2 bdf70a2b8d03 7711d36246cc 000000000000
+ 2 75 81 1 3 b2558327ea8d 000000000000 000000000000
+should match
+ $ hg debugindex foo
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
+ 1 5 7 1 2 dd12c926cf16 2ed2a3912a0b 000000000000
+ $ hg debugrename bar
+ bar renamed from foo:dd12c926cf165e3eb4cf87b084955cb617221c17
+
+should show no copies
+ $ hg st -C
+
+copy --after on an added file
+ $ cp bar baz
+ $ hg add baz
+ $ hg cp -A bar baz
+ $ hg st -C
+ A baz
+ bar
+
+foo was clean:
+ $ hg st -AC foo
+ C foo
+but it's considered modified after a copy --after --force
+ $ hg copy -Af bar foo
+ $ hg st -AC foo
+ M foo
+ bar
diff --git a/tests/test-debugbuilddag.t b/tests/test-debugbuilddag.t
index e07941a..f9e2284 100644
--- a/tests/test-debugbuilddag.t
+++ b/tests/test-debugbuilddag.t
@@ -7,9 +7,8 @@ plain
$ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' \
> --config extensions.progress= --config progress.assume-tty=1 \
> --config progress.delay=0 --config progress.refresh=0 \
- > --config progress.format=topic,bar,number \
> --config progress.width=60 2>&1 | \
- > python "$TESTDIR/filtercr.py"
+ > python $TESTDIR/filtercr.py
building [ ] 0/12
building [ ] 0/12
@@ -87,19 +86,18 @@ glog
o 0: r0 [] @ 0.00
-overwritten files, starting on a non-default branch
+overwritten files
$ rm -r .hg
$ hg init
- $ hg debugbuilddag '@start.@default.:f +3:p2 @temp <f+4 @default /p2 +2' -q -o
+ $ hg debugbuilddag '+2:f +3:p2 @temp <f+4 @default /p2 +2' -q -o
tags
$ cat .hg/localtags
- f778700ebd50fcf282b23a4446bd155da6453eb6 f
- bbccf169769006e2490efd2a02f11c3d38d462bd p2
+ 2a8ed67d317e370eac733dccc501b12d7b9c441a f
+ 4226a30965b7af58f94d0cda7e6c2c9c63e6bf90 p2
dag
$ hg debugdag -t -b
- @start+1
- @default+1:f
+ +2:f
+3:p2
@temp*f+3
@default*/p2+2:tip
@@ -130,7 +128,7 @@ glog
|/
o 1: r1 [] @ 1.00
|
- o 0: r0 [start] @ 0.00
+ o 0: r0 [] @ 0.00
glog of
$ hg glog --template '{rev}: {desc} [{branches}]\n' of
@@ -156,13 +154,13 @@ glog of
|/
o 1: r1 []
|
- o 0: r0 [start]
+ o 0: r0 []
tags
$ hg tags -v
- tip 11:9ffe238a67a2
- p2 4:bbccf1697690 local
- f 1:f778700ebd50 local
+ tip 11:58a51e5eb988
+ p2 4:4226a30965b7 local
+ f 1:2a8ed67d317e local
cat of
$ hg cat of --rev tip
r11
diff --git a/tests/test-debugbundle.t b/tests/test-debugbundle.t
index 4e911ea..1eb4085 100644
--- a/tests/test-debugbundle.t
+++ b/tests/test-debugbundle.t
@@ -34,4 +34,3 @@ Verbose output:
c
b80de5d138758541c5f05265ad144ab9fa86d1db 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0000000000000000000000000000000000000000 12
- $ cd ..
diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
deleted file mode 100644
index ecd1eb1..0000000
--- a/tests/test-debugcommands.t
+++ /dev/null
@@ -1,25 +0,0 @@
- $ hg init debugrevlog
- $ cd debugrevlog
- $ echo a > a
- $ hg ci -Am adda
- adding a
- $ hg debugrevlog -m
- format : 1
- flags : inline
-
- revisions : 1
- merges : 0 ( 0.00%)
- normal : 1 (100.00%)
- revisions : 1
- full : 1 (100.00%)
- deltas : 0 ( 0.00%)
- revision size : 44
- full : 44 (100.00%)
- deltas : 0 ( 0.00%)
-
- avg chain length : 0
- compression ratio : 0
-
- uncompressed data size (min/max/avg) : 43 / 43 / 43
- full revision size (min/max/avg) : 44 / 44 / 44
- delta size (min/max/avg) : 0 / 0 / 0
diff --git a/tests/test-debugcomplete.t b/tests/test-debugcomplete.t
index b23b23d..7ebfa36 100644
--- a/tests/test-debugcomplete.t
+++ b/tests/test-debugcomplete.t
@@ -17,7 +17,6 @@ Show all commands except debug commands
diff
export
forget
- graft
grep
heads
help
@@ -32,7 +31,6 @@ Show all commands except debug commands
outgoing
parents
paths
- phase
pull
push
recover
@@ -86,9 +84,7 @@ Show debug commands if there are no other candidates
debugindexdot
debuginstall
debugknown
- debugobsolete
debugpushkey
- debugpvec
debugrebuildstate
debugrename
debugrevlog
@@ -192,16 +188,15 @@ Show an error if we use --options with an ambiguous abbreviation
Show all commands + options
$ hg debugcommands
add: include, exclude, subrepos, dry-run
- annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, ignore-all-space, ignore-space-change, ignore-blank-lines, include, exclude
+ annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, include, exclude
clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
- commit: addremove, close-branch, amend, include, exclude, message, logfile, date, user, subrepos
+ commit: addremove, close-branch, include, exclude, message, logfile, date, user
diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude, subrepos
export: output, switch-parent, rev, text, git, nodates
forget: include, exclude
init: ssh, remotecmd, insecure
- log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, hidden, patch, git, limit, no-merges, stat, graph, style, template, include, exclude
- merge: force, rev, preview, tool
- phase: public, draft, secret, force, rev
+ log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, hidden, patch, git, limit, no-merges, stat, style, template, include, exclude
+ merge: force, tool, rev, preview
pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure
push: force, rev, bookmark, branch, new-branch, ssh, remotecmd, insecure
remove: after, force, include, exclude
@@ -211,7 +206,7 @@ Show all commands + options
update: clean, check, date, rev
addremove: similarity, include, exclude, dry-run
archive: no-decode, prefix, rev, type, subrepos, include, exclude
- backout: merge, parent, rev, tool, include, exclude, message, logfile, date, user
+ backout: merge, parent, tool, rev, include, exclude, message, logfile, date, user
bisect: reset, good, bad, skip, extend, command, noupdate
bookmarks: force, rev, delete, rename, inactive
branch: force, clean
@@ -237,9 +232,7 @@ Show all commands + options
debugindexdot:
debuginstall:
debugknown:
- debugobsolete: date, user
debugpushkey:
- debugpvec:
debugrebuildstate: rev
debugrename: rev
debugrevlog: changelog, manifest, dump
@@ -249,23 +242,22 @@ Show all commands + options
debugsub: rev
debugwalk: include, exclude
debugwireargs: three, four, five, ssh, remotecmd, insecure
- graft: rev, continue, edit, log, currentdate, currentuser, date, user, tool, dry-run
grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude
heads: rev, topo, active, closed, style, template
- help: extension, command, keyword
- identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure
- import: strip, base, edit, force, no-commit, bypass, exact, import-branch, message, logfile, date, user, similarity
- incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos
+ help: extension, command
+ identify: rev, num, id, branch, tags, bookmarks
+ import: strip, base, force, no-commit, bypass, exact, import-branch, message, logfile, date, user, similarity
+ incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd, insecure, subrepos
locate: rev, print0, fullpath, include, exclude
manifest: rev, all
- outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos
+ outgoing: force, rev, newest-first, bookmarks, branch, patch, git, limit, no-merges, stat, style, template, ssh, remotecmd, insecure, subrepos
parents: rev, style, template
paths:
recover:
rename: after, force, include, exclude, dry-run
- resolve: all, list, mark, unmark, no-status, tool, include, exclude
+ resolve: all, list, mark, unmark, tool, no-status, include, exclude
revert: all, date, rev, no-backup, include, exclude, dry-run
- rollback: dry-run, force
+ rollback: dry-run
root:
showconfig: untrusted
tag: force, local, rev, remove, edit, message, date, user
diff --git a/tests/test-debugindexdot.t b/tests/test-debugindexdot.t
index 98ee015..e8a6123 100644
--- a/tests/test-debugindexdot.t
+++ b/tests/test-debugindexdot.t
@@ -21,5 +21,3 @@ Create a short file history including a merge.
2 -> 3
1 -> 3
}
-
- $ cd ..
diff --git a/tests/test-default-push.t b/tests/test-default-push.t
index 5c7d492..b1b75b5 100644
--- a/tests/test-default-push.t
+++ b/tests/test-default-push.t
@@ -18,7 +18,7 @@
Push should push to 'default' when 'default-push' not set:
$ hg --cwd b push
- pushing to $TESTTMP/a (glob)
+ pushing to $TESTTMP/a
searching for changes
adding changesets
adding manifests
@@ -29,7 +29,7 @@ Push should push to 'default-push' when set:
$ echo 'default-push = ../c' >> b/.hg/hgrc
$ hg --cwd b push
- pushing to $TESTTMP/c (glob)
+ pushing to $TESTTMP/c
searching for changes
adding changesets
adding manifests
diff --git a/tests/test-diff-binary-file.t b/tests/test-diff-binary-file.t
index eac24c9..9262809 100644
--- a/tests/test-diff-binary-file.t
+++ b/tests/test-diff-binary-file.t
@@ -1,6 +1,6 @@
$ hg init a
$ cd a
- $ cp "$TESTDIR/binfile.bin" .
+ $ cp $TESTDIR/binfile.bin .
$ hg add binfile.bin
$ hg ci -m 'add binfile.bin'
@@ -37,4 +37,3 @@
$ hg diff --git -r 0 -r 2
- $ cd ..
diff --git a/tests/test-diff-change.t b/tests/test-diff-change.t
index 05d34ad..271735e 100644
--- a/tests/test-diff-change.t
+++ b/tests/test-diff-change.t
@@ -29,18 +29,12 @@ Testing diff --change
-first
+second
-Test dumb revspecs (issue3474)
-
- $ hg diff -r 2:2
- $ hg diff -r "2 and 1"
- abort: empty revision range
- [255]
Testing diff --change when merge:
$ for i in 1 2 3 4 5 6 7 8 9 10; do
- > echo $i >> file.txt
- > done
+ $ echo $i >> file.txt
+ $ done
$ hg commit -m "lots of text" # 3
$ sed -e 's,^2$,x,' file.txt > file.txt.tmp
@@ -90,4 +84,3 @@ must be similar to 'hg diff --change 5':
9
10
- $ cd ..
diff --git a/tests/test-diff-color.t b/tests/test-diff-color.t
index fe898d9..94387ac 100644
--- a/tests/test-diff-color.t
+++ b/tests/test-diff-color.t
@@ -72,11 +72,9 @@ diffstat
$ echo "[diff]" >> $HGRCPATH
$ echo "git=True" >> $HGRCPATH
-#if execbit
-
record
- $ chmod +x a
+ $ chmod 0755 a
$ hg record --color=always -m moda a <<EOF
> y
> y
@@ -85,7 +83,7 @@ record
\x1b[0;36;1mold mode 100644\x1b[0m (esc)
\x1b[0;36;1mnew mode 100755\x1b[0m (esc)
1 hunks, 1 lines changed
- \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m (esc)
+ \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc)
\x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
c
a
@@ -95,8 +93,9 @@ record
a
a
c
- \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m (esc)
-
+ \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc)
+ $ echo
+
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
$ hg rollback
@@ -113,7 +112,7 @@ qrecord
\x1b[0;36;1mold mode 100644\x1b[0m (esc)
\x1b[0;36;1mnew mode 100755\x1b[0m (esc)
1 hunks, 1 lines changed
- \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m (esc)
+ \x1b[0;33mexamine changes to 'a'? [Ynsfdaq?]\x1b[0m (esc)
\x1b[0;35m@@ -2,7 +2,7 @@\x1b[0m (esc)
c
a
@@ -123,8 +122,6 @@ qrecord
a
a
c
- \x1b[0;33mrecord this change to 'a'? [Ynesfdaq?]\x1b[0m (esc)
-
-#endif
-
- $ cd ..
+ \x1b[0;33mrecord this change to 'a'? [Ynsfdaq?]\x1b[0m (esc)
+ $ echo
+
diff --git a/tests/test-diff-hashes.t b/tests/test-diff-hashes.t
index 718f46e..2100276 100644
--- a/tests/test-diff-hashes.t
+++ b/tests/test-diff-hashes.t
@@ -2,8 +2,8 @@
$ cd a
$ hg diff inexistent1 inexistent2
- inexistent1: * (glob)
- inexistent2: * (glob)
+ inexistent1: No such file or directory
+ inexistent2: No such file or directory
$ echo bar > foo
$ hg add foo
@@ -43,4 +43,3 @@
-bar
+foobar
- $ cd ..
diff --git a/tests/test-diff-ignore-whitespace.t b/tests/test-diff-ignore-whitespace.t
index 35ca98d..ac5764a 100644
--- a/tests/test-diff-ignore-whitespace.t
+++ b/tests/test-diff-ignore-whitespace.t
@@ -442,59 +442,3 @@ Only new line noticed:
New line not noticed when space change ignored:
$ hg ndiff --ignore-blank-lines --ignore-all-space
-
-Do not ignore all newlines, only blank lines
-
- $ printf 'hello \nworld\ngoodbye world\n' > foo
- $ hg ndiff --ignore-blank-lines
- diff -r 540c40a65b78 foo
- --- a/foo
- +++ b/foo
- @@ -1,2 +1,3 @@
- -hello world
- +hello
- +world
- goodbye world
-
-Test hunk offsets adjustments with --ignore-blank-lines
-
- $ hg revert -aC
- reverting foo
- $ printf '\nb\nx\nd\n' > a
- $ printf 'b\ny\nd\n' > b
- $ hg add a b
- $ hg ci -m add
- $ hg cat -r . a > b
- $ hg cat -r . b > a
- $ hg diff -B --nodates a > ../diffa
- $ cat ../diffa
- diff -r 0e66aa54f318 a
- --- a/a
- +++ b/a
- @@ -1,4 +1,4 @@
-
- b
- -x
- +y
- d
- $ hg diff -B --nodates b > ../diffb
- $ cat ../diffb
- diff -r 0e66aa54f318 b
- --- a/b
- +++ b/b
- @@ -1,3 +1,3 @@
- b
- -y
- +x
- d
- $ hg revert -aC
- reverting a
- reverting b
- $ hg import --no-commit ../diffa
- applying ../diffa
- $ hg revert -aC
- reverting a
- $ hg import --no-commit ../diffb
- applying ../diffb
- $ hg revert -aC
- reverting b
diff --git a/tests/test-diff-newlines.t b/tests/test-diff-newlines.t
index 565b756..523b319 100644
--- a/tests/test-diff-newlines.t
+++ b/tests/test-diff-newlines.t
@@ -1,6 +1,6 @@
$ hg init
- $ python -c 'file("a", "wb").write("confuse str.splitlines\nembedded\rnewline\n")'
+ $ python -c 'print "confuse str.splitlines\nembedded\rnewline"' > a
$ hg ci -Ama -d '1 0'
adding a
diff --git a/tests/test-diff-subdir.t b/tests/test-diff-subdir.t
index e10a87c..ecf3c4b 100644
--- a/tests/test-diff-subdir.t
+++ b/tests/test-diff-subdir.t
@@ -44,4 +44,3 @@ inside beta
@@ -0,0 +1,1 @@
+2
- $ cd ..
diff --git a/tests/test-diff-unified.t b/tests/test-diff-unified.t
index a79d520..63cc620 100644
--- a/tests/test-diff-unified.t
+++ b/tests/test-diff-unified.t
@@ -89,110 +89,23 @@ invalid diff.unified
abort: diff context lines count must be an integer, not 'foo'
[255]
- $ cd ..
+test off-by-one error with diff -p
-
-0 lines of context hunk header matches gnu diff hunk header
-
- $ hg init diffzero
- $ cd diffzero
- $ cat > f1 << EOF
- > c2
- > c4
- > c5
- > EOF
- $ hg commit -Am0
- adding f1
-
- $ cat > f2 << EOF
- > c1
- > c2
- > c3
- > c4
- > EOF
- $ mv f2 f1
- $ hg diff -U0 --nodates
- diff -r 55d8ff78db23 f1
- --- a/f1
- +++ b/f1
- @@ -0,0 +1,1 @@
- +c1
- @@ -1,0 +3,1 @@
- +c3
- @@ -3,1 +4,0 @@
- -c5
-
- $ hg diff -U0 --nodates --git
- diff --git a/f1 b/f1
- --- a/f1
- +++ b/f1
- @@ -0,0 +1,1 @@
- +c1
- @@ -1,0 +3,1 @@
- +c3
- @@ -3,1 +4,0 @@
- -c5
-
- $ hg diff -U0 --nodates -p
- diff -r 55d8ff78db23 f1
- --- a/f1
- +++ b/f1
- @@ -0,0 +1,1 @@
- +c1
- @@ -1,0 +3,1 @@ c2
- +c3
- @@ -3,1 +4,0 @@ c4
- -c5
-
- $ echo a > f1
- $ hg ci -m movef2
-
-Test diff headers terminating with TAB when necessary (issue3357)
-Regular diff --nodates, file creation
-
- $ hg mv f1 'f 1'
- $ echo b > 'f 1'
- $ hg diff --nodates 'f 1'
- diff -r 7574207d0d15 f 1
- --- /dev/null
- +++ b/f 1
- @@ -0,0 +1,1 @@
- +b
-
-Git diff, adding space
-
- $ hg diff --git
- diff --git a/f1 b/f 1
- rename from f1
- rename to f 1
- --- a/f1
- +++ b/f 1
- @@ -1,1 +1,1 @@
- -a
+ $ hg init diffp
+ $ cd diffp
+ $ echo a > a
+ $ hg ci -Ama
+ adding a
+ $ rm a
+ $ echo b > a
+ $ echo a >> a
+ $ echo c >> a
+ $ hg diff -U0 -p --nodates
+ diff -r cb9a9f314b8b a
+ --- a/a
+ +++ b/a
+ @@ -1,0 +1,1 @@
+b
+ @@ -2,0 +3,1 @@ a
+ +c
-Regular diff --nodates, file deletion
-
- $ hg ci -m addspace
- $ hg mv 'f 1' f1
- $ echo a > f1
- $ hg diff --nodates 'f 1'
- diff -r ca50fe67c9c7 f 1
- --- a/f 1
- +++ /dev/null
- @@ -1,1 +0,0 @@
- -b
-
-Git diff, removing space
-
- $ hg diff --git
- diff --git a/f 1 b/f1
- rename from f 1
- rename to f1
- --- a/f 1
- +++ b/f1
- @@ -1,1 +1,1 @@
- -b
- +a
-
- $ cd ..
diff --git a/tests/test-diff-upgrade.t b/tests/test-diff-upgrade.t
index 94c299a..3d69a4d 100644
--- a/tests/test-diff-upgrade.t
+++ b/tests/test-diff-upgrade.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" execbit || exit 80
$ echo "[extensions]" >> $HGRCPATH
$ echo "autodiff=$TESTDIR/autodiff.py" >> $HGRCPATH
diff --git a/tests/test-diffstat.t b/tests/test-diffstat.t
index 5d03cdc..2f20d3d 100644
--- a/tests/test-diffstat.t
+++ b/tests/test-diffstat.t
@@ -35,32 +35,30 @@ Narrow diffstat:
$ hg ci -m appenda
- >>> open("c", "wb").write("\0")
- $ touch d
- $ hg add c d
+ $ printf '\0' > c
+ $ hg add c
Binary diffstat:
$ hg diff --stat
- c | Bin
+ c | 0
1 files changed, 0 insertions(+), 0 deletions(-)
Binary git diffstat:
$ hg diff --stat --git
c | Bin
- d | 0
- 2 files changed, 0 insertions(+), 0 deletions(-)
+ 1 files changed, 0 insertions(+), 0 deletions(-)
$ hg ci -m createb
- >>> open("file with spaces", "wb").write("\0")
+ $ printf '\0' > "file with spaces"
$ hg add "file with spaces"
Filename with spaces diffstat:
$ hg diff --stat
- file with spaces | Bin
+ file with spaces | 0
1 files changed, 0 insertions(+), 0 deletions(-)
Filename with spaces git diffstat:
@@ -69,4 +67,3 @@ Filename with spaces git diffstat:
file with spaces | Bin
1 files changed, 0 insertions(+), 0 deletions(-)
- $ cd ..
diff --git a/tests/test-dirstate.t b/tests/test-dirstate.t
index 6b65f59..5e5c80e 100644
--- a/tests/test-dirstate.t
+++ b/tests/test-dirstate.t
@@ -11,24 +11,9 @@
adding a/b/c/d/y
adding a/b/c/d/z
$ hg mv a z
- moving a/b/c/d/x to z/b/c/d/x (glob)
- moving a/b/c/d/y to z/b/c/d/y (glob)
- moving a/b/c/d/z to z/b/c/d/z (glob)
-
-Test name collisions
-
- $ rm z/b/c/d/x
- $ mkdir z/b/c/d/x
- $ touch z/b/c/d/x/y
- $ hg add z/b/c/d/x/y
- abort: file 'z/b/c/d/x' in dirstate clashes with 'z/b/c/d/x/y'
- [255]
- $ rm -rf z/b/c/d
- $ touch z/b/c/d
- $ hg add z/b/c/d
- abort: directory 'z/b/c/d' already in dirstate
- [255]
-
+ moving a/b/c/d/x to z/b/c/d/x
+ moving a/b/c/d/y to z/b/c/d/y
+ moving a/b/c/d/z to z/b/c/d/z
$ cd ..
Issue1790: dirstate entry locked into unset if file mtime is set into
diff --git a/tests/test-dispatch.t b/tests/test-dispatch.t
index 3b11d14..ab0f7fb 100644
--- a/tests/test-dispatch.t
+++ b/tests/test-dispatch.t
@@ -1,5 +1,9 @@
test command parsing and dispatch
+ $ "$TESTDIR/hghave" no-outer-repo || exit 80
+
+ $ dir=`pwd`
+
$ hg init a
$ cd a
@@ -21,11 +25,11 @@ Missing arg:
options:
- -o --output FORMAT print output to file with formatted name
- -r --rev REV print the given revision
- --decode apply any matching decode filter
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
+ -o --output FORMAT print output to file with formatted name
+ -r --rev REV print the given revision
+ --decode apply any matching decode filter
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
[+] marked option can be specified multiple times
@@ -44,10 +48,6 @@ Missing arg:
a: no such file in rev 000000000000
[1]
- $ cd "$TESTTMP"
-
-#if no-outer-repo
-
No repo:
$ cd $dir
@@ -55,4 +55,3 @@ No repo:
abort: no repository found in '$TESTTMP' (.hg not found)!
[255]
-#endif
diff --git a/tests/test-doctest.py b/tests/test-doctest.py
index 8f143c1..6a10b2f 100644
--- a/tests/test-doctest.py
+++ b/tests/test-doctest.py
@@ -4,9 +4,6 @@ if 'TERM' in os.environ:
del os.environ['TERM']
import doctest
-import mercurial.util
-doctest.testmod(mercurial.util)
-
import mercurial.changelog
doctest.testmod(mercurial.changelog)
@@ -25,6 +22,9 @@ doctest.testmod(mercurial.ui)
import mercurial.url
doctest.testmod(mercurial.url)
+import mercurial.util
+doctest.testmod(mercurial.util)
+
import mercurial.encoding
doctest.testmod(mercurial.encoding)
@@ -33,12 +33,3 @@ doctest.testmod(mercurial.hgweb.hgwebdir_mod)
import hgext.convert.cvsps
doctest.testmod(hgext.convert.cvsps)
-
-import mercurial.revset
-doctest.testmod(mercurial.revset)
-
-import mercurial.minirst
-doctest.testmod(mercurial.minirst)
-
-import mercurial.templatefilters
-doctest.testmod(mercurial.templatefilters)
diff --git a/tests/test-double-merge.t b/tests/test-double-merge.t
index a703c5b..06c0f65 100644
--- a/tests/test-double-merge.t
+++ b/tests/test-double-merge.t
@@ -29,12 +29,12 @@ we get conflicts that shouldn't be there
searching for copies back to rev 1
unmatched files in other:
bar
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
bar -> foo *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: e6dc8efe11cc, local: 6a0df1dad128+, remote: 484bf6903104
+ overwrite None partial False
+ ancestor e6dc8efe11cc local 6a0df1dad128+ remote 484bf6903104
foo: versions differ -> m
foo: remote copied to bar -> m
preserving foo for resolve of bar
@@ -63,5 +63,3 @@ contents of bar
line 0
line 1
line 2-2
-
- $ cd ..
diff --git a/tests/test-duplicateoptions.py b/tests/test-duplicateoptions.py
index 22964c4..43b4b87 100644
--- a/tests/test-duplicateoptions.py
+++ b/tests/test-duplicateoptions.py
@@ -1,7 +1,7 @@
import os
from mercurial import ui, commands, extensions
-ignore = set(['highlight', 'inotify', 'win32text', 'factotum'])
+ignore = set(['highlight', 'inotify', 'win32text'])
if os.name != 'nt':
ignore.add('win32mbcs')
@@ -19,15 +19,9 @@ hgrc.close()
u = ui.ui()
extensions.loadall(u)
-globalshort = set()
-globallong = set()
-for option in commands.globalopts:
- option[0] and globalshort.add(option[0])
- option[1] and globallong.add(option[1])
-
for cmd, entry in commands.table.iteritems():
- seenshort = globalshort.copy()
- seenlong = globallong.copy()
+ seenshort = set()
+ seenlong = set()
for option in entry[1]:
if (option[0] and option[0] in seenshort) or \
(option[1] and option[1] in seenlong):
diff --git a/tests/test-empty-file.t b/tests/test-empty-file.t
index 07e7c58..d25a00d 100644
--- a/tests/test-empty-file.t
+++ b/tests/test-empty-file.t
@@ -44,4 +44,3 @@ empty file that came from rev 1:
b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty2
b80de5d138758541c5f05265ad144ab9fa86d1db 644 empty3
- $ cd ..
diff --git a/tests/test-empty.t b/tests/test-empty.t
index 5f25f36..16aad6a 100644
--- a/tests/test-empty.t
+++ b/tests/test-empty.t
@@ -51,5 +51,3 @@ Poke at a clone:
Should be empty:
$ ls .hg/store
-
- $ cd ..
diff --git a/tests/test-encode.t b/tests/test-encode.t
index 863bba3..ed6e0fd 100644
--- a/tests/test-encode.t
+++ b/tests/test-encode.t
@@ -59,5 +59,3 @@ check hg cat operation
this is a test
$ hg -R .. cat --decode ../a.gz | gunzip
this is a test
-
- $ cd ..
diff --git a/tests/test-encoding-align.t b/tests/test-encoding-align.t
index b0ce561..1d674c7 100644
--- a/tests/test-encoding-align.t
+++ b/tests/test-encoding-align.t
@@ -46,20 +46,20 @@ alignment of option descriptions in help
check alignment of option descriptions in help
$ hg help showoptlist
- hg showoptlist
+ hg showoptlist
dummy command to show option descriptions
options:
- -s --opt1 \xe7\x9f\xad\xe5\x90\x8d short width \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d (esc)
- -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_
- MIDDLE_ MIDDLE_ MIDDLE_
- -l --opt3 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d long width \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
- \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
- \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
+ -s --opt1 \xe7\x9f\xad\xe5\x90\x8d short width \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d (esc)
+ -m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_
+ MIDDLE_ MIDDLE_ MIDDLE_
+ -l --opt3 \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d long width \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
+ \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
+ \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
- use "hg -v help showoptlist" to show more info
+ use "hg -v help showoptlist" to show global options
$ rm -f s; touch s
@@ -115,15 +115,12 @@ add branches/tags
$ hg branch $S
marked working directory as branch \xe7\x9f\xad\xe5\x90\x8d (esc)
- (branches are permanent and global, did you want a bookmark?)
$ hg tag $S
$ hg branch $M
marked working directory as branch MIDDLE_
- (branches are permanent and global, did you want a bookmark?)
$ hg tag $M
$ hg branch $L
marked working directory as branch \xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d (esc)
- (branches are permanent and global, did you want a bookmark?)
$ hg tag $L
check alignment of branches
@@ -141,5 +138,3 @@ check alignment of tags
\xe9\x95\xb7\xe3\x81\x84\xe9\x95\xb7\xe3\x81\x84\xe5\x90\x8d\xe5\x89\x8d 4:9259be597f19 (esc)
MIDDLE_ 3:b06c5b6def9e
\xe7\x9f\xad\xe5\x90\x8d 2:64a70663cee8 (esc)
-
- $ cd ..
diff --git a/tests/test-encoding-textwrap.t b/tests/test-encoding-textwrap.t
index 67b0488..d683c37 100644
--- a/tests/test-encoding-textwrap.t
+++ b/tests/test-encoding-textwrap.t
@@ -57,7 +57,7 @@ define commands to display help text
(1-1) display Japanese full-width characters in cp932
$ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_full_ja
- hg show_full_ja
+ hg show_full_ja
\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf \x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
@@ -67,12 +67,12 @@ define commands to display help text
\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
\x82\xa0\x82\xa2\x82\xa4\x82\xa6\x82\xa8\x82\xa9\x82\xab\x82\xad\x82\xaf (esc)
- use "hg -v help show_full_ja" to show more info
+ use "hg -v help show_full_ja" to show global options
(1-2) display Japanese full-width characters in utf-8
$ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_full_ja
- hg show_full_ja
+ hg show_full_ja
\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 \xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
@@ -82,13 +82,13 @@ define commands to display help text
\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
\xe3\x81\x82\xe3\x81\x84\xe3\x81\x86\xe3\x81\x88\xe3\x81\x8a\xe3\x81\x8b\xe3\x81\x8d\xe3\x81\x8f\xe3\x81\x91 (esc)
- use "hg -v help show_full_ja" to show more info
+ use "hg -v help show_full_ja" to show global options
(1-3) display Japanese half-width characters in cp932
$ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_half_ja
- hg show_half_ja
+ hg show_half_ja
\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 \xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
@@ -98,12 +98,12 @@ define commands to display help text
\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9 (esc)
- use "hg -v help show_half_ja" to show more info
+ use "hg -v help show_half_ja" to show global options
(1-4) display Japanese half-width characters in utf-8
$ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_half_ja
- hg show_half_ja
+ hg show_half_ja
\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 \xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
@@ -113,7 +113,7 @@ define commands to display help text
\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9\xef\xbd\xb1\xef\xbd\xb2\xef\xbd\xb3\xef\xbd\xb4\xef\xbd\xb5\xef\xbd\xb6\xef\xbd\xb7\xef\xbd\xb8\xef\xbd\xb9 (esc)
- use "hg -v help show_half_ja" to show more info
+ use "hg -v help show_half_ja" to show global options
@@ -124,7 +124,7 @@ define commands to display help text
(2-1-1) display Japanese ambiguous-width characters in cp932
$ COLUMNS=60 hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
- hg show_ambig_ja
+ hg show_ambig_ja
\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
@@ -134,12 +134,12 @@ define commands to display help text
\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
- use "hg -v help show_ambig_ja" to show more info
+ use "hg -v help show_ambig_ja" to show global options
(2-1-2) display Japanese ambiguous-width characters in utf-8
$ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
- hg show_ambig_ja
+ hg show_ambig_ja
\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
@@ -149,12 +149,12 @@ define commands to display help text
\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
- use "hg -v help show_ambig_ja" to show more info
+ use "hg -v help show_ambig_ja" to show global options
(2-1-3) display Russian ambiguous-width characters in cp1251
$ COLUMNS=60 hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
- hg show_ambig_ru
+ hg show_ambig_ru
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
@@ -164,12 +164,12 @@ define commands to display help text
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
- use "hg -v help show_ambig_ru" to show more info
+ use "hg -v help show_ambig_ru" to show global options
(2-1-4) display Russian ambiguous-width characters in utf-8
$ COLUMNS=60 hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
- hg show_ambig_ru
+ hg show_ambig_ru
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
@@ -179,7 +179,7 @@ define commands to display help text
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
- use "hg -v help show_ambig_ru" to show more info
+ use "hg -v help show_ambig_ru" to show global options
(2-2) treat width of ambiguous characters as wide
@@ -187,7 +187,7 @@ define commands to display help text
(2-2-1) display Japanese ambiguous-width characters in cp932
$ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp932 --config extensions.show=./show.py help show_ambig_ja
- hg show_ambig_ja
+ hg show_ambig_ja
\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b \x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
@@ -200,12 +200,12 @@ define commands to display help text
\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
\x83\xbf\x83\xc0\x83\xc1\x83\xc2\x83\xd2\x83\xc4\x83\xc5\x83\xc6\x81\x9b (esc)
- use "hg -v help show_ambig_ja" to show more info
+ use "hg -v help show_ambig_ja" to show global options
(2-2-2) display Japanese ambiguous-width characters in utf-8
$ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ja
- hg show_ambig_ja
+ hg show_ambig_ja
\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b \xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
@@ -218,12 +218,12 @@ define commands to display help text
\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
\xce\xb1\xce\xb2\xce\xb3\xce\xb4\xcf\x85\xce\xb6\xce\xb7\xce\xb8\xe2\x97\x8b (esc)
- use "hg -v help show_ambig_ja" to show more info
+ use "hg -v help show_ambig_ja" to show global options
(2-2-3) display Russian ambiguous-width characters in cp1251
$ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding cp1251 --config extensions.show=./show.py help show_ambig_ru
- hg show_ambig_ru
+ hg show_ambig_ru
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 \xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
@@ -236,12 +236,12 @@ define commands to display help text
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
\xcd\xe0\xf1\xf2\xf0\xee\xe9\xea\xe8 (esc)
- use "hg -v help show_ambig_ru" to show more info
+ use "hg -v help show_ambig_ru" to show global options
(2-2-4) display Russian ambiguous-width charactes in utf-8
$ COLUMNS=60 HGENCODINGAMBIGUOUS=wide hg --encoding utf-8 --config extensions.show=./show.py help show_ambig_ru
- hg show_ambig_ru
+ hg show_ambig_ru
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 \xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
@@ -254,6 +254,4 @@ define commands to display help text
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
\xd0\x9d\xd0\xb0\xd1\x81\xd1\x82\xd1\x80\xd0\xbe\xd0\xb9\xd0\xba\xd0\xb8 (esc)
- use "hg -v help show_ambig_ru" to show more info
-
- $ cd ..
+ use "hg -v help show_ambig_ru" to show global options
diff --git a/tests/test-encoding.t b/tests/test-encoding.t
index ee884ba..e691a03 100644
--- a/tests/test-encoding.t
+++ b/tests/test-encoding.t
@@ -5,7 +5,7 @@ Test character encoding
we need a repo with some legacy latin-1 changesets
- $ hg unbundle "$TESTDIR/bundles/legacy-encoding.hg"
+ $ hg unbundle $TESTDIR/bundles/legacy-encoding.hg
adding changesets
adding manifests
adding file changes
@@ -42,7 +42,6 @@ these should work
$ HGENCODING=latin-1 hg tag `cat latin-1-tag`
$ HGENCODING=latin-1 hg branch `cat latin-1-tag`
marked working directory as branch \xe9 (esc)
- (branches are permanent and global, did you want a bookmark?)
$ HGENCODING=latin-1 hg ci -m 'latin1 branch'
$ rm .hg/branch
@@ -235,8 +234,7 @@ hg log (utf-8)
hg log (dolphin)
$ HGENCODING=dolphin hg log
- abort: unknown encoding: dolphin
- (please check your locale settings)
+ abort: unknown encoding: dolphin, please check your locale settings
[255]
$ HGENCODING=ascii hg branch `cat latin-1-tag`
abort: decoding near '\xe9': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! (esc)
@@ -249,4 +247,3 @@ Test roundtrip encoding of lookup tables when not using UTF-8 (issue2763)
$ HGENCODING=latin-1 hg up `cat latin-1-tag`
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ cd ..
diff --git a/tests/test-eol-clone.t b/tests/test-eol-clone.t
index b9b4358..60f03b7 100644
--- a/tests/test-eol-clone.t
+++ b/tests/test-eol-clone.t
@@ -72,5 +72,3 @@ Test clone of revision with .hgeol
first\r (esc)
second\r (esc)
third\r (esc)
-
- $ cd ..
diff --git a/tests/test-eol-hook.t b/tests/test-eol-hook.t
index 9fdfe5e..12716bc 100644
--- a/tests/test-eol-hook.t
+++ b/tests/test-eol-hook.t
@@ -161,6 +161,7 @@ We can fix the head and push again
added 3 changesets with 3 changes to 2 files (+1 heads)
$ hg -R ../main rollback
repository tip rolled back to revision 5 (undo push)
+ working directory now based on revision -1
Test it still fails with checkallhook
@@ -214,5 +215,3 @@ Test multiple files/revisions output
d.txt in a7040e68714f should not have CRLF line endings
b.txt in fbcf9b1025f5 should not have CRLF line endings
[255]
-
- $ cd ..
diff --git a/tests/test-eol-tag.t b/tests/test-eol-tag.t
index 56fad6b..29bc5a4 100644
--- a/tests/test-eol-tag.t
+++ b/tests/test-eol-tag.t
@@ -35,5 +35,3 @@ Rewrite .hgtags file as it would look on a new checkout:
Touch .hgtags file again:
$ hg tag 2.0
-
- $ cd ..
diff --git a/tests/test-eol.t b/tests/test-eol.t
index 2b8f585..b204759 100644
--- a/tests/test-eol.t
+++ b/tests/test-eol.t
@@ -384,13 +384,10 @@ Mixed tests
% hg status
$ rm -r mixed
- $ echo '[extensions]' >> $HGRCPATH
- $ echo 'eol =' >> $HGRCPATH
-
-#if unix-permissions
-
Test issue2569 -- eol extension takes write lock on reading:
+ $ echo '[extensions]' >> $HGRCPATH
+ $ echo 'eol =' >> $HGRCPATH
$ hg init repo
$ cd repo
$ touch .hgeol
@@ -404,8 +401,6 @@ Test issue2569 -- eol extension takes write lock on reading:
$ chmod -R u+w .hg
$ cd ..
-#endif
-
Test cleverencode: and cleverdecode: aliases for win32text extension
$ echo '[encode]' >> $HGRCPATH
@@ -446,83 +441,3 @@ Test handling of a broken .hgeol file:
warning: ignoring .hgeol file due to parse error at .hgeol:1: bad
$ hg status
? .hgeol.orig
-
-Test eol.only-consistent can be specified in .hgeol
-
- $ cd $TESTTMP
- $ hg init only-consistent
- $ cd only-consistent
- $ printf "first\nsecond\r\n" > a.txt
- $ hg add a.txt
- $ cat > .hgeol << EOF
- > [eol]
- > only-consistent = True
- > EOF
- $ hg commit -m 'inconsistent'
- abort: inconsistent newline style in a.txt
-
- [255]
- $ cat > .hgeol << EOF
- > [eol]
- > only-consistent = False
- > EOF
- $ hg commit -m 'consistent'
-
-
-Test trailing newline
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > eol=
- > EOF
-
-setup repository
-
- $ cd $TESTTMP
- $ hg init trailing
- $ cd trailing
- $ cat > .hgeol <<EOF
- > [patterns]
- > **.txt = native
- > [eol]
- > fix-trailing-newline = False
- > EOF
-
-add text without trailing newline
-
- $ printf "first\nsecond" > a.txt
- $ hg commit --addremove -m 'checking in'
- adding .hgeol
- adding a.txt
- $ rm a.txt
- $ hg update -C -q
- $ cat a.txt
- first
- second (no-eol)
-
- $ cat > .hgeol <<EOF
- > [patterns]
- > **.txt = native
- > [eol]
- > fix-trailing-newline = True
- > EOF
- $ printf "third\nfourth" > a.txt
- $ hg commit -m 'checking in with newline fix'
- $ rm a.txt
- $ hg update -C -q
- $ cat a.txt
- third
- fourth
-
-append a line without trailing newline
-
- $ printf "fifth" >> a.txt
- $ hg commit -m 'adding another line line'
- $ rm a.txt
- $ hg update -C -q
- $ cat a.txt
- third
- fourth
- fifth
-
- $ cd ..
diff --git a/tests/test-eolfilename.t b/tests/test-eolfilename.t
index 632d0c0..662fcd6 100644
--- a/tests/test-eolfilename.t
+++ b/tests/test-eolfilename.t
@@ -68,5 +68,3 @@ test issue2039
\x1b[0;35;1;4mbar\x1b[0m (esc)
\x1b[0;35;1;4m? foo\x1b[0m (esc)
\x1b[0;35;1;4mbar.baz\x1b[0m (esc)
-
- $ cd ..
diff --git a/tests/test-excessive-merge.t b/tests/test-excessive-merge.t
index 8d324b8..d85e8f6 100644
--- a/tests/test-excessive-merge.t
+++ b/tests/test-excessive-merge.t
@@ -64,12 +64,12 @@
summary: test
$ hg debugindex --changelog
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 60 ..... 0 5e0375449e74 000000000000 000000000000 (re)
- 1 60 62 ..... 1 96155394af80 5e0375449e74 000000000000 (re)
- 2 122 62 ..... 2 92cc4c306b19 5e0375449e74 000000000000 (re)
- 3 184 69 ..... 3 e16a66a37edd 92cc4c306b19 96155394af80 (re)
- 4 253 29 ..... 4 2ee31f665a86 96155394af80 92cc4c306b19 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 60 0 0 5e0375449e74 000000000000 000000000000
+ 1 60 62 1 1 96155394af80 5e0375449e74 000000000000
+ 2 122 62 2 2 92cc4c306b19 5e0375449e74 000000000000
+ 3 184 69 3 3 e16a66a37edd 92cc4c306b19 96155394af80
+ 4 253 29 3 4 2ee31f665a86 96155394af80 92cc4c306b19
revision 1
$ hg manifest --debug 1
@@ -89,9 +89,9 @@ revision 4
79d7492df40aa0fa093ec4209be78043c181f094 644 b
$ hg debugindex a
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re)
- 1 5 6 ..... 1 79d7492df40a 2ed2a3912a0b 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
+ 1 5 6 1 1 79d7492df40a 2ed2a3912a0b 000000000000
$ hg verify
checking changesets
diff --git a/tests/test-export.t b/tests/test-export.t
index a371f7b..fd039c0 100644
--- a/tests/test-export.t
+++ b/tests/test-export.t
@@ -7,7 +7,7 @@
> hg ci -m "foo-$i"
> done
- $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r" "%m"; do
+ $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
> echo
> echo "# foo-$out.patch"
> hg export -v -o "foo-$out.patch" 2:tip
@@ -77,19 +77,6 @@
foo-09.patch
foo-10.patch
foo-11.patch
-
- # foo-%m.patch
- exporting patches:
- foo-foo_2.patch
- foo-foo_3.patch
- foo-foo_4.patch
- foo-foo_5.patch
- foo-foo_6.patch
- foo-foo_7.patch
- foo-foo_8.patch
- foo-foo_9.patch
- foo-foo_10.patch
- foo-foo_11.patch
Exporting 4 changesets to a file:
@@ -121,27 +108,3 @@ Exporting revision -2 to a file:
foo-9
+foo-10
-Checking if only alphanumeric characters are used in the file name (%m option):
-
- $ echo "line" >> foo
- $ hg commit -m " !\"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~"
- $ hg export -v -o %m.patch tip
- exporting patch:
- ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch
-
-Catch exporting unknown revisions (especially empty revsets, see issue3353)
-
- $ hg export
- abort: export requires at least one changeset
- [255]
- $ hg export ""
- hg: parse error: empty query
- [255]
- $ hg export 999
- abort: unknown revision '999'!
- [255]
- $ hg export "not all()"
- abort: export requires at least one changeset
- [255]
-
- $ cd ..
diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t
index d4190c4..40aab85 100644
--- a/tests/test-extdiff.t
+++ b/tests/test-extdiff.t
@@ -39,15 +39,15 @@ Should diff cloned directories:
options:
- -o --option OPT [+] pass option to comparison program
- -r --rev REV [+] revision
- -c --change REV change made by revision
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
+ -o --option OPT [+] pass option to comparison program
+ -r --rev REV [+] revision
+ -c --change REV change made by revision
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
[+] marked option can be specified multiple times
- use "hg -v help falabala" to show more info
+ use "hg -v help falabala" to show global options
$ hg ci -d '0 0' -mtest1
@@ -92,8 +92,6 @@ Check diff are made from the first parent:
diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob)
diff-like tools yield a non-zero exit code
-#if execbit
-
Test extdiff of multiple files in tmp dir:
$ hg update -C 0 > /dev/null
@@ -182,10 +180,6 @@ Test with revsets:
$ cd ..
-#endif
-
-#if symlink
-
Test symlinks handling (issue1909)
$ hg init testsymlinks
@@ -200,5 +194,3 @@ Test symlinks handling (issue1909)
diffing testsymlinks.07f494440405 testsymlinks
[1]
$ cd ..
-
-#endif
diff --git a/tests/test-extension.t b/tests/test-extension.t
index 0f4be50..1d85b45 100644
--- a/tests/test-extension.t
+++ b/tests/test-extension.t
@@ -1,5 +1,7 @@
Test basic extension support
+ $ "$TESTDIR/hghave" no-outer-repo || exit 80
+
$ cat > foobar.py <<EOF
> import os
> from mercurial import commands
@@ -130,9 +132,6 @@ Check hgweb's load order:
$ cd ..
-hide outer repo
- $ hg init
-
$ cat > empty.py <<EOF
> '''empty cmdtable
> '''
@@ -179,27 +178,27 @@ hide outer repo
list of commands:
- foo yet another foo command
+ foo:
+ yet another foo command
global options:
-
- -R --repository REPO repository root directory or name of overlay bundle
- file
- --cwd DIR change working directory
- -y --noninteractive do not prompt, automatically pick the first choice for
- all prompts
- -q --quiet suppress output
- -v --verbose enable additional output
- --config CONFIG [+] set/override config option (use 'section.name=value')
- --debug enable debugging output
- --debugger start debugger
- --encoding ENCODE set the charset encoding (default: ascii)
- --encodingmode MODE set the charset encoding mode (default: strict)
- --traceback always print a traceback on exception
- --time time how long the command takes
- --profile print command execution profile
- --version output version information and exit
- -h --help display help and exit
+ -R --repository REPO repository root directory or name of overlay bundle
+ file
+ --cwd DIR change working directory
+ -y --noninteractive do not prompt, automatically pick the first choice
+ for all prompts
+ -q --quiet suppress output
+ -v --verbose enable additional output
+ --config CONFIG [+] set/override config option (use 'section.name=value')
+ --debug enable debugging output
+ --debugger start debugger
+ --encoding ENCODE set the charset encoding (default: ascii)
+ --encodingmode MODE set the charset encoding mode (default: strict)
+ --traceback always print a traceback on exception
+ --time time how long the command takes
+ --profile print command execution profile
+ --version output version information and exit
+ -h --help display help and exit
[+] marked option can be specified multiple times
@@ -208,28 +207,29 @@ hide outer repo
list of commands:
- debugfoobar yet another debug command
- foo yet another foo command
+ debugfoobar:
+ yet another debug command
+ foo:
+ yet another foo command
global options:
-
- -R --repository REPO repository root directory or name of overlay bundle
- file
- --cwd DIR change working directory
- -y --noninteractive do not prompt, automatically pick the first choice for
- all prompts
- -q --quiet suppress output
- -v --verbose enable additional output
- --config CONFIG [+] set/override config option (use 'section.name=value')
- --debug enable debugging output
- --debugger start debugger
- --encoding ENCODE set the charset encoding (default: ascii)
- --encodingmode MODE set the charset encoding mode (default: strict)
- --traceback always print a traceback on exception
- --time time how long the command takes
- --profile print command execution profile
- --version output version information and exit
- -h --help display help and exit
+ -R --repository REPO repository root directory or name of overlay bundle
+ file
+ --cwd DIR change working directory
+ -y --noninteractive do not prompt, automatically pick the first choice
+ for all prompts
+ -q --quiet suppress output
+ -v --verbose enable additional output
+ --config CONFIG [+] set/override config option (use 'section.name=value')
+ --debug enable debugging output
+ --debugger start debugger
+ --encoding ENCODE set the charset encoding (default: ascii)
+ --encodingmode MODE set the charset encoding mode (default: strict)
+ --traceback always print a traceback on exception
+ --time time how long the command takes
+ --profile print command execution profile
+ --version output version information and exit
+ -h --help display help and exit
[+] marked option can be specified multiple times
$ echo 'debugextension = !' >> $HGRCPATH
@@ -260,16 +260,16 @@ Extension module help vs command help:
options:
- -p --program CMD comparison program to run
- -o --option OPT [+] pass option to comparison program
- -r --rev REV [+] revision
- -c --change REV change made by revision
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
+ -p --program CMD comparison program to run
+ -o --option OPT [+] pass option to comparison program
+ -r --rev REV [+] revision
+ -c --change REV change made by revision
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
[+] marked option can be specified multiple times
- use "hg -v help extdiff" to show more info
+ use "hg -v help extdiff" to show global options
$ hg help --extension extdiff
extdiff extension - command to allow external programs to compare revisions
@@ -299,8 +299,7 @@ Extension module help vs command help:
# (see http://www.vim.org/scripts/script.php?script_id=102) Non
# English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
# your .vimrc
- vimdiff = gvim -f "+next" \
- "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"
+ vimdiff = gvim -f '+next' '+execute "DirDiff" argv(0) argv(1)'
Tool arguments can include variables that are expanded at runtime:
@@ -326,7 +325,7 @@ Extension module help vs command help:
list of commands:
- extdiff use external program to diff repository (or selected files)
+ extdiff use external program to diff repository (or selected files)
use "hg -v help extdiff" to show builtin aliases and global options
@@ -372,7 +371,7 @@ Test help topic with same name as extension
multirevs command
- use "hg -v help multirevs" to show more info
+ use "hg -v help multirevs" to show global options
$ hg multirevs
hg multirevs: invalid arguments
@@ -418,14 +417,14 @@ Disabled extension commands:
$ hg help email
'email' is provided by the following extension:
- patchbomb command to send changesets as (a series of) patch emails
+ patchbomb command to send changesets as (a series of) patch emails
use "hg help extensions" for information on enabling extensions
$ hg qdel
hg: unknown command 'qdel'
'qdelete' is provided by the following extension:
- mq manage a stack of patches
+ mq manage a stack of patches
use "hg help extensions" for information on enabling extensions
[255]
@@ -433,7 +432,7 @@ Disabled extension commands:
hg: unknown command 'churn'
'churn' is provided by the following extension:
- churn command to display statistics about repository history
+ churn command to display statistics about repository history
use "hg help extensions" for information on enabling extensions
[255]
@@ -472,90 +471,7 @@ Broken disabled extension and command:
> cmdtable = None
> EOF
$ hg --config extensions.path=./path.py help foo > /dev/null
- warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
+ warning: error finding commands in $TESTTMP/hgext/forest.py
hg: unknown command 'foo'
- warning: error finding commands in $TESTTMP/hgext/forest.py (glob)
+ warning: error finding commands in $TESTTMP/hgext/forest.py
[255]
-
- $ cat > throw.py <<EOF
- > from mercurial import cmdutil, commands
- > cmdtable = {}
- > command = cmdutil.command(cmdtable)
- > class Bogon(Exception): pass
- >
- > @command('throw', [], 'hg throw')
- > def throw(ui, **opts):
- > """throws an exception"""
- > raise Bogon()
- > commands.norepo += " throw"
- > EOF
-No declared supported version, extension complains:
- $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
- ** Unknown exception encountered with possibly-broken third-party extension throw
- ** which supports versions unknown of Mercurial.
- ** Please disable throw and try your action again.
- ** If that fixes the bug please report it to the extension author.
- ** Python * (glob)
- ** Mercurial Distributed SCM * (glob)
- ** Extensions loaded: throw
-If the extension specifies a buglink, show that:
- $ echo 'buglink = "http://example.com/bts"' >> throw.py
- $ rm -f throw.pyc throw.pyo
- $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
- ** Unknown exception encountered with possibly-broken third-party extension throw
- ** which supports versions unknown of Mercurial.
- ** Please disable throw and try your action again.
- ** If that fixes the bug please report it to http://example.com/bts
- ** Python * (glob)
- ** Mercurial Distributed SCM (*) (glob)
- ** Extensions loaded: throw
-If the extensions declare outdated versions, accuse the older extension first:
- $ echo "from mercurial import util" >> older.py
- $ echo "util.version = lambda:'2.2'" >> older.py
- $ echo "testedwith = '1.9.3'" >> older.py
- $ echo "testedwith = '2.1.1'" >> throw.py
- $ rm -f throw.pyc throw.pyo
- $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
- > throw 2>&1 | egrep '^\*\*'
- ** Unknown exception encountered with possibly-broken third-party extension older
- ** which supports versions 1.9.3 of Mercurial.
- ** Please disable older and try your action again.
- ** If that fixes the bug please report it to the extension author.
- ** Python * (glob)
- ** Mercurial Distributed SCM (version 2.2)
- ** Extensions loaded: throw, older
-One extension only tested with older, one only with newer versions:
- $ echo "util.version = lambda:'2.1.0'" >> older.py
- $ rm -f older.pyc older.pyo
- $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
- > throw 2>&1 | egrep '^\*\*'
- ** Unknown exception encountered with possibly-broken third-party extension older
- ** which supports versions 1.9.3 of Mercurial.
- ** Please disable older and try your action again.
- ** If that fixes the bug please report it to the extension author.
- ** Python * (glob)
- ** Mercurial Distributed SCM (version 2.1.0)
- ** Extensions loaded: throw, older
-Older extension is tested with current version, the other only with newer:
- $ echo "util.version = lambda:'1.9.3'" >> older.py
- $ rm -f older.pyc older.pyo
- $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
- > throw 2>&1 | egrep '^\*\*'
- ** Unknown exception encountered with possibly-broken third-party extension throw
- ** which supports versions 2.1.1 of Mercurial.
- ** Please disable throw and try your action again.
- ** If that fixes the bug please report it to http://example.com/bts
- ** Python * (glob)
- ** Mercurial Distributed SCM (version 1.9.3)
- ** Extensions loaded: throw, older
-
-Declare the version as supporting this hg version, show regular bts link:
- $ hgver=`python -c 'from mercurial import util; print util.version().split("+")[0]'`
- $ echo 'testedwith = """'"$hgver"'"""' >> throw.py
- $ rm -f throw.pyc throw.pyo
- $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
- ** unknown exception encountered, please report by visiting
- ** http://mercurial.selenic.com/wiki/BugTracker
- ** Python * (glob)
- ** Mercurial Distributed SCM (*) (glob)
- ** Extensions loaded: throw
diff --git a/tests/test-extra-filelog-entry.t b/tests/test-extra-filelog-entry.t
index 701e23b..c6c5a21 100644
--- a/tests/test-extra-filelog-entry.t
+++ b/tests/test-extra-filelog-entry.t
@@ -16,6 +16,6 @@ Issue351: mq: qrefresh can create extra revlog entry
$ hg qrefresh
$ hg debugindex b
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 1e88685f5dde 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 1e88685f5dde 000000000000 000000000000
diff --git a/tests/test-fetch.t b/tests/test-fetch.t
index d52742f..afabef9 100644
--- a/tests/test-fetch.t
+++ b/tests/test-fetch.t
@@ -1,4 +1,4 @@
- $ "$TESTDIR/hghave" serve || exit 80
+adjust to non-default HGPORT, e.g. with run-tests.py -j
$ echo "[extensions]" >> $HGRCPATH
$ echo "fetch=" >> $HGRCPATH
@@ -7,7 +7,7 @@ test fetch with default branches only
$ hg init a
$ echo a > a/a
- $ hg --cwd a commit -Ama
+ $ hg --cwd a commit -d '1 0' -Ama
adding a
$ hg clone a b
updating to branch default
@@ -16,10 +16,10 @@ test fetch with default branches only
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b > a/b
- $ hg --cwd a commit -Amb
+ $ hg --cwd a commit -d '2 0' -Amb
adding b
$ hg --cwd a parents -q
- 1:d2ae7f538514
+ 1:97d72e5f12c7
should pull one change
@@ -32,9 +32,9 @@ should pull one change
added 1 changesets with 1 changes to 1 files
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg --cwd b parents -q
- 1:d2ae7f538514
+ 1:97d72e5f12c7
$ echo c > c/c
- $ hg --cwd c commit -Amc
+ $ hg --cwd c commit -d '3 0' -Amc
adding c
$ hg clone c d
updating to branch default
@@ -48,37 +48,39 @@ repo, because the path of the repo will be included in the commit
message, making every commit appear different.
should merge c into a
- $ hg --cwd c fetch -d '0 0' -m 'automated merge' ../a
+ $ hg --cwd c fetch -d '4 0' -m 'automated merge' ../a
pulling from ../a
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
- updating to 2:d2ae7f538514
+ updating to 2:97d72e5f12c7
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- merging with 1:d36c0562f908
+ merging with 1:5e056962225c
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- new changeset 3:a323a0c43ec4 merges remote changes with local
+ new changeset 3:cd3a41621cf0 merges remote changes with local
$ ls c
a
b
c
+ $ netstat -tnap 2>/dev/null | grep $HGPORT | grep LISTEN
+ [1]
$ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid
$ cat a/hg.pid >> "$DAEMON_PIDS"
fetch over http, no auth
- $ hg --cwd d fetch http://localhost:$HGPORT/
+ $ hg --cwd d fetch -d '5 0' http://localhost:$HGPORT/
pulling from http://localhost:$HGPORT/
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
- updating to 2:d2ae7f538514
+ updating to 2:97d72e5f12c7
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- merging with 1:d36c0562f908
+ merging with 1:5e056962225c
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
new changeset 3:* merges remote changes with local (glob)
$ hg --cwd d tip --template '{desc}\n'
@@ -86,16 +88,16 @@ fetch over http, no auth
fetch over http with auth (should be hidden in desc)
- $ hg --cwd e fetch http://user:password@localhost:$HGPORT/
+ $ hg --cwd e fetch -d '5 0' http://user:password@localhost:$HGPORT/
pulling from http://user:***@localhost:$HGPORT/
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
- updating to 2:d2ae7f538514
+ updating to 2:97d72e5f12c7
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- merging with 1:d36c0562f908
+ merging with 1:5e056962225c
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
new changeset 3:* merges remote changes with local (glob)
$ hg --cwd e tip --template '{desc}\n'
@@ -107,17 +109,17 @@ fetch over http with auth (should be hidden in desc)
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo f > f/f
- $ hg --cwd f ci -Amf
+ $ hg --cwd f ci -d '6 0' -Amf
adding f
$ echo g > g/g
- $ hg --cwd g ci -Amg
+ $ hg --cwd g ci -d '6 0' -Amg
adding g
$ hg clone -q f h
$ hg clone -q g i
should merge f into g
- $ hg --cwd g fetch -d '0 0' --switch -m 'automated merge' ../f
+ $ hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f
pulling from ../f
searching for changes
adding changesets
@@ -125,9 +127,9 @@ should merge f into g
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- merging with 3:6343ca3eff20
+ merging with 3:cc6a3744834d
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- new changeset 4:f7faa0b7d3c6 merges remote changes with local
+ new changeset 4:55aa4f32ec59 merges remote changes with local
$ rm i/g
should abort, because i is modified
@@ -140,21 +142,21 @@ test fetch with named branches
$ hg init nbase
$ echo base > nbase/a
- $ hg -R nbase ci -Am base
+ $ hg -R nbase ci -d '1 0' -Am base
adding a
$ hg -R nbase branch a
marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
$ echo a > nbase/a
- $ hg -R nbase ci -m a
+ $ hg -R nbase ci -d '2 0' -m a
$ hg -R nbase up -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R nbase branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo b > nbase/b
- $ hg -R nbase ci -Am b
+ $ hg -R nbase ci -Ad '3 0' -m b
adding b
+ $ echo
+
pull in change on foreign branch
@@ -167,10 +169,10 @@ pull in change on foreign branch
$ hg -R n1 up -C a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo aa > n1/a
- $ hg -R n1 ci -m a1
+ $ hg -R n1 ci -d '4 0' -m a1
$ hg -R n2 up -C b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg -R n2 fetch -m 'merge' n1
+ $ hg -R n2 fetch -d '9 0' -m 'merge' n1
pulling from n1
searching for changes
adding changesets
@@ -183,6 +185,8 @@ parent should be 2 (no automatic update)
$ hg -R n2 parents --template '{rev}\n'
2
$ rm -fr n1 n2
+ $ echo
+
pull in changes on both foreign and local branches
@@ -195,14 +199,14 @@ pull in changes on both foreign and local branches
$ hg -R n1 up -C a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo aa > n1/a
- $ hg -R n1 ci -m a1
+ $ hg -R n1 ci -d '4 0' -m a1
$ hg -R n1 up -C b
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo bb > n1/b
- $ hg -R n1 ci -m b1
+ $ hg -R n1 ci -d '5 0' -m b1
$ hg -R n2 up -C b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg -R n2 fetch -m 'merge' n1
+ $ hg -R n2 fetch -d '9 0' -m 'merge' n1
pulling from n1
searching for changes
adding changesets
@@ -216,6 +220,8 @@ parent should be 4 (fast forward)
$ hg -R n2 parents --template '{rev}\n'
4
$ rm -fr n1 n2
+ $ echo
+
pull changes on foreign (2 new heads) and local (1 new head) branches
with a local change
@@ -229,33 +235,33 @@ with a local change
$ hg -R n1 up -C a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo a1 > n1/a
- $ hg -R n1 ci -m a1
+ $ hg -R n1 ci -d '4 0' -m a1
$ hg -R n1 up -C b
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo bb > n1/b
- $ hg -R n1 ci -m b1
+ $ hg -R n1 ci -d '5 0' -m b1
$ hg -R n1 up -C 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo a2 > n1/a
- $ hg -R n1 ci -m a2
+ $ hg -R n1 ci -d '6 0' -m a2
created new head
$ hg -R n2 up -C b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo change >> n2/c
- $ hg -R n2 ci -A -m local
+ $ hg -R n2 ci -Ad '7 0' -m local
adding c
- $ hg -R n2 fetch -d '0 0' -m 'merge' n1
+ $ hg -R n2 fetch -d '9 0' -m 'merge' n1
pulling from n1
searching for changes
adding changesets
adding manifests
adding file changes
added 3 changesets with 3 changes to 2 files (+2 heads)
- updating to 5:3c4a837a864f
+ updating to 5:708c6cce3d26
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- merging with 3:1267f84a9ea5
+ merging with 3:d83427717b1f
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- new changeset 7:2cf2a1261f21 merges remote changes with local
+ new changeset 7:48f1a33f52af merges remote changes with local
parent should be 7 (new merge changeset)
@@ -277,21 +283,21 @@ heads) with a local change
$ hg -R n1 merge b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ hg -R n1 ci -m merge
+ $ hg -R n1 ci -d '4 0' -m merge
$ hg -R n1 up -C 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo c > n1/a
- $ hg -R n1 ci -m c
+ $ hg -R n1 ci -d '5 0' -m c
$ hg -R n1 up -C 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo cc > n1/a
- $ hg -R n1 ci -m cc
+ $ hg -R n1 ci -d '6 0' -m cc
created new head
$ hg -R n2 up -C b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo change >> n2/b
- $ hg -R n2 ci -A -m local
- $ hg -R n2 fetch -m 'merge' n1
+ $ hg -R n2 ci -Ad '7 0' -m local
+ $ hg -R n2 fetch -d '9 0' -m 'merge' n1
pulling from n1
searching for changes
adding changesets
@@ -320,8 +326,7 @@ pull in change on different branch than dirstate
$ hg -R n1 ci -m next
$ hg -R n2 branch topic
marked working directory as branch topic
- (branches are permanent and global, did you want a bookmark?)
- $ hg -R n2 fetch -m merge n1
+ $ hg -R n2 fetch -d '0 0' -m merge n1
abort: working dir not at branch tip (use "hg update" to check out branch tip)
[255]
@@ -339,13 +344,11 @@ test fetch with inactive branches
adding a
$ hg --cwd ib1 branch second
marked working directory as branch second
- (branches are permanent and global, did you want a bookmark?)
$ echo b > ib1/b
$ hg --cwd ib1 ci -Am onsecond
adding b
$ hg --cwd ib1 branch -f default
marked working directory as branch default
- (branches are permanent and global, did you want a bookmark?)
$ echo c > ib1/c
$ hg --cwd ib1 ci -Am newdefault
adding c
@@ -390,6 +393,8 @@ test issue1726
new changeset 3:* merges remote changes with local (glob)
$ hg --cwd i1726r2 heads default --template '{rev}\n'
3
+ $ echo
+
test issue2047
@@ -410,5 +415,4 @@ test issue2047
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
-
- $ cd ..
+ $ "$TESTDIR/killdaemons.py"
diff --git a/tests/test-filebranch.t b/tests/test-filebranch.t
index 5558fb0..2c4057a 100644
--- a/tests/test-filebranch.t
+++ b/tests/test-filebranch.t
@@ -76,11 +76,11 @@ We shouldn't have anything but foo in merge state here:
main: we should have a merge here:
$ hg debugindex --changelog
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 73 ..... 0 cdca01651b96 000000000000 000000000000 (re)
- 1 73 68 ..... 1 f6718a9cb7f3 cdca01651b96 000000000000 (re)
- 2 141 68 ..... 2 bdd988058d16 cdca01651b96 000000000000 (re)
- 3 209 66 ..... 3 d8a521142a3c f6718a9cb7f3 bdd988058d16 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 73 0 0 cdca01651b96 000000000000 000000000000
+ 1 73 68 1 1 f6718a9cb7f3 cdca01651b96 000000000000
+ 2 141 68 2 2 bdd988058d16 cdca01651b96 000000000000
+ 3 209 66 3 3 d8a521142a3c f6718a9cb7f3 bdd988058d16
log should show foo and quux changed:
@@ -100,32 +100,32 @@ log should show foo and quux changed:
foo: we should have a merge here:
$ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
- 1 3 4 ..... 1 2ffeddde1b65 b8e02f643373 000000000000 (re)
- 2 7 4 ..... 2 33d1fb69067a b8e02f643373 000000000000 (re)
- 3 11 4 ..... 3 aa27919ee430 2ffeddde1b65 33d1fb69067a (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b8e02f643373 000000000000 000000000000
+ 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
+ 2 7 4 2 2 33d1fb69067a b8e02f643373 000000000000
+ 3 11 4 3 3 aa27919ee430 2ffeddde1b65 33d1fb69067a
bar: we should not have a merge here:
$ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
- 1 3 4 ..... 2 33d1fb69067a b8e02f643373 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b8e02f643373 000000000000 000000000000
+ 1 3 4 1 2 33d1fb69067a b8e02f643373 000000000000
baz: we should not have a merge here:
$ hg debugindex baz
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
- 1 3 4 ..... 1 2ffeddde1b65 b8e02f643373 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b8e02f643373 000000000000 000000000000
+ 1 3 4 1 1 2ffeddde1b65 b8e02f643373 000000000000
quux: we should not have a merge here:
$ hg debugindex quux
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
- 1 3 5 ..... 3 6128c0f33108 b8e02f643373 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b8e02f643373 000000000000 000000000000
+ 1 3 5 1 3 6128c0f33108 b8e02f643373 000000000000
Manifest entries should match tips of all files:
@@ -146,4 +146,3 @@ Everything should be clean now:
checking files
4 files, 4 changesets, 10 total revisions
- $ cd ..
diff --git a/tests/test-filecache.py b/tests/test-filecache.py
deleted file mode 100644
index 552a62a..0000000
--- a/tests/test-filecache.py
+++ /dev/null
@@ -1,95 +0,0 @@
-import sys, os, subprocess
-
-if subprocess.call(['python', '%s/hghave' % os.environ['TESTDIR'],
- 'cacheable']):
- sys.exit(80)
-
-from mercurial import util, scmutil, extensions
-
-filecache = scmutil.filecache
-
-class fakerepo(object):
- def __init__(self):
- self._filecache = {}
-
- def join(self, p):
- return p
-
- def sjoin(self, p):
- return p
-
- @filecache('x')
- def cached(self):
- print 'creating'
-
- def invalidate(self):
- for k in self._filecache:
- try:
- delattr(self, k)
- except AttributeError:
- pass
-
-def basic(repo):
- # file doesn't exist, calls function
- repo.cached
-
- repo.invalidate()
- # file still doesn't exist, uses cache
- repo.cached
-
- # create empty file
- f = open('x', 'w')
- f.close()
- repo.invalidate()
- # should recreate the object
- repo.cached
-
- f = open('x', 'w')
- f.write('a')
- f.close()
- repo.invalidate()
- # should recreate the object
- repo.cached
-
- repo.invalidate()
- # stats file again, nothing changed, reuses object
- repo.cached
-
- # atomic replace file, size doesn't change
- # hopefully st_mtime doesn't change as well so this doesn't use the cache
- # because of inode change
- f = scmutil.opener('.')('x', 'w', atomictemp=True)
- f.write('b')
- f.close()
-
- repo.invalidate()
- repo.cached
-
-def fakeuncacheable():
- def wrapcacheable(orig, *args, **kwargs):
- return False
-
- def wrapinit(orig, *args, **kwargs):
- pass
-
- originit = extensions.wrapfunction(util.cachestat, '__init__', wrapinit)
- origcacheable = extensions.wrapfunction(util.cachestat, 'cacheable',
- wrapcacheable)
-
- try:
- os.remove('x')
- except OSError:
- pass
-
- basic(fakerepo())
-
- util.cachestat.cacheable = origcacheable
- util.cachestat.__init__ = originit
-
-print 'basic:'
-print
-basic(fakerepo())
-print
-print 'fakeuncacheable:'
-print
-fakeuncacheable()
diff --git a/tests/test-filecache.py.out b/tests/test-filecache.py.out
deleted file mode 100644
index dc386fe..0000000
--- a/tests/test-filecache.py.out
+++ /dev/null
@@ -1,15 +0,0 @@
-basic:
-
-creating
-creating
-creating
-creating
-
-fakeuncacheable:
-
-creating
-creating
-creating
-creating
-creating
-creating
diff --git a/tests/test-filelog.py b/tests/test-filelog
index bf9f437..923fe29 100755
--- a/tests/test-filelog.py
+++ b/tests/test-filelog
@@ -17,17 +17,12 @@ def addrev(text, renamed=False):
else:
meta = {}
- lock = t = None
+ t = repo.transaction('commit')
try:
- lock = repo.lock()
- t = repo.transaction('commit')
node = fl.add(text, meta, t, 0, nullid, nullid)
return node
finally:
- if t:
- t.close()
- if lock:
- lock.release()
+ t.close()
def error(text):
print 'ERROR: ' + text
diff --git a/tests/test-filelog.py.out b/tests/test-filelog.out
index d9ecd51..d9ecd51 100644
--- a/tests/test-filelog.py.out
+++ b/tests/test-filelog.out
diff --git a/tests/test-flags.t b/tests/test-flags.t
index 0c4d11f..ad6581c 100644
--- a/tests/test-flags.t
+++ b/tests/test-flags.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" execbit || exit 80
-
$ umask 027
$ hg init test1
@@ -138,14 +136,12 @@ the changelog should mention file a:
-rwxr-x---
$ hg debugindex a
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 0 ..... 0 b80de5d13875 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 0 0 0 b80de5d13875 000000000000 000000000000
$ hg debugindex -R ../test2 a
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 0 ..... 0 b80de5d13875 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 0 0 0 b80de5d13875 000000000000 000000000000
$ hg debugindex -R ../test1 a
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 0 ..... 0 b80de5d13875 000000000000 000000000000 (re)
- 1 0 5 ..... 1 7fe919cc0336 b80de5d13875 000000000000 (re)
-
- $ cd ..
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 0 0 0 b80de5d13875 000000000000 000000000000
+ 1 0 5 1 1 7fe919cc0336 b80de5d13875 000000000000
diff --git a/tests/test-fncache.t b/tests/test-fncache.t
index 643088c..f8c476a 100644
--- a/tests/test-fncache.t
+++ b/tests/test-fncache.t
@@ -14,7 +14,7 @@ Testing a.i/b:
$ mkdir a.i
$ echo "some other text" > a.i/b
$ hg add
- adding a.i/b (glob)
+ adding a.i/b
$ hg ci -m second
$ cat .hg/store/fncache | sort
data/a.i
@@ -25,7 +25,7 @@ Testing a.i.hg/c:
$ mkdir a.i.hg
$ echo "yet another text" > a.i.hg/c
$ hg add
- adding a.i.hg/c (glob)
+ adding a.i.hg/c
$ hg ci -m third
$ cat .hg/store/fncache | sort
data/a.i
@@ -69,21 +69,17 @@ Non store repo:
.hg
.hg/00changelog.i
.hg/00manifest.i
- .hg/cache
- .hg/cache/branchheads
.hg/data
.hg/data/tst.d.hg
.hg/data/tst.d.hg/foo.i
.hg/dirstate
.hg/last-message.txt
- .hg/phaseroots
.hg/requires
.hg/undo
.hg/undo.bookmarks
.hg/undo.branch
.hg/undo.desc
.hg/undo.dirstate
- .hg/undo.phaseroots
$ cd ..
Non fncache repo:
@@ -97,8 +93,6 @@ Non fncache repo:
$ find .hg | sort
.hg
.hg/00changelog.i
- .hg/cache
- .hg/cache/branchheads
.hg/dirstate
.hg/last-message.txt
.hg/requires
@@ -108,9 +102,7 @@ Non fncache repo:
.hg/store/data
.hg/store/data/tst.d.hg
.hg/store/data/tst.d.hg/_foo.i
- .hg/store/phaseroots
.hg/store/undo
- .hg/store/undo.phaseroots
.hg/undo.bookmarks
.hg/undo.branch
.hg/undo.desc
diff --git a/tests/test-gendoc.t b/tests/test-gendoc.t
index 63a67d7..33259f1 100644
--- a/tests/test-gendoc.t
+++ b/tests/test-gendoc.t
@@ -3,18 +3,18 @@ Test document extraction
$ "$TESTDIR/hghave" docutils || exit 80
$ HGENCODING=UTF-8
$ export HGENCODING
- $ { echo C; find "$TESTDIR/../i18n" -name "*.po" | sort; } | while read PO; do
- > LOCALE=`basename "$PO" .po`
+ $ for PO in C $TESTDIR/../i18n/*.po; do
+ > LOCALE=`basename $PO .po`
> echo
> echo "% extracting documentation from $LOCALE"
> echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
> echo "" >> gendoc-$LOCALE.txt
- > LC_ALL=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+ > LC_ALL=$LOCALE python $TESTDIR/../doc/gendoc.py >> gendoc-$LOCALE.txt 2> /dev/null || exit
>
> # We call runrst without adding "--halt warning" to make it report
> # all errors instead of stopping on the first one.
> echo "checking for parse errors"
- > python "$TESTDIR/../doc/runrst" html gendoc-$LOCALE.txt /dev/null
+ > python $TESTDIR/../doc/runrst html gendoc-$LOCALE.txt /dev/null
> done
% extracting documentation from C
diff --git a/tests/test-getbundle.t b/tests/test-getbundle.t
index 83feda6..049b45c 100644
--- a/tests/test-getbundle.t
+++ b/tests/test-getbundle.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
= Test the getbundle() protocol function =
diff --git a/tests/test-git-export.t b/tests/test-git-export.t
index 3efdc16..b4b6592 100644
--- a/tests/test-git-export.t
+++ b/tests/test-git-export.t
@@ -56,8 +56,6 @@ Delete:
$ hg ci -Amsrc
adding src
-#if execbit
-
chmod 644:
$ chmod +x src
@@ -94,20 +92,9 @@ Nonexistent in tip+chmod:
old mode 100644
new mode 100755
-#else
-
-Dummy changes when no exec bit, mocking the execbit commit structure
-
- $ echo change >> src
- $ hg ci -munexec
- $ hg mv src dst
- $ hg ci -mrenamemod
-
-#endif
-
Binary diff:
- $ cp "$TESTDIR/binfile.bin" .
+ $ cp $TESTDIR/binfile.bin .
$ hg add binfile.bin
$ hg diff --git > b.diff
$ cat b.diff
@@ -136,7 +123,7 @@ Import binary diff:
$ rm binfile.bin
$ hg import -mfoo b.diff
applying b.diff
- $ cmp binfile.bin "$TESTDIR/binfile.bin"
+ $ cmp binfile.bin $TESTDIR/binfile.bin
Rename binary file:
diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
index 53716cd..67e0130 100644
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -1,3 +1,5 @@
+ $ "$TESTDIR/hghave" no-outer-repo || exit 80
+
$ hg init a
$ cd a
$ echo a > a
@@ -75,8 +77,6 @@ Testing -R/--repository:
8580ff50825a tip
$ cd ..
-#if no-outer-repo
-
Implicit -R:
$ hg ann a/a
@@ -93,8 +93,6 @@ Implicit -R:
abort: no repository found in '$TESTTMP' (.hg not found)!
[255]
-#endif
-
Abbreviation of long option:
$ hg --repo c tip
@@ -138,16 +136,16 @@ earlygetopt with illegal abbreviations:
abort: option --cwd may not be abbreviated!
[255]
$ hg --rep a tip
- abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
+ abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
[255]
$ hg --repositor a tip
- abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
+ abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
[255]
$ hg -qR a tip
- abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
+ abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
[255]
$ hg -qRa tip
- abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
+ abort: Option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo!
[255]
Testing --cwd:
@@ -267,16 +265,13 @@ Testing --time:
$ hg --cwd a --time id
8580ff50825a tip
- time: real * (glob)
+ Time: real * (glob)
Testing --version:
$ hg --version -q
Mercurial Distributed SCM * (glob)
-hide outer repo
- $ hg init
-
Testing -h/--help:
$ hg -h
@@ -284,80 +279,77 @@ Testing -h/--help:
list of commands:
- add add the specified files on the next commit
- addremove add all new files, delete all missing files
- annotate show changeset information by line for each file
- archive create an unversioned archive of a repository revision
- backout reverse effect of earlier changeset
- bisect subdivision search of changesets
- bookmarks track a line of development with movable markers
- branch set or show the current branch name
- branches list repository named branches
- bundle create a changegroup file
- cat output the current or given revision of files
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- copy mark files as copied for the next commit
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- graft copy changes from other branches onto the current branch
- grep search for a pattern in specified files and revisions
- heads show current repository heads or show branch heads
- help show help for a given topic or a help overview
- identify identify the working copy or specified revision
- import import an ordered set of patches
- incoming show new changesets found in source
- init create a new repository in the given directory
- locate locate files matching specific patterns
- log show revision history of entire repository or files
- manifest output the current or given revision of the project manifest
- merge merge working directory with another revision
- outgoing show changesets not found in the destination
- parents show the parents of the working directory or revision
- paths show aliases for remote repositories
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- recover roll back an interrupted transaction
- remove remove the specified files on the next commit
- rename rename files; equivalent of copy + remove
- resolve redo merges or set/view the merge status of files
- revert restore files to their checkout state
- rollback roll back the last transaction (dangerous)
- root print the root (top) of the current working directory
- serve start stand-alone webserver
- showconfig show combined config settings from all hgrc files
- status show changed files in the working directory
- summary summarize working directory state
- tag add one or more tags for the current or given revision
- tags list repository tags
- tip show the tip revision
- unbundle apply one or more changegroup files
- update update working directory (or switch revisions)
- verify verify the integrity of the repository
- version output version and copyright information
+ add add the specified files on the next commit
+ addremove add all new files, delete all missing files
+ annotate show changeset information by line for each file
+ archive create an unversioned archive of a repository revision
+ backout reverse effect of earlier changeset
+ bisect subdivision search of changesets
+ bookmarks track a line of development with movable markers
+ branch set or show the current branch name
+ branches list repository named branches
+ bundle create a changegroup file
+ cat output the current or given revision of files
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ copy mark files as copied for the next commit
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ grep search for a pattern in specified files and revisions
+ heads show current repository heads or show branch heads
+ help show help for a given topic or a help overview
+ identify identify the working copy or specified revision
+ import import an ordered set of patches
+ incoming show new changesets found in source
+ init create a new repository in the given directory
+ locate locate files matching specific patterns
+ log show revision history of entire repository or files
+ manifest output the current or given revision of the project manifest
+ merge merge working directory with another revision
+ outgoing show changesets not found in the destination
+ parents show the parents of the working directory or revision
+ paths show aliases for remote repositories
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ recover roll back an interrupted transaction
+ remove remove the specified files on the next commit
+ rename rename files; equivalent of copy + remove
+ resolve redo merges or set/view the merge status of files
+ revert restore files to their checkout state
+ rollback roll back the last transaction (dangerous)
+ root print the root (top) of the current working directory
+ serve start stand-alone webserver
+ showconfig show combined config settings from all hgrc files
+ status show changed files in the working directory
+ summary summarize working directory state
+ tag add one or more tags for the current or given revision
+ tags list repository tags
+ tip show the tip revision
+ unbundle apply one or more changegroup files
+ update update working directory (or switch revisions)
+ verify verify the integrity of the repository
+ version output version and copyright information
additional help topics:
- config Configuration Files
- dates Date Formats
- diffs Diff Formats
- environment Environment Variables
- extensions Using Additional Features
- filesets Specifying File Sets
- glossary Glossary
- hgignore Syntax for Mercurial Ignore Files
- hgweb Configuring hgweb
- merge-tools Merge Tools
- multirevs Specifying Multiple Revisions
- patterns File Name Patterns
- phases Working with Phases
- revisions Specifying Single Revisions
- revsets Specifying Revision Sets
- subrepos Subrepositories
- templating Template Usage
- urls URL Paths
+ config Configuration Files
+ dates Date Formats
+ diffs Diff Formats
+ environment Environment Variables
+ extensions Using additional features
+ filesets Specifying File Sets
+ glossary Glossary
+ hgignore syntax for Mercurial ignore files
+ hgweb Configuring hgweb
+ merge-tools Merge Tools
+ multirevs Specifying Multiple Revisions
+ patterns File Name Patterns
+ revisions Specifying Single Revisions
+ revsets Specifying Revision Sets
+ subrepos Subrepositories
+ templating Template Usage
+ urls URL Paths
use "hg -v help" to show builtin aliases and global options
@@ -368,80 +360,77 @@ Testing -h/--help:
list of commands:
- add add the specified files on the next commit
- addremove add all new files, delete all missing files
- annotate show changeset information by line for each file
- archive create an unversioned archive of a repository revision
- backout reverse effect of earlier changeset
- bisect subdivision search of changesets
- bookmarks track a line of development with movable markers
- branch set or show the current branch name
- branches list repository named branches
- bundle create a changegroup file
- cat output the current or given revision of files
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- copy mark files as copied for the next commit
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- graft copy changes from other branches onto the current branch
- grep search for a pattern in specified files and revisions
- heads show current repository heads or show branch heads
- help show help for a given topic or a help overview
- identify identify the working copy or specified revision
- import import an ordered set of patches
- incoming show new changesets found in source
- init create a new repository in the given directory
- locate locate files matching specific patterns
- log show revision history of entire repository or files
- manifest output the current or given revision of the project manifest
- merge merge working directory with another revision
- outgoing show changesets not found in the destination
- parents show the parents of the working directory or revision
- paths show aliases for remote repositories
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- recover roll back an interrupted transaction
- remove remove the specified files on the next commit
- rename rename files; equivalent of copy + remove
- resolve redo merges or set/view the merge status of files
- revert restore files to their checkout state
- rollback roll back the last transaction (dangerous)
- root print the root (top) of the current working directory
- serve start stand-alone webserver
- showconfig show combined config settings from all hgrc files
- status show changed files in the working directory
- summary summarize working directory state
- tag add one or more tags for the current or given revision
- tags list repository tags
- tip show the tip revision
- unbundle apply one or more changegroup files
- update update working directory (or switch revisions)
- verify verify the integrity of the repository
- version output version and copyright information
+ add add the specified files on the next commit
+ addremove add all new files, delete all missing files
+ annotate show changeset information by line for each file
+ archive create an unversioned archive of a repository revision
+ backout reverse effect of earlier changeset
+ bisect subdivision search of changesets
+ bookmarks track a line of development with movable markers
+ branch set or show the current branch name
+ branches list repository named branches
+ bundle create a changegroup file
+ cat output the current or given revision of files
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ copy mark files as copied for the next commit
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ grep search for a pattern in specified files and revisions
+ heads show current repository heads or show branch heads
+ help show help for a given topic or a help overview
+ identify identify the working copy or specified revision
+ import import an ordered set of patches
+ incoming show new changesets found in source
+ init create a new repository in the given directory
+ locate locate files matching specific patterns
+ log show revision history of entire repository or files
+ manifest output the current or given revision of the project manifest
+ merge merge working directory with another revision
+ outgoing show changesets not found in the destination
+ parents show the parents of the working directory or revision
+ paths show aliases for remote repositories
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ recover roll back an interrupted transaction
+ remove remove the specified files on the next commit
+ rename rename files; equivalent of copy + remove
+ resolve redo merges or set/view the merge status of files
+ revert restore files to their checkout state
+ rollback roll back the last transaction (dangerous)
+ root print the root (top) of the current working directory
+ serve start stand-alone webserver
+ showconfig show combined config settings from all hgrc files
+ status show changed files in the working directory
+ summary summarize working directory state
+ tag add one or more tags for the current or given revision
+ tags list repository tags
+ tip show the tip revision
+ unbundle apply one or more changegroup files
+ update update working directory (or switch revisions)
+ verify verify the integrity of the repository
+ version output version and copyright information
additional help topics:
- config Configuration Files
- dates Date Formats
- diffs Diff Formats
- environment Environment Variables
- extensions Using Additional Features
- filesets Specifying File Sets
- glossary Glossary
- hgignore Syntax for Mercurial Ignore Files
- hgweb Configuring hgweb
- merge-tools Merge Tools
- multirevs Specifying Multiple Revisions
- patterns File Name Patterns
- phases Working with Phases
- revisions Specifying Single Revisions
- revsets Specifying Revision Sets
- subrepos Subrepositories
- templating Template Usage
- urls URL Paths
+ config Configuration Files
+ dates Date Formats
+ diffs Diff Formats
+ environment Environment Variables
+ extensions Using additional features
+ filesets Specifying File Sets
+ glossary Glossary
+ hgignore syntax for Mercurial ignore files
+ hgweb Configuring hgweb
+ merge-tools Merge Tools
+ multirevs Specifying Multiple Revisions
+ patterns File Name Patterns
+ revisions Specifying Single Revisions
+ revsets Specifying Revision Sets
+ subrepos Subrepositories
+ templating Template Usage
+ urls URL Paths
use "hg -v help" to show builtin aliases and global options
diff --git a/tests/test-glog.t b/tests/test-glog.t
index 25d3fcc..69be0d5 100644
--- a/tests/test-glog.t
+++ b/tests/test-glog.t
@@ -69,6 +69,8 @@ o / (1) collapse
o (0) root
+ $ "$TESTDIR/hghave" no-outer-repo || exit 80
+
$ commit()
> {
> rev=$1
@@ -81,29 +83,8 @@ o (0) root
> hg commit -Aqd "$rev 0" -m "($rev) $msg"
> }
- $ cat > printrevset.py <<EOF
- > from mercurial import extensions, revset, commands, cmdutil
- >
- > def uisetup(ui):
- > def printrevset(orig, ui, repo, *pats, **opts):
- > if opts.get('print_revset'):
- > expr = cmdutil.getgraphlogrevs(repo, pats, opts)[1]
- > if expr:
- > tree = revset.parse(expr)[0]
- > else:
- > tree = []
- > ui.write('%r\n' % (opts.get('rev', []),))
- > ui.write(revset.prettyformat(tree) + '\n')
- > return 0
- > return orig(ui, repo, *pats, **opts)
- > entry = extensions.wrapcommand(commands.table, 'log', printrevset)
- > entry[1].append(('', 'print-revset', False,
- > 'print generated revset and exit (DEPRECATED)'))
- > EOF
-
$ echo "[extensions]" >> $HGRCPATH
$ echo "graphlog=" >> $HGRCPATH
- $ echo "printrevset=`pwd`/printrevset.py" >> $HGRCPATH
$ hg init repo
$ cd repo
@@ -1133,11 +1114,8 @@ File glog per revset (only merges):
Empty revision range - display nothing:
$ hg glog -r 1..0
- $ cd ..
-
-#if no-outer-repo
-
From outer space:
+ $ cd ..
$ hg glog -l1 repo
@ changeset: 34:fea3ac5810e0
| tag: tip
@@ -1156,8 +1134,6 @@ From outer space:
|
$ hg glog -l1 repo/missing
-#endif
-
File log with revs != cset revs:
$ hg init flog
$ cd flog
@@ -1383,13 +1359,9 @@ File + limit + -ra:b, b < tip, (b - a) < limit:
Do not crash or produce strange graphs if history is buggy
- $ hg branch branch
- marked working directory as branch branch
- (branches are permanent and global, did you want a bookmark?)
$ commit 36 "buggy merge: identical parents" 35 35
$ hg glog -l5
- @ changeset: 36:08a19a744424
- | branch: branch
+ @ changeset: 36:95fa8febd08a
| tag: tip
| parent: 35:9159c3644c5e
| parent: 35:9159c3644c5e
@@ -1424,665 +1396,76 @@ Do not crash or produce strange graphs if history is buggy
Test log -G options
- $ testlog() {
- > hg log -G --print-revset "$@"
- > hg log --template 'nodetag {rev}\n' "$@" | grep nodetag \
- > | sed 's/.*nodetag/nodetag/' > log.nodes
- > hg log -G --template 'nodetag {rev}\n' "$@" | grep nodetag \
- > | sed 's/.*nodetag/nodetag/' > glog.nodes
- > diff -u log.nodes glog.nodes | grep '^[-+@ ]' || :
- > }
-
-glog always reorders nodes which explains the difference with log
-
- $ testlog -r 27 -r 25 -r 21 -r 34 -r 32 -r 31
- ['27', '25', '21', '34', '32', '31']
- []
- --- log.nodes * (glob)
- +++ glog.nodes * (glob)
- @@ -1,6 +1,6 @@
- -nodetag 27
- -nodetag 25
- -nodetag 21
- nodetag 34
- nodetag 32
- nodetag 31
- +nodetag 27
- +nodetag 25
- +nodetag 21
- $ testlog -u test -u not-a-user
- []
- (group
- (group
- (or
- (func
- ('symbol', 'user')
- ('string', 'test'))
- (func
- ('symbol', 'user')
- ('string', 'not-a-user')))))
- $ testlog -b not-a-branch
- abort: unknown revision 'not-a-branch'!
- abort: unknown revision 'not-a-branch'!
- abort: unknown revision 'not-a-branch'!
- $ testlog -b 35 -b 36 --only-branch branch
- []
- (group
- (group
- (or
- (or
- (func
- ('symbol', 'branch')
- ('string', 'default'))
- (func
- ('symbol', 'branch')
- ('string', 'branch')))
- (func
- ('symbol', 'branch')
- ('string', 'branch')))))
- $ testlog -k expand -k merge
- []
- (group
- (group
- (or
- (func
- ('symbol', 'keyword')
- ('string', 'expand'))
- (func
- ('symbol', 'keyword')
- ('string', 'merge')))))
- $ testlog --only-merges
- []
- (group
- (func
- ('symbol', 'merge')
- None))
- $ testlog --no-merges
- []
- (group
- (not
- (func
- ('symbol', 'merge')
- None)))
- $ testlog --date '2 0 to 4 0'
- []
- (group
- (func
- ('symbol', 'date')
- ('string', '2 0 to 4 0')))
- $ hg log -G -d 'brace ) in a date'
- abort: invalid date: 'brace ) in a date'
+ $ hg log -G -u 'something nice'
+ $ hg log -G -b 'something nice'
+ abort: unknown revision 'something nice'!
[255]
- $ testlog --prune 31 --prune 32
- []
- (group
- (group
- (and
- (not
- (group
- (or
- ('string', '31')
- (func
- ('symbol', 'ancestors')
- ('string', '31')))))
- (not
- (group
- (or
- ('string', '32')
- (func
- ('symbol', 'ancestors')
- ('string', '32'))))))))
-
-Dedicated repo for --follow and paths filtering. The g is crafted to
-have 2 filelog topological heads in a linear changeset graph.
-
- $ cd ..
- $ hg init follow
- $ cd follow
- $ testlog --follow
- []
- []
- $ echo a > a
- $ echo aa > aa
- $ echo f > f
- $ hg ci -Am "add a" a aa f
- $ hg cp a b
- $ hg cp f g
- $ hg ci -m "copy a b"
- $ mkdir dir
- $ hg mv b dir
- $ echo g >> g
- $ echo f >> f
- $ hg ci -m "mv b dir/b"
- $ hg mv a b
- $ hg cp -f f g
- $ echo a > d
- $ hg add d
- $ hg ci -m "mv a b; add d"
- $ hg mv dir/b e
- $ hg ci -m "mv dir/b e"
- $ hg glog --template '({rev}) {desc|firstline}\n'
- @ (4) mv dir/b e
- |
- o (3) mv a b; add d
- |
- o (2) mv b dir/b
- |
- o (1) copy a b
+ $ hg log -G -k 'something nice'
+ $ hg log -G --only-branch 'something nice'
+ abort: unknown revision 'something nice'!
+ [255]
+ $ hg log -G --include 'some file' --exclude 'another file'
+ $ hg log -G --follow --template 'nodetag {rev}\n' | grep nodetag | wc -l
+ \s*36 (re)
+ $ hg log -G --removed --template 'nodetag {rev}\n' | grep nodetag | wc -l
+ \s*0 (re)
+ $ hg log -G --only-merges --template 'nodetag {rev}\n' | grep nodetag | wc -l
+ \s*28 (re)
+ $ hg log -G --no-merges --template 'nodetag {rev}\n'
+ o nodetag 35
|
- o (0) add a
-
-
- $ testlog a
- []
- (group
- (group
- (func
- ('symbol', 'filelog')
- ('string', 'a'))))
- $ testlog a b
- []
- (group
- (group
- (or
- (func
- ('symbol', 'filelog')
- ('string', 'a'))
- (func
- ('symbol', 'filelog')
- ('string', 'b')))))
-
-Test falling back to slow path for non-existing files
-
- $ testlog a c
- []
- (group
- (func
- ('symbol', '_matchfiles')
- (list
- (list
- (list
- ('string', 'r:')
- ('string', 'd:relpath'))
- ('string', 'p:a'))
- ('string', 'p:c'))))
-
-Test multiple --include/--exclude/paths
-
- $ testlog --include a --include e --exclude b --exclude e a e
- []
- (group
- (func
- ('symbol', '_matchfiles')
- (list
- (list
- (list
- (list
- (list
- (list
- (list
- ('string', 'r:')
- ('string', 'd:relpath'))
- ('string', 'p:a'))
- ('string', 'p:e'))
- ('string', 'i:a'))
- ('string', 'i:e'))
- ('string', 'x:b'))
- ('string', 'x:e'))))
-
-Test glob expansion of pats
-
- $ expandglobs=`python -c "import mercurial.util; \
- > print mercurial.util.expandglobs and 'true' or 'false'"`
- $ if [ $expandglobs = "true" ]; then
- > testlog 'a*';
- > else
- > testlog a*;
- > fi;
- []
- (group
- (group
- (func
- ('symbol', 'filelog')
- ('string', 'aa'))))
-
-Test --follow on a directory
-
- $ testlog -f dir
- abort: cannot follow file not in parent revision: "dir"
- abort: cannot follow file not in parent revision: "dir"
- abort: cannot follow file not in parent revision: "dir"
-
-Test --follow on file not in parent revision
-
- $ testlog -f a
- abort: cannot follow file not in parent revision: "a"
- abort: cannot follow file not in parent revision: "a"
- abort: cannot follow file not in parent revision: "a"
-
-Test --follow and patterns
-
- $ testlog -f 'glob:*'
- abort: can only follow copies/renames for explicit filenames
- abort: can only follow copies/renames for explicit filenames
- abort: can only follow copies/renames for explicit filenames
-
-Test --follow on a single rename
-
- $ hg up -q 2
- $ testlog -f a
- []
- (group
- (group
- (func
- ('symbol', 'follow')
- ('string', 'a'))))
-
-Test --follow and multiple renames
-
- $ hg up -q tip
- $ testlog -f e
- []
- (group
- (group
- (func
- ('symbol', 'follow')
- ('string', 'e'))))
-
-Test --follow and multiple filelog heads
-
- $ hg up -q 2
- $ testlog -f g
- []
- (group
- (group
- (func
- ('symbol', 'follow')
- ('string', 'g'))))
- $ cat log.nodes
- nodetag 2
- nodetag 1
- nodetag 0
- $ hg up -q tip
- $ testlog -f g
- []
- (group
- (group
- (func
- ('symbol', 'follow')
- ('string', 'g'))))
- $ cat log.nodes
- nodetag 3
- nodetag 2
- nodetag 0
-
-Test --follow and multiple files
-
- $ testlog -f g e
- []
- (group
- (group
- (or
- (func
- ('symbol', 'follow')
- ('string', 'g'))
- (func
- ('symbol', 'follow')
- ('string', 'e')))))
- $ cat log.nodes
- nodetag 4
- nodetag 3
- nodetag 2
- nodetag 1
- nodetag 0
-
-Test --follow-first
-
- $ hg up -q 3
- $ echo ee > e
- $ hg ci -Am "add another e" e
- created new head
- $ hg merge --tool internal:other 4
- 0 files updated, 1 files merged, 1 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ echo merge > e
- $ hg ci -m "merge 5 and 4"
- $ testlog --follow-first
- []
- (group
- (func
- ('symbol', '_firstancestors')
- ('symbol', '6')))
-
-Cannot compare with log --follow-first FILE as it never worked
-
- $ hg log -G --print-revset --follow-first e
- []
- (group
- (group
- (func
- ('symbol', '_followfirst')
- ('string', 'e'))))
- $ hg log -G --follow-first e --template '{rev} {desc|firstline}\n'
- @ 6 merge 5 and 4
- |\
- o | 5 add another e
- | |
-
-Test --copies
-
- $ hg log -G --copies --template "{rev} {desc|firstline} \
- > copies: {file_copies_switch}\n"
- @ 6 merge 5 and 4 copies:
+ o nodetag 34
|\
- | o 5 add another e copies:
- | |
- o | 4 mv dir/b e copies: e (dir/b)
+ | \
+ | |\
+ | | \
+ | | |\
+ | | | \
+ | | | |\
+ | | | | \
+ | | | | |\
+ +-+-+-+-----o nodetag 33
+ | | | | | |
+ +---------o nodetag 29
+ | | | | |
+ +-+-+---o nodetag 27
+ | | | |/
+ | | | o nodetag 3
+ | | |/
+ | | o nodetag 2
+ | |/
+ | o nodetag 1
|/
- o 3 mv a b; add d copies: b (a)g (f)
- |
- o 2 mv b dir/b copies: dir/b (b)
- |
- o 1 copy a b copies: b (a)g (f)
- |
- o 0 add a copies:
+ o nodetag 0
-Test "set:..." and parent revision
-
- $ hg up -q 4
- $ testlog "set:copied()"
- []
- (group
- (func
- ('symbol', '_matchfiles')
- (list
- (list
- ('string', 'r:')
- ('string', 'd:relpath'))
- ('string', 'p:set:copied()'))))
- $ testlog --include "set:copied()"
- []
- (group
- (func
- ('symbol', '_matchfiles')
- (list
- (list
- ('string', 'r:')
- ('string', 'd:relpath'))
- ('string', 'i:set:copied()'))))
- $ testlog -r "sort(file('set:copied()'), -rev)"
- ["sort(file('set:copied()'), -rev)"]
- []
-
-Test --removed
-
- $ testlog --removed
- []
- []
- $ testlog --removed a
- []
- (group
- (func
- ('symbol', '_matchfiles')
- (list
- (list
- ('string', 'r:')
- ('string', 'd:relpath'))
- ('string', 'p:a'))))
- $ testlog --removed --follow a
- abort: can only follow copies/renames for explicit filenames
- abort: can only follow copies/renames for explicit filenames
- abort: can only follow copies/renames for explicit filenames
-
-Test --patch and --stat with --follow and --follow-first
-
- $ hg up -q 3
- $ hg log -G --git --patch b
- o changeset: 1:216d4c92cf98
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: copy a b
- |
- | diff --git a/a b/b
- | copy from a
- | copy to b
- |
-
- $ hg log -G --git --stat b
- o changeset: 1:216d4c92cf98
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: copy a b
- |
- | a | 0
- | 1 files changed, 0 insertions(+), 0 deletions(-)
- |
-
- $ hg log -G --git --patch --follow b
- o changeset: 1:216d4c92cf98
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: copy a b
- |
- | diff --git a/a b/b
- | copy from a
- | copy to b
+ $ hg log -G -d 'brace ) in a date'
+ abort: invalid date: 'brace ) in a date'
+ [255]
+ $ hg log -G -P 32 --template '{rev}\n'
+ @ 36
|
- o changeset: 0:f8035bb17114
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
- diff --git a/a b/a
- new file mode 100644
- --- /dev/null
- +++ b/a
- @@ -0,0 +1,1 @@
- +a
-
-
- $ hg log -G --git --stat --follow b
- o changeset: 1:216d4c92cf98
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: copy a b
+ o 35
|
- | a | 0
- | 1 files changed, 0 insertions(+), 0 deletions(-)
+ o 34
|
- o changeset: 0:f8035bb17114
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
- a | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
-
- $ hg up -q 6
- $ hg log -G --git --patch --follow-first e
- @ changeset: 6:fc281d8ff18d
- |\ tag: tip
- | | parent: 5:99b31f1c2782
- | | parent: 4:17d952250a9d
- | | user: test
- | | date: Thu Jan 01 00:00:00 1970 +0000
- | | summary: merge 5 and 4
+ | o 33
| |
- | | diff --git a/e b/e
- | | --- a/e
- | | +++ b/e
- | | @@ -1,1 +1,1 @@
- | | -ee
- | | +merge
- | |
- o | changeset: 5:99b31f1c2782
- | | parent: 3:5918b8d165d1
- | | user: test
- | | date: Thu Jan 01 00:00:00 1970 +0000
- | | summary: add another e
- | |
- | | diff --git a/e b/e
- | | new file mode 100644
- | | --- /dev/null
- | | +++ b/e
- | | @@ -0,0 +1,1 @@
- | | +ee
- | |
-
-Test old-style --rev
-
- $ hg tag 'foo-bar'
- $ testlog -r 'foo-bar'
- ['foo-bar']
- []
+ $ hg log -G --follow a
+ abort: -G/--graph option is incompatible with --follow with file argument
+ [255]
-Test --follow and forward --rev
+Test multiple revision specifications are correctly handled
- $ hg up -q 6
- $ echo g > g
- $ hg ci -Am 'add g' g
- created new head
- $ hg up -q 2
- $ hg log -G --template "{rev} {desc|firstline}\n"
- o 8 add g
+ $ hg log -G -r 27 -r 25 -r 21 -r 34 -r 32 -r 31 --template '{rev}\n'
+ o 34
|
- | o 7 Added tag foo-bar for changeset fc281d8ff18d
- |/
- o 6 merge 5 and 4
+ o 32
|\
- | o 5 add another e
- | |
- o | 4 mv dir/b e
+ | o 31
+ | |\
+ o | | 27
+ |/ /
+ | o 25
|/
- o 3 mv a b; add d
- |
- @ 2 mv b dir/b
- |
- o 1 copy a b
- |
- o 0 add a
-
- $ testlog --follow -r6 -r8 -r5 -r7 -r4
- ['6', '8', '5', '7', '4']
- (group
- (func
- ('symbol', 'descendants')
- ('symbol', '6')))
- --- log.nodes * (glob)
- +++ glog.nodes * (glob)
- @@ -1,3 +1,3 @@
- -nodetag 6
- nodetag 8
- nodetag 7
- +nodetag 6
-
-Test --follow-first and forward --rev
-
- $ testlog --follow-first -r6 -r8 -r5 -r7 -r4
- ['6', '8', '5', '7', '4']
- (group
- (func
- ('symbol', '_firstdescendants')
- ('symbol', '6')))
- --- log.nodes * (glob)
- +++ glog.nodes * (glob)
- @@ -1,3 +1,3 @@
- -nodetag 6
- nodetag 8
- nodetag 7
- +nodetag 6
-
-Test --follow and backward --rev
-
- $ testlog --follow -r6 -r5 -r7 -r8 -r4
- ['6', '5', '7', '8', '4']
- (group
- (func
- ('symbol', 'ancestors')
- ('symbol', '6')))
-
-Test --follow-first and backward --rev
-
- $ testlog --follow-first -r6 -r5 -r7 -r8 -r4
- ['6', '5', '7', '8', '4']
- (group
- (func
- ('symbol', '_firstancestors')
- ('symbol', '6')))
-
-Test subdir
-
- $ hg up -q 3
- $ cd dir
- $ testlog .
- []
- (group
- (func
- ('symbol', '_matchfiles')
- (list
- (list
- ('string', 'r:')
- ('string', 'd:relpath'))
- ('string', 'p:.'))))
- $ testlog ../b
- []
- (group
- (group
- (func
- ('symbol', 'filelog')
- ('string', '../b'))))
- $ testlog -f ../b
- []
- (group
- (group
- (func
- ('symbol', 'follow')
- ('string', 'b'))))
- $ cd ..
-
-Test --hidden
-
- $ cat > $HGTMP/testhidden.py << EOF
- > def reposetup(ui, repo):
- > for line in repo.opener('hidden'):
- > ctx = repo[line.strip()]
- > repo.hiddenrevs.add(ctx.rev())
- > EOF
- $ echo '[extensions]' >> .hg/hgrc
- $ echo "hidden=$HGTMP/testhidden.py" >> .hg/hgrc
- $ hg id --debug -i -r 0 > .hg/hidden
- $ testlog
- []
- []
- $ testlog --hidden
- []
- []
-
-A template without trailing newline should do something sane
-
- $ hg glog -r ::2 --template '{rev} {desc}'
- o 2 mv b dir/b
- |
- o 1 copy a b
- |
-
-Extra newlines must be preserved
-
- $ hg glog -r ::2 --template '\n{rev} {desc}\n\n'
- o
- | 2 mv b dir/b
- |
- o
- | 1 copy a b
- |
-
-The almost-empty template should do something sane too ...
-
- $ hg glog -r ::2 --template '\n'
- o
- |
- o
- |
-
- $ cd ..
+ o 21
+ |\
diff --git a/tests/test-gpg.t b/tests/test-gpg.t
index 5ec6fa0..6549de3 100644
--- a/tests/test-gpg.t
+++ b/tests/test-gpg.t
@@ -6,7 +6,7 @@ Test the GPG extension
> gpg=
>
> [gpg]
- > cmd=gpg --no-permission-warning --no-secmem-warning --no-auto-check-trustdb --homedir "$TESTDIR/gpg"
+ > cmd=gpg --no-permission-warning --no-secmem-warning --homedir $TESTDIR/gpg
> EOF
$ hg init r
$ cd r
@@ -17,7 +17,7 @@ Test the GPG extension
$ hg sigs
$ hg sign 0
- signing 0:e63c23eaa88a
+ Signing 0:e63c23eaa88a
$ hg sigs
hgtest 0:e63c23eaa88ae77967edcf4ea194d31167c478b0
@@ -25,10 +25,3 @@ Test the GPG extension
$ hg sigcheck 0
e63c23eaa88a is signed by:
hgtest
-
-verify that this test has not modified the trustdb.gpg file back in
-the main hg working dir
- $ "$TESTDIR/md5sum.py" "$TESTDIR/gpg/trustdb.gpg"
- f6b9c78c65fa9536e7512bb2ceb338ae */gpg/trustdb.gpg (glob)
-
- $ cd ..
diff --git a/tests/test-graft.t b/tests/test-graft.t
deleted file mode 100644
index 6ec5aec..0000000
--- a/tests/test-graft.t
+++ /dev/null
@@ -1,535 +0,0 @@
-Create a repo with some stuff in it:
-
- $ hg init a
- $ cd a
- $ echo a > a
- $ echo a > d
- $ echo a > e
- $ hg ci -qAm0
- $ echo b > a
- $ hg ci -m1 -u bar
- $ hg mv a b
- $ hg ci -m2
- $ hg cp b c
- $ hg ci -m3 -u baz
- $ echo b > d
- $ echo f > e
- $ hg ci -m4
- $ hg up -q 3
- $ echo b > e
- $ hg branch -q stable
- $ hg ci -m5
- $ hg merge -q default --tool internal:local
- $ hg branch -q default
- $ hg ci -m6
- $ hg phase --public 3
- $ hg phase --force --secret 6
-
- $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n'
- @ test@6.secret: 6
- |\
- | o test@5.draft: 5
- | |
- o | test@4.draft: 4
- |/
- o baz@3.public: 3
- |
- o test@2.public: 2
- |
- o bar@1.public: 1
- |
- o test@0.public: 0
-
-
-Need to specify a rev:
-
- $ hg graft
- abort: no revisions specified
- [255]
-
-Can't graft ancestor:
-
- $ hg graft 1 2
- skipping ancestor revision 1
- skipping ancestor revision 2
- [255]
-
-Specify revisions with -r:
-
- $ hg graft -r 1 -r 2
- skipping ancestor revision 1
- skipping ancestor revision 2
- [255]
-
- $ hg graft -r 1 2
- skipping ancestor revision 2
- skipping ancestor revision 1
- [255]
-
-Can't graft with dirty wd:
-
- $ hg up -q 0
- $ echo foo > a
- $ hg graft 1
- abort: outstanding uncommitted changes
- [255]
- $ hg revert a
-
-Graft a rename:
-
- $ hg graft 2 -u foo
- grafting revision 2
- merging a and b to b
- $ hg export tip --git
- # HG changeset patch
- # User foo
- # Date 0 0
- # Node ID ef0ef43d49e79e81ddafdc7997401ba0041efc82
- # Parent 68795b066622ca79a25816a662041d8f78f3cd9e
- 2
-
- diff --git a/a b/b
- rename from a
- rename to b
-
-Look for extra:source
-
- $ hg log --debug -r tip
- changeset: 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82
- tag: tip
- phase: draft
- parent: 0:68795b066622ca79a25816a662041d8f78f3cd9e
- parent: -1:0000000000000000000000000000000000000000
- manifest: 7:e59b6b228f9cbf9903d5e9abf996e083a1f533eb
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: b
- files-: a
- extra: branch=default
- extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
- description:
- 2
-
-
-
-Graft out of order, skipping a merge and a duplicate
-
- $ hg graft 1 5 4 3 'merge()' 2 -n
- skipping ungraftable merge revision 6
- skipping already grafted revision 2
- grafting revision 1
- grafting revision 5
- grafting revision 4
- grafting revision 3
-
- $ hg graft 1 5 4 3 'merge()' 2 --debug
- skipping ungraftable merge revision 6
- scanning for duplicate grafts
- skipping already grafted revision 2
- grafting revision 1
- searching for copies back to rev 1
- unmatched files in local:
- b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
- b -> a *
- checking for directory renames
- resolving manifests
- overwrite: False, partial: False
- ancestor: 68795b066622, local: ef0ef43d49e7+, remote: 5d205f8b35b6
- b: local copied/moved to a -> m
- preserving b for resolve of b
- updating: b 1/1 files (100.00%)
- picked tool 'internal:merge' for b (binary False symlink False)
- merging b and a to b
- my b@ef0ef43d49e7+ other a@5d205f8b35b6 ancestor a@68795b066622
- premerge successful
- b
- grafting revision 5
- searching for copies back to rev 1
- resolving manifests
- overwrite: False, partial: False
- ancestor: 4c60f11aa304, local: 6b9e5368ca4e+, remote: 97f8bfe72746
- e: remote is newer -> g
- updating: e 1/1 files (100.00%)
- getting e
- e
- grafting revision 4
- searching for copies back to rev 1
- resolving manifests
- overwrite: False, partial: False
- ancestor: 4c60f11aa304, local: 1905859650ec+, remote: 9c233e8e184d
- e: versions differ -> m
- d: remote is newer -> g
- preserving e for resolve of e
- updating: d 1/2 files (50.00%)
- getting d
- updating: e 2/2 files (100.00%)
- picked tool 'internal:merge' for e (binary False symlink False)
- merging e
- my e@1905859650ec+ other e@9c233e8e184d ancestor e@68795b066622
- warning: conflicts during merge.
- merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
- abort: unresolved conflicts, can't continue
- (use hg resolve and hg graft --continue)
- [255]
-
-Continue without resolve should fail:
-
- $ hg graft -c
- grafting revision 4
- abort: unresolved merge conflicts (see hg help resolve)
- [255]
-
-Fix up:
-
- $ echo b > e
- $ hg resolve -m e
-
-Continue with a revision should fail:
-
- $ hg graft -c 6
- abort: can't specify --continue and revisions
- [255]
-
- $ hg graft -c -r 6
- abort: can't specify --continue and revisions
- [255]
-
-Continue for real, clobber usernames
-
- $ hg graft -c -U
- grafting revision 4
- grafting revision 3
-
-Compare with original:
-
- $ hg diff -r 6
- $ hg status --rev 0:. -C
- M d
- M e
- A b
- a
- A c
- a
- R a
-
-View graph:
-
- $ hg --config extensions.graphlog= log -G --template '{author}@{rev}.{phase}: {desc}\n'
- @ test@11.draft: 3
- |
- o test@10.draft: 4
- |
- o test@9.draft: 5
- |
- o bar@8.draft: 1
- |
- o foo@7.draft: 2
- |
- | o test@6.secret: 6
- | |\
- | | o test@5.draft: 5
- | | |
- | o | test@4.draft: 4
- | |/
- | o baz@3.public: 3
- | |
- | o test@2.public: 2
- | |
- | o bar@1.public: 1
- |/
- o test@0.public: 0
-
-Graft again onto another branch should preserve the original source
- $ hg up -q 0
- $ echo 'g'>g
- $ hg add g
- $ hg ci -m 7
- created new head
- $ hg graft 7
- grafting revision 7
-
- $ hg log -r 7 --template '{rev}:{node}\n'
- 7:ef0ef43d49e79e81ddafdc7997401ba0041efc82
- $ hg log -r 2 --template '{rev}:{node}\n'
- 2:5c095ad7e90f871700f02dd1fa5012cb4498a2d4
-
- $ hg log --debug -r tip
- changeset: 13:9db0f28fd3747e92c57d015f53b5593aeec53c2d
- tag: tip
- phase: draft
- parent: 12:b592ea63bb0c19a6c5c44685ee29a2284f9f1b8f
- parent: -1:0000000000000000000000000000000000000000
- manifest: 13:dc313617b8c32457c0d589e0dbbedfe71f3cd637
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: b
- files-: a
- extra: branch=default
- extra: source=5c095ad7e90f871700f02dd1fa5012cb4498a2d4
- description:
- 2
-
-
-Disallow grafting an already grafted cset onto its original branch
- $ hg up -q 6
- $ hg graft 7
- skipping already grafted revision 7 (was grafted from 2)
- [255]
-
-Disallow grafting already grafted csets with the same origin onto each other
- $ hg up -q 13
- $ hg graft 2
- skipping already grafted revision 2
- [255]
- $ hg graft 7
- skipping already grafted revision 7 (same origin 2)
- [255]
-
- $ hg up -q 7
- $ hg graft 2
- skipping already grafted revision 2
- [255]
- $ hg graft tip
- skipping already grafted revision 13 (same origin 2)
- [255]
-
-Graft with --log
-
- $ hg up -Cq 1
- $ hg graft 3 --log -u foo
- grafting revision 3
- warning: can't find ancestor for 'c' copied from 'b'!
- $ hg log --template '{rev} {parents} {desc}\n' -r tip
- 14 1:5d205f8b35b6 3
- (grafted from 4c60f11aa304a54ae1c199feb94e7fc771e51ed8)
-
-Resolve conflicted graft
- $ hg up -q 0
- $ echo b > a
- $ hg ci -m 8
- created new head
- $ echo a > a
- $ hg ci -m 9
- $ hg graft 1 --tool internal:fail
- grafting revision 1
- abort: unresolved conflicts, can't continue
- (use hg resolve and hg graft --continue)
- [255]
- $ hg resolve --all
- merging a
- $ hg graft -c
- grafting revision 1
- $ hg export tip --git
- # HG changeset patch
- # User bar
- # Date 0 0
- # Node ID 64ecd9071ce83c6e62f538d8ce7709d53f32ebf7
- # Parent 4bdb9a9d0b84ffee1d30f0dfc7744cade17aa19c
- 1
-
- diff --git a/a b/a
- --- a/a
- +++ b/a
- @@ -1,1 +1,1 @@
- -a
- +b
-
-Resolve conflicted graft with rename
- $ echo c > a
- $ hg ci -m 10
- $ hg graft 2 --tool internal:fail
- grafting revision 2
- abort: unresolved conflicts, can't continue
- (use hg resolve and hg graft --continue)
- [255]
- $ hg resolve --all
- merging a and b to b
- $ hg graft -c
- grafting revision 2
- $ hg export tip --git
- # HG changeset patch
- # User test
- # Date 0 0
- # Node ID 2e80e1351d6ed50302fe1e05f8bd1d4d412b6e11
- # Parent e5a51ae854a8bbaaf25cc5c6a57ff46042dadbb4
- 2
-
- diff --git a/a b/b
- rename from a
- rename to b
-
-Test simple origin(), with and without args
- $ hg log -r 'origin()'
- changeset: 1:5d205f8b35b6
- user: bar
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 1
-
- changeset: 2:5c095ad7e90f
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 3:4c60f11aa304
- user: baz
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 3
-
- changeset: 4:9c233e8e184d
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 4
-
- changeset: 5:97f8bfe72746
- branch: stable
- parent: 3:4c60f11aa304
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 5
-
- $ hg log -r 'origin(7)'
- changeset: 2:5c095ad7e90f
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
-Now transplant a graft to test following through copies
- $ hg up -q 0
- $ hg branch -q dev
- $ hg ci -qm "dev branch"
- $ hg --config extensions.transplant= transplant -q 7
- $ hg log -r 'origin(.)'
- changeset: 2:5c095ad7e90f
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
-Test simple destination
- $ hg log -r 'destination()'
- changeset: 7:ef0ef43d49e7
- parent: 0:68795b066622
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 8:6b9e5368ca4e
- user: bar
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 1
-
- changeset: 9:1905859650ec
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 5
-
- changeset: 10:52dc0b4c6907
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 4
-
- changeset: 11:882b35362a6b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 3
-
- changeset: 13:9db0f28fd374
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 14:f64defefacee
- parent: 1:5d205f8b35b6
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 3
-
- changeset: 17:64ecd9071ce8
- user: bar
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 1
-
- changeset: 19:2e80e1351d6e
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 21:7e61b508e709
- branch: dev
- tag: tip
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- $ hg log -r 'destination(2)'
- changeset: 7:ef0ef43d49e7
- parent: 0:68795b066622
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 13:9db0f28fd374
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 19:2e80e1351d6e
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 21:7e61b508e709
- branch: dev
- tag: tip
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
-Transplants of grafts can find a destination...
- $ hg log -r 'destination(7)'
- changeset: 21:7e61b508e709
- branch: dev
- tag: tip
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
-... grafts of grafts unfortunately can't
- $ hg graft -q 13
- $ hg log -r 'destination(13)'
-All copies of a cset
- $ hg log -r 'origin(13) or destination(origin(13))'
- changeset: 2:5c095ad7e90f
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 7:ef0ef43d49e7
- parent: 0:68795b066622
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 13:9db0f28fd374
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 19:2e80e1351d6e
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 21:7e61b508e709
- branch: dev
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
- changeset: 22:1313d0a825e2
- branch: dev
- tag: tip
- user: foo
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 2
-
diff --git a/tests/test-grep.t b/tests/test-grep.t
index 0b4c3f2..80f94a8 100644
--- a/tests/test-grep.t
+++ b/tests/test-grep.t
@@ -59,9 +59,8 @@ other
follow
- $ hg grep --traceback -f 'import\n\Z' port2
+ $ hg grep --traceback -f 'import$' port2
port:0:import
-
$ echo deport >> port2
$ hg commit -m 5 -u eggs -d '6 0'
$ hg grep -f --all -nu port port2
@@ -107,8 +106,12 @@ match in last "line" without newline
$ python -c 'fp = open("noeol", "wb"); fp.write("no infinite loop"); fp.close();'
$ hg ci -Amnoeol
adding noeol
+
+last character omitted in output to avoid infinite loop
+
$ hg grep loop
- noeol:4:no infinite loop
+ noeol:4:no infinite loo
+
$ cd ..
@@ -163,14 +166,10 @@ of just using revision numbers.
color:3:-:red
color:1:+:red
- $ cd ..
-
$ hg init a
$ cd a
- $ cp "$TESTDIR/binfile.bin" .
+ $ cp $TESTDIR/binfile.bin .
$ hg add binfile.bin
$ hg ci -m 'add binfile.bin'
$ hg grep "MaCam" --all
binfile.bin:0:+: Binary file matches
-
- $ cd ..
diff --git a/tests/test-hardlinks.t b/tests/test-hardlinks.t
index 65978e1..5f00a61 100644
--- a/tests/test-hardlinks.t
+++ b/tests/test-hardlinks.t
@@ -1,11 +1,8 @@
- $ "$TESTDIR/hghave" hardlink || exit 80
-
$ cat > nlinks.py <<EOF
- > import sys
- > from mercurial import util
+ > import os, sys
> for f in sorted(sys.stdin.readlines()):
> f = f[:-1]
- > print util.nlinks(f), f
+ > print os.lstat(f).st_nlink, f
> EOF
$ nlinksdir()
@@ -48,16 +45,13 @@ Prepare repo r1:
1 r1/.hg/store/data/d1/f2.i
1 r1/.hg/store/data/f1.i
1 r1/.hg/store/fncache
- 1 r1/.hg/store/phaseroots
1 r1/.hg/store/undo
- 1 r1/.hg/store/undo.phaseroots
Create hardlinked clone r2:
$ hg clone -U --debug r1 r2
linked 7 files
- listing keys for "bookmarks"
Create non-hardlinked clone r3:
@@ -79,9 +73,7 @@ Repos r1 and r2 should now contain hardlinked files:
2 r1/.hg/store/data/d1/f2.i
2 r1/.hg/store/data/f1.i
2 r1/.hg/store/fncache
- 1 r1/.hg/store/phaseroots
1 r1/.hg/store/undo
- 1 r1/.hg/store/undo.phaseroots
$ nlinksdir r2/.hg/store
2 r2/.hg/store/00changelog.i
@@ -98,18 +90,13 @@ Repo r3 should not be hardlinked:
1 r3/.hg/store/data/d1/f2.i
1 r3/.hg/store/data/f1.i
1 r3/.hg/store/fncache
- 1 r3/.hg/store/phaseroots
1 r3/.hg/store/undo
- 1 r3/.hg/store/undo.phaseroots
Create a non-inlined filelog in r3:
$ cd r3/d1
- >>> f = open('data1', 'wb')
- >>> for x in range(10000):
- ... f.write("%s\n" % str(x))
- >>> f.close()
+ $ python -c 'for x in range(10000): print x' >> data1
$ for j in 0 1 2 3 4 5 6 7 8 9; do
> cat data1 >> f2
> hg commit -m$j
@@ -123,9 +110,7 @@ Create a non-inlined filelog in r3:
1 r3/.hg/store/data/d1/f2.i
1 r3/.hg/store/data/f1.i
1 r3/.hg/store/fncache
- 1 r3/.hg/store/phaseroots
1 r3/.hg/store/undo
- 1 r3/.hg/store/undo.phaseroots
Push to repo r1 should break up most hardlinks in r2:
@@ -138,7 +123,7 @@ Push to repo r1 should break up most hardlinks in r2:
$ cd r3
$ hg push
- pushing to $TESTTMP/r1 (glob)
+ pushing to $TESTTMP/r1
searching for changes
adding changesets
adding manifests
@@ -208,9 +193,7 @@ r4 has hardlinks in the working dir (not just inside .hg):
2 r4/.hg/store/data/d1/f2.i
2 r4/.hg/store/data/f1.i
2 r4/.hg/store/fncache
- 2 r4/.hg/store/phaseroots
2 r4/.hg/store/undo
- 2 r4/.hg/store/undo.phaseroots
2 r4/.hg/undo.bookmarks
2 r4/.hg/undo.branch
2 r4/.hg/undo.desc
@@ -239,9 +222,7 @@ Update back to revision 11 in r4 should break hardlink of file f1:
2 r4/.hg/store/data/d1/f2.i
2 r4/.hg/store/data/f1.i
2 r4/.hg/store/fncache
- 2 r4/.hg/store/phaseroots
2 r4/.hg/store/undo
- 2 r4/.hg/store/undo.phaseroots
2 r4/.hg/undo.bookmarks
2 r4/.hg/undo.branch
2 r4/.hg/undo.desc
@@ -349,4 +330,3 @@ Test tags hardlinking:
$ cat ../b/.hg/localtags
4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo
- $ cd ..
diff --git a/tests/test-help.t b/tests/test-help.t
index fe1eb25..39f51d5 100644
--- a/tests/test-help.t
+++ b/tests/test-help.t
@@ -5,252 +5,262 @@ Short help:
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
$ hg -q
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
$ hg help
Mercurial Distributed SCM
list of commands:
- add add the specified files on the next commit
- addremove add all new files, delete all missing files
- annotate show changeset information by line for each file
- archive create an unversioned archive of a repository revision
- backout reverse effect of earlier changeset
- bisect subdivision search of changesets
- bookmarks track a line of development with movable markers
- branch set or show the current branch name
- branches list repository named branches
- bundle create a changegroup file
- cat output the current or given revision of files
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- copy mark files as copied for the next commit
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- graft copy changes from other branches onto the current branch
- grep search for a pattern in specified files and revisions
- heads show current repository heads or show branch heads
- help show help for a given topic or a help overview
- identify identify the working copy or specified revision
- import import an ordered set of patches
- incoming show new changesets found in source
- init create a new repository in the given directory
- locate locate files matching specific patterns
- log show revision history of entire repository or files
- manifest output the current or given revision of the project manifest
- merge merge working directory with another revision
- outgoing show changesets not found in the destination
- parents show the parents of the working directory or revision
- paths show aliases for remote repositories
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- recover roll back an interrupted transaction
- remove remove the specified files on the next commit
- rename rename files; equivalent of copy + remove
- resolve redo merges or set/view the merge status of files
- revert restore files to their checkout state
- rollback roll back the last transaction (dangerous)
- root print the root (top) of the current working directory
- serve start stand-alone webserver
- showconfig show combined config settings from all hgrc files
- status show changed files in the working directory
- summary summarize working directory state
- tag add one or more tags for the current or given revision
- tags list repository tags
- tip show the tip revision
- unbundle apply one or more changegroup files
- update update working directory (or switch revisions)
- verify verify the integrity of the repository
- version output version and copyright information
+ add add the specified files on the next commit
+ addremove add all new files, delete all missing files
+ annotate show changeset information by line for each file
+ archive create an unversioned archive of a repository revision
+ backout reverse effect of earlier changeset
+ bisect subdivision search of changesets
+ bookmarks track a line of development with movable markers
+ branch set or show the current branch name
+ branches list repository named branches
+ bundle create a changegroup file
+ cat output the current or given revision of files
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ copy mark files as copied for the next commit
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ grep search for a pattern in specified files and revisions
+ heads show current repository heads or show branch heads
+ help show help for a given topic or a help overview
+ identify identify the working copy or specified revision
+ import import an ordered set of patches
+ incoming show new changesets found in source
+ init create a new repository in the given directory
+ locate locate files matching specific patterns
+ log show revision history of entire repository or files
+ manifest output the current or given revision of the project manifest
+ merge merge working directory with another revision
+ outgoing show changesets not found in the destination
+ parents show the parents of the working directory or revision
+ paths show aliases for remote repositories
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ recover roll back an interrupted transaction
+ remove remove the specified files on the next commit
+ rename rename files; equivalent of copy + remove
+ resolve redo merges or set/view the merge status of files
+ revert restore files to their checkout state
+ rollback roll back the last transaction (dangerous)
+ root print the root (top) of the current working directory
+ serve start stand-alone webserver
+ showconfig show combined config settings from all hgrc files
+ status show changed files in the working directory
+ summary summarize working directory state
+ tag add one or more tags for the current or given revision
+ tags list repository tags
+ tip show the tip revision
+ unbundle apply one or more changegroup files
+ update update working directory (or switch revisions)
+ verify verify the integrity of the repository
+ version output version and copyright information
additional help topics:
- config Configuration Files
- dates Date Formats
- diffs Diff Formats
- environment Environment Variables
- extensions Using Additional Features
- filesets Specifying File Sets
- glossary Glossary
- hgignore Syntax for Mercurial Ignore Files
- hgweb Configuring hgweb
- merge-tools Merge Tools
- multirevs Specifying Multiple Revisions
- patterns File Name Patterns
- phases Working with Phases
- revisions Specifying Single Revisions
- revsets Specifying Revision Sets
- subrepos Subrepositories
- templating Template Usage
- urls URL Paths
+ config Configuration Files
+ dates Date Formats
+ diffs Diff Formats
+ environment Environment Variables
+ extensions Using additional features
+ filesets Specifying File Sets
+ glossary Glossary
+ hgignore syntax for Mercurial ignore files
+ hgweb Configuring hgweb
+ merge-tools Merge Tools
+ multirevs Specifying Multiple Revisions
+ patterns File Name Patterns
+ revisions Specifying Single Revisions
+ revsets Specifying Revision Sets
+ subrepos Subrepositories
+ templating Template Usage
+ urls URL Paths
use "hg -v help" to show builtin aliases and global options
$ hg -q help
- add add the specified files on the next commit
- addremove add all new files, delete all missing files
- annotate show changeset information by line for each file
- archive create an unversioned archive of a repository revision
- backout reverse effect of earlier changeset
- bisect subdivision search of changesets
- bookmarks track a line of development with movable markers
- branch set or show the current branch name
- branches list repository named branches
- bundle create a changegroup file
- cat output the current or given revision of files
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- copy mark files as copied for the next commit
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- graft copy changes from other branches onto the current branch
- grep search for a pattern in specified files and revisions
- heads show current repository heads or show branch heads
- help show help for a given topic or a help overview
- identify identify the working copy or specified revision
- import import an ordered set of patches
- incoming show new changesets found in source
- init create a new repository in the given directory
- locate locate files matching specific patterns
- log show revision history of entire repository or files
- manifest output the current or given revision of the project manifest
- merge merge working directory with another revision
- outgoing show changesets not found in the destination
- parents show the parents of the working directory or revision
- paths show aliases for remote repositories
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- recover roll back an interrupted transaction
- remove remove the specified files on the next commit
- rename rename files; equivalent of copy + remove
- resolve redo merges or set/view the merge status of files
- revert restore files to their checkout state
- rollback roll back the last transaction (dangerous)
- root print the root (top) of the current working directory
- serve start stand-alone webserver
- showconfig show combined config settings from all hgrc files
- status show changed files in the working directory
- summary summarize working directory state
- tag add one or more tags for the current or given revision
- tags list repository tags
- tip show the tip revision
- unbundle apply one or more changegroup files
- update update working directory (or switch revisions)
- verify verify the integrity of the repository
- version output version and copyright information
+ add add the specified files on the next commit
+ addremove add all new files, delete all missing files
+ annotate show changeset information by line for each file
+ archive create an unversioned archive of a repository revision
+ backout reverse effect of earlier changeset
+ bisect subdivision search of changesets
+ bookmarks track a line of development with movable markers
+ branch set or show the current branch name
+ branches list repository named branches
+ bundle create a changegroup file
+ cat output the current or given revision of files
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ copy mark files as copied for the next commit
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ grep search for a pattern in specified files and revisions
+ heads show current repository heads or show branch heads
+ help show help for a given topic or a help overview
+ identify identify the working copy or specified revision
+ import import an ordered set of patches
+ incoming show new changesets found in source
+ init create a new repository in the given directory
+ locate locate files matching specific patterns
+ log show revision history of entire repository or files
+ manifest output the current or given revision of the project manifest
+ merge merge working directory with another revision
+ outgoing show changesets not found in the destination
+ parents show the parents of the working directory or revision
+ paths show aliases for remote repositories
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ recover roll back an interrupted transaction
+ remove remove the specified files on the next commit
+ rename rename files; equivalent of copy + remove
+ resolve redo merges or set/view the merge status of files
+ revert restore files to their checkout state
+ rollback roll back the last transaction (dangerous)
+ root print the root (top) of the current working directory
+ serve start stand-alone webserver
+ showconfig show combined config settings from all hgrc files
+ status show changed files in the working directory
+ summary summarize working directory state
+ tag add one or more tags for the current or given revision
+ tags list repository tags
+ tip show the tip revision
+ unbundle apply one or more changegroup files
+ update update working directory (or switch revisions)
+ verify verify the integrity of the repository
+ version output version and copyright information
additional help topics:
- config Configuration Files
- dates Date Formats
- diffs Diff Formats
- environment Environment Variables
- extensions Using Additional Features
- filesets Specifying File Sets
- glossary Glossary
- hgignore Syntax for Mercurial Ignore Files
- hgweb Configuring hgweb
- merge-tools Merge Tools
- multirevs Specifying Multiple Revisions
- patterns File Name Patterns
- phases Working with Phases
- revisions Specifying Single Revisions
- revsets Specifying Revision Sets
- subrepos Subrepositories
- templating Template Usage
- urls URL Paths
+ config Configuration Files
+ dates Date Formats
+ diffs Diff Formats
+ environment Environment Variables
+ extensions Using additional features
+ filesets Specifying File Sets
+ glossary Glossary
+ hgignore syntax for Mercurial ignore files
+ hgweb Configuring hgweb
+ merge-tools Merge Tools
+ multirevs Specifying Multiple Revisions
+ patterns File Name Patterns
+ revisions Specifying Single Revisions
+ revsets Specifying Revision Sets
+ subrepos Subrepositories
+ templating Template Usage
+ urls URL Paths
Test short command list with verbose option
$ hg -v help shortlist
- Mercurial Distributed SCM
+ Mercurial Distributed SCM (version *) (glob)
+ (see http://mercurial.selenic.com for more information)
+
+ Copyright (C) 2005-2011 Matt Mackall and others
+ This is free software; see the source for copying conditions. There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
basic commands:
- add add the specified files on the next commit
- annotate, blame
- show changeset information by line for each file
- clone make a copy of an existing repository
- commit, ci commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log, history show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove, rm remove the specified files on the next commit
- serve start stand-alone webserver
- status, st show changed files in the working directory
- summary, sum summarize working directory state
- update, up, checkout, co
- update working directory (or switch revisions)
+ add:
+ add the specified files on the next commit
+ annotate, blame:
+ show changeset information by line for each file
+ clone:
+ make a copy of an existing repository
+ commit, ci:
+ commit the specified files or all outstanding changes
+ diff:
+ diff repository (or selected files)
+ export:
+ dump the header and diffs for one or more changesets
+ forget:
+ forget the specified files on the next commit
+ init:
+ create a new repository in the given directory
+ log, history:
+ show revision history of entire repository or files
+ merge:
+ merge working directory with another revision
+ pull:
+ pull changes from the specified source
+ push:
+ push changes to the specified destination
+ remove, rm:
+ remove the specified files on the next commit
+ serve:
+ start stand-alone webserver
+ status, st:
+ show changed files in the working directory
+ summary, sum:
+ summarize working directory state
+ update, up, checkout, co:
+ update working directory (or switch revisions)
global options:
-
- -R --repository REPO repository root directory or name of overlay bundle
- file
- --cwd DIR change working directory
- -y --noninteractive do not prompt, automatically pick the first choice for
- all prompts
- -q --quiet suppress output
- -v --verbose enable additional output
- --config CONFIG [+] set/override config option (use 'section.name=value')
- --debug enable debugging output
- --debugger start debugger
- --encoding ENCODE set the charset encoding (default: ascii)
- --encodingmode MODE set the charset encoding mode (default: strict)
- --traceback always print a traceback on exception
- --time time how long the command takes
- --profile print command execution profile
- --version output version information and exit
- -h --help display help and exit
+ -R --repository REPO repository root directory or name of overlay bundle
+ file
+ --cwd DIR change working directory
+ -y --noninteractive do not prompt, automatically pick the first choice
+ for all prompts
+ -q --quiet suppress output
+ -v --verbose enable additional output
+ --config CONFIG [+] set/override config option (use 'section.name=value')
+ --debug enable debugging output
+ --debugger start debugger
+ --encoding ENCODE set the charset encoding (default: ascii)
+ --encodingmode MODE set the charset encoding mode (default: strict)
+ --traceback always print a traceback on exception
+ --time time how long the command takes
+ --profile print command execution profile
+ --version output version information and exit
+ -h --help display help and exit
[+] marked option can be specified multiple times
@@ -270,16 +280,18 @@ Test short command list with verbose option
Returns 0 if all files are successfully added.
+ use "hg -v help add" to show verbose help
+
options:
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
- -n --dry-run do not perform actions, just print output
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -S --subrepos recurse into subrepositories
+ -n --dry-run do not perform actions, just print output
[+] marked option can be specified multiple times
- use "hg -v help add" to show more info
+ use "hg -v help add" to show global options
Verbose help for add
@@ -311,32 +323,30 @@ Verbose help for add
options:
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
- -n --dry-run do not perform actions, just print output
-
- [+] marked option can be specified multiple times
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -S --subrepos recurse into subrepositories
+ -n --dry-run do not perform actions, just print output
global options:
-
- -R --repository REPO repository root directory or name of overlay bundle
- file
- --cwd DIR change working directory
- -y --noninteractive do not prompt, automatically pick the first choice for
- all prompts
- -q --quiet suppress output
- -v --verbose enable additional output
- --config CONFIG [+] set/override config option (use 'section.name=value')
- --debug enable debugging output
- --debugger start debugger
- --encoding ENCODE set the charset encoding (default: ascii)
- --encodingmode MODE set the charset encoding mode (default: strict)
- --traceback always print a traceback on exception
- --time time how long the command takes
- --profile print command execution profile
- --version output version information and exit
- -h --help display help and exit
+ -R --repository REPO repository root directory or name of overlay bundle
+ file
+ --cwd DIR change working directory
+ -y --noninteractive do not prompt, automatically pick the first choice
+ for all prompts
+ -q --quiet suppress output
+ -v --verbose enable additional output
+ --config CONFIG [+] set/override config option (use
+ 'section.name=value')
+ --debug enable debugging output
+ --debugger start debugger
+ --encoding ENCODE set the charset encoding (default: ascii)
+ --encodingmode MODE set the charset encoding mode (default: strict)
+ --traceback always print a traceback on exception
+ --time time how long the command takes
+ --profile print command execution profile
+ --version output version information and exit
+ -h --help display help and exit
[+] marked option can be specified multiple times
@@ -346,9 +356,35 @@ Test help option with version option
Mercurial Distributed SCM (version *) (glob)
(see http://mercurial.selenic.com for more information)
- Copyright (C) 2005-2012 Matt Mackall and others
+ Copyright (C) 2005-2011 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ hg add [OPTION]... [FILE]...
+
+ add the specified files on the next commit
+
+ Schedule files to be version controlled and added to the repository.
+
+ The files will be added to the repository at the next commit. To undo an
+ add before that, see "hg forget".
+
+ If no names are given, add all files to the repository.
+
+ Returns 0 if all files are successfully added.
+
+ use "hg -v help add" to show verbose help
+
+ options:
+
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -S --subrepos recurse into subrepositories
+ -n --dry-run do not perform actions, just print output
+
+ [+] marked option can be specified multiple times
+
+ use "hg -v help add" to show global options
$ hg add --skjdfks
hg add: option --skjdfks not recognized
@@ -358,10 +394,10 @@ Test help option with version option
options:
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
- -n --dry-run do not perform actions, just print output
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -S --subrepos recurse into subrepositories
+ -n --dry-run do not perform actions, just print output
[+] marked option can be specified multiple times
@@ -373,8 +409,8 @@ Test ambiguous command help
$ hg help ad
list of commands:
- add add the specified files on the next commit
- addremove add all new files, delete all missing files
+ add add the specified files on the next commit
+ addremove add all new files, delete all missing files
use "hg -v help ad" to show builtin aliases and global options
@@ -394,7 +430,7 @@ Test command without options
Returns 0 on success, 1 if errors are encountered.
- use "hg -v help verify" to show more info
+ use "hg -v help verify" to show global options
$ hg help diff
hg diff [OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...
@@ -429,25 +465,25 @@ Test command without options
options:
- -r --rev REV [+] revision
- -c --change REV change made by revision
- -a --text treat all files as text
- -g --git use git extended diff format
- --nodates omit dates from diff headers
- -p --show-function show which function each change is in
- --reverse produce a diff that undoes the changes
- -w --ignore-all-space ignore white space when comparing lines
- -b --ignore-space-change ignore changes in the amount of white space
- -B --ignore-blank-lines ignore changes whose lines are all blank
- -U --unified NUM number of lines of context to show
- --stat output diffstat-style summary of changes
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
+ -r --rev REV [+] revision
+ -c --change REV change made by revision
+ -a --text treat all files as text
+ -g --git use git extended diff format
+ --nodates omit dates from diff headers
+ -p --show-function show which function each change is in
+ --reverse produce a diff that undoes the changes
+ -w --ignore-all-space ignore white space when comparing lines
+ -b --ignore-space-change ignore changes in the amount of white space
+ -B --ignore-blank-lines ignore changes whose lines are all blank
+ -U --unified NUM number of lines of context to show
+ --stat output diffstat-style summary of changes
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -S --subrepos recurse into subrepositories
[+] marked option can be specified multiple times
- use "hg -v help diff" to show more info
+ use "hg -v help diff" to show global options
$ hg help status
hg status [OPTION]... [FILE]...
@@ -491,26 +527,26 @@ Test command without options
options:
- -A --all show status of all files
- -m --modified show only modified files
- -a --added show only added files
- -r --removed show only removed files
- -d --deleted show only deleted (but tracked) files
- -c --clean show only files without changes
- -u --unknown show only unknown (not tracked) files
- -i --ignored show only ignored files
- -n --no-status hide status prefix
- -C --copies show source of copied files
- -0 --print0 end filenames with NUL, for use with xargs
- --rev REV [+] show difference from revision
- --change REV list the changed files of a revision
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -S --subrepos recurse into subrepositories
+ -A --all show status of all files
+ -m --modified show only modified files
+ -a --added show only added files
+ -r --removed show only removed files
+ -d --deleted show only deleted (but tracked) files
+ -c --clean show only files without changes
+ -u --unknown show only unknown (not tracked) files
+ -i --ignored show only ignored files
+ -n --no-status hide status prefix
+ -C --copies show source of copied files
+ -0 --print0 end filenames with NUL, for use with xargs
+ --rev REV [+] show difference from revision
+ --change REV list the changed files of a revision
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -S --subrepos recurse into subrepositories
[+] marked option can be specified multiple times
- use "hg -v help status" to show more info
+ use "hg -v help status" to show global options
$ hg -q help status
hg status [OPTION]... [FILE]...
@@ -523,24 +559,23 @@ Test command without options
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
[255]
@@ -551,24 +586,23 @@ Test command without options
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
[255]
@@ -596,16 +630,7 @@ Test command with no help text
(no help text available)
- use "hg -v help nohelp" to show more info
-
- $ hg help -k nohelp
- Commands:
-
- nohelp hg nohelp
-
- Extension Commands:
-
- nohelp (no help text available)
+ use "hg -v help nohelp" to show global options
Test that default list of commands omits extension commands
@@ -614,84 +639,81 @@ Test that default list of commands omits extension commands
list of commands:
- add add the specified files on the next commit
- addremove add all new files, delete all missing files
- annotate show changeset information by line for each file
- archive create an unversioned archive of a repository revision
- backout reverse effect of earlier changeset
- bisect subdivision search of changesets
- bookmarks track a line of development with movable markers
- branch set or show the current branch name
- branches list repository named branches
- bundle create a changegroup file
- cat output the current or given revision of files
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- copy mark files as copied for the next commit
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- graft copy changes from other branches onto the current branch
- grep search for a pattern in specified files and revisions
- heads show current repository heads or show branch heads
- help show help for a given topic or a help overview
- identify identify the working copy or specified revision
- import import an ordered set of patches
- incoming show new changesets found in source
- init create a new repository in the given directory
- locate locate files matching specific patterns
- log show revision history of entire repository or files
- manifest output the current or given revision of the project manifest
- merge merge working directory with another revision
- outgoing show changesets not found in the destination
- parents show the parents of the working directory or revision
- paths show aliases for remote repositories
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- recover roll back an interrupted transaction
- remove remove the specified files on the next commit
- rename rename files; equivalent of copy + remove
- resolve redo merges or set/view the merge status of files
- revert restore files to their checkout state
- rollback roll back the last transaction (dangerous)
- root print the root (top) of the current working directory
- serve start stand-alone webserver
- showconfig show combined config settings from all hgrc files
- status show changed files in the working directory
- summary summarize working directory state
- tag add one or more tags for the current or given revision
- tags list repository tags
- tip show the tip revision
- unbundle apply one or more changegroup files
- update update working directory (or switch revisions)
- verify verify the integrity of the repository
- version output version and copyright information
+ add add the specified files on the next commit
+ addremove add all new files, delete all missing files
+ annotate show changeset information by line for each file
+ archive create an unversioned archive of a repository revision
+ backout reverse effect of earlier changeset
+ bisect subdivision search of changesets
+ bookmarks track a line of development with movable markers
+ branch set or show the current branch name
+ branches list repository named branches
+ bundle create a changegroup file
+ cat output the current or given revision of files
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ copy mark files as copied for the next commit
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ grep search for a pattern in specified files and revisions
+ heads show current repository heads or show branch heads
+ help show help for a given topic or a help overview
+ identify identify the working copy or specified revision
+ import import an ordered set of patches
+ incoming show new changesets found in source
+ init create a new repository in the given directory
+ locate locate files matching specific patterns
+ log show revision history of entire repository or files
+ manifest output the current or given revision of the project manifest
+ merge merge working directory with another revision
+ outgoing show changesets not found in the destination
+ parents show the parents of the working directory or revision
+ paths show aliases for remote repositories
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ recover roll back an interrupted transaction
+ remove remove the specified files on the next commit
+ rename rename files; equivalent of copy + remove
+ resolve redo merges or set/view the merge status of files
+ revert restore files to their checkout state
+ rollback roll back the last transaction (dangerous)
+ root print the root (top) of the current working directory
+ serve start stand-alone webserver
+ showconfig show combined config settings from all hgrc files
+ status show changed files in the working directory
+ summary summarize working directory state
+ tag add one or more tags for the current or given revision
+ tags list repository tags
+ tip show the tip revision
+ unbundle apply one or more changegroup files
+ update update working directory (or switch revisions)
+ verify verify the integrity of the repository
+ version output version and copyright information
enabled extensions:
- helpext (no help text available)
+ helpext (no help text available)
additional help topics:
- config Configuration Files
- dates Date Formats
- diffs Diff Formats
- environment Environment Variables
- extensions Using Additional Features
- filesets Specifying File Sets
- glossary Glossary
- hgignore Syntax for Mercurial Ignore Files
- hgweb Configuring hgweb
- merge-tools Merge Tools
- multirevs Specifying Multiple Revisions
- patterns File Name Patterns
- phases Working with Phases
- revisions Specifying Single Revisions
- revsets Specifying Revision Sets
- subrepos Subrepositories
- templating Template Usage
- urls URL Paths
+ config Configuration Files
+ dates Date Formats
+ diffs Diff Formats
+ environment Environment Variables
+ extensions Using additional features
+ filesets Specifying File Sets
+ glossary Glossary
+ hgignore syntax for Mercurial ignore files
+ hgweb Configuring hgweb
+ merge-tools Merge Tools
+ multirevs Specifying Multiple Revisions
+ patterns File Name Patterns
+ revisions Specifying Single Revisions
+ revsets Specifying Revision Sets
+ subrepos Subrepositories
+ templating Template Usage
+ urls URL Paths
use "hg -v help" to show builtin aliases and global options
@@ -704,7 +726,7 @@ Test list of commands with command with no help text
list of commands:
- nohelp (no help text available)
+ nohelp (no help text available)
use "hg -v help helpext" to show builtin aliases and global options
@@ -726,13 +748,13 @@ Test a help topic
short-form identifier is only valid if it is the prefix of exactly one
full-length identifier.
- Any other string is treated as a bookmark, tag, or branch name. A bookmark
- is a movable pointer to a revision. A tag is a permanent name associated
- with a revision. A branch name denotes the tipmost revision of that
- branch. Bookmark, tag, and branch names must not contain the ":"
- character.
+ Any other string is treated as a tag or branch name. A tag name is a
+ symbolic name associated with a revision identifier. A branch name denotes
+ the tipmost revision of that branch. Tag and branch names must not contain
+ the ":" character.
- The reserved name "tip" always identifies the most recent revision.
+ The reserved name "tip" is a special tag that always identifies the most
+ recent revision.
The reserved name "null" indicates the null revision. This is the revision
of an empty repository, and the parent of revision 0.
@@ -744,10 +766,10 @@ Test a help topic
Test templating help
$ hg help templating | egrep '(desc|diffstat|firstline|nonempty) '
- desc String. The text of the changeset description.
- diffstat String. Statistics of changes with the following format:
- firstline Any text. Returns the first line of text.
- nonempty Any text. Returns '(none)' if the string is empty.
+ desc String. The text of the changeset description.
+ diffstat String. Statistics of changes with the following format:
+ firstline Any text. Returns the first line of text.
+ nonempty Any text. Returns '(none)' if the string is empty.
Test help hooks
@@ -775,30 +797,3 @@ Test help hooks
$ hg help revsets | grep helphook
helphook1
helphook2
-
-Test keyword search help
-
- $ hg help -k clone
- Topics:
-
- config Configuration Files
- extensions Using Additional Features
- glossary Glossary
- phases Working with Phases
- subrepos Subrepositories
- urls URL Paths
-
- Commands:
-
- clone make a copy of an existing repository
- paths show aliases for remote repositories
- update update working directory (or switch revisions)
-
- Extensions:
-
- relink recreates hardlinks between repository clones
-
- Extension Commands:
-
- qclone clone main and patch repository at same time
-
diff --git a/tests/test-hgcia.t b/tests/test-hgcia.t
index 10e9418..cf9cfcd 100644
--- a/tests/test-hgcia.t
+++ b/tests/test-hgcia.t
@@ -90,5 +90,3 @@ Test the CIA extension
</body>
<timestamp>0</timestamp>
</message>
-
- $ cd ..
diff --git a/tests/test-hgignore.t b/tests/test-hgignore.t
index 3b4a9aa..405669f 100644
--- a/tests/test-hgignore.t
+++ b/tests/test-hgignore.t
@@ -44,11 +44,11 @@ Should display baz only:
$ echo "*.o" > .hgignore
$ hg status
- abort: $TESTTMP/.hgignore: invalid pattern (relre): *.o (glob)
+ abort: $TESTTMP/.hgignore: invalid pattern (relre): *.o
[255]
$ echo ".*\.o" > .hgignore
- $ hg status
+ $ hg status
A dir/b.o
? .hgignore
? a.c
@@ -88,7 +88,7 @@ Check it does not ignore the current directory '.':
$ echo "syntax: invalid" > .hgignore
$ hg status
- $TESTTMP/.hgignore: ignoring invalid syntax 'invalid' (glob)
+ $TESTTMP/.hgignore: ignoring invalid syntax 'invalid'
A dir/b.o
? .hgignore
? a.c
@@ -122,5 +122,3 @@ Check it does not ignore the current directory '.':
$ hg debugignore
(?:(?:|.*/)[^/]*(?:/|$))
-
- $ cd ..
diff --git a/tests/test-hgk.t b/tests/test-hgk.t
index acdbd06..10b9bbc 100644
--- a/tests/test-hgk.t
+++ b/tests/test-hgk.t
@@ -16,5 +16,3 @@ Minimal hgk check
branch default
adda
-
- $ cd ..
diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
index 65434ac..79c078a 100644
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -1,24 +1,15 @@
-hide outer repo
- $ hg init
-
Use hgrc within $TESTTMP
$ HGRCPATH=`pwd`/hgrc
$ export HGRCPATH
-Use an alternate var for scribbling on hgrc to keep check-code from
-complaining about the important settings we may be overwriting:
-
- $ HGRC=`pwd`/hgrc
- $ export HGRC
-
Basic syntax error
- $ echo "invalid" > $HGRC
+ $ echo "invalid" > $HGRCPATH
$ hg version
hg: parse error at $TESTTMP/hgrc:1: invalid
[255]
- $ echo "" > $HGRC
+ $ echo "" > $HGRCPATH
Issue1199: Can't use '%' in hgrc (eg url encoded username)
@@ -29,36 +20,36 @@ Issue1199: Can't use '%' in hgrc (eg url encoded username)
$ cd foobar
$ cat .hg/hgrc
[paths]
- default = $TESTTMP/foo%bar (glob)
+ default = $TESTTMP/foo%bar
$ hg paths
- default = $TESTTMP/foo%bar (glob)
+ default = $TESTTMP/foo%bar
$ hg showconfig
- bundle.mainreporoot=$TESTTMP/foobar (glob)
- paths.default=$TESTTMP/foo%bar (glob)
+ bundle.mainreporoot=$TESTTMP/foobar
+ paths.default=$TESTTMP/foo%bar
$ cd ..
issue1829: wrong indentation
- $ echo '[foo]' > $HGRC
- $ echo ' x = y' >> $HGRC
+ $ echo '[foo]' > $HGRCPATH
+ $ echo ' x = y' >> $HGRCPATH
$ hg version
hg: parse error at $TESTTMP/hgrc:2: x = y
[255]
$ python -c "print '[foo]\nbar = a\n b\n c \n de\n fg \nbaz = bif cb \n'" \
- > > $HGRC
+ > > $HGRCPATH
$ hg showconfig foo
foo.bar=a\nb\nc\nde\nfg
foo.baz=bif cb
$ FAKEPATH=/path/to/nowhere
$ export FAKEPATH
- $ echo '%include $FAKEPATH/no-such-file' > $HGRC
+ $ echo '%include $FAKEPATH/no-such-file' > $HGRCPATH
$ hg version
Mercurial Distributed SCM (version *) (glob)
(see http://mercurial.selenic.com for more information)
- Copyright (C) 2005-2012 Matt Mackall and others
+ Copyright (C) 2005-2011 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ unset FAKEPATH
@@ -66,7 +57,6 @@ issue1829: wrong indentation
make sure global options given on the cmdline take precedence
$ hg showconfig --config ui.verbose=True --quiet
- bundle.mainreporoot=$TESTTMP
ui.verbose=False
ui.debug=False
ui.quiet=True
@@ -85,8 +75,8 @@ username expansion
$ FAKEUSER='John Doe'
$ export FAKEUSER
- $ echo '[ui]' > $HGRC
- $ echo 'username = $FAKEUSER' >> $HGRC
+ $ echo '[ui]' > $HGRCPATH
+ $ echo 'username = $FAKEUSER' >> $HGRCPATH
$ hg init usertest
$ cd usertest
@@ -97,7 +87,6 @@ username expansion
$ cd ..
$ hg showconfig
- bundle.mainreporoot=$TESTTMP
ui.username=$FAKEUSER
$ unset FAKEUSER
@@ -106,10 +95,10 @@ username expansion
showconfig with multiple arguments
- $ echo "[alias]" > $HGRC
- $ echo "log = log -g" >> $HGRC
- $ echo "[defaults]" >> $HGRC
- $ echo "identify = -n" >> $HGRC
+ $ echo "[alias]" > $HGRCPATH
+ $ echo "log = log -g" >> $HGRCPATH
+ $ echo "[defaults]" >> $HGRCPATH
+ $ echo "identify = -n" >> $HGRCPATH
$ hg showconfig alias defaults
alias.log=log -g
defaults.identify=-n
@@ -122,26 +111,27 @@ showconfig with multiple arguments
HGPLAIN
- $ echo "[ui]" > $HGRC
- $ echo "debug=true" >> $HGRC
- $ echo "fallbackencoding=ASCII" >> $HGRC
- $ echo "quiet=true" >> $HGRC
- $ echo "slash=true" >> $HGRC
- $ echo "traceback=true" >> $HGRC
- $ echo "verbose=true" >> $HGRC
- $ echo "style=~/.hgstyle" >> $HGRC
- $ echo "logtemplate={node}" >> $HGRC
- $ echo "[defaults]" >> $HGRC
- $ echo "identify=-n" >> $HGRC
- $ echo "[alias]" >> $HGRC
- $ echo "log=log -g" >> $HGRC
+ $ cd ..
+ $ p=`pwd`
+ $ echo "[ui]" > $HGRCPATH
+ $ echo "debug=true" >> $HGRCPATH
+ $ echo "fallbackencoding=ASCII" >> $HGRCPATH
+ $ echo "quiet=true" >> $HGRCPATH
+ $ echo "slash=true" >> $HGRCPATH
+ $ echo "traceback=true" >> $HGRCPATH
+ $ echo "verbose=true" >> $HGRCPATH
+ $ echo "style=~/.hgstyle" >> $HGRCPATH
+ $ echo "logtemplate={node}" >> $HGRCPATH
+ $ echo "[defaults]" >> $HGRCPATH
+ $ echo "identify=-n" >> $HGRCPATH
+ $ echo "[alias]" >> $HGRCPATH
+ $ echo "log=log -g" >> $HGRCPATH
customized hgrc
$ hg showconfig
read config from: $TESTTMP/hgrc
$TESTTMP/hgrc:13: alias.log=log -g
- none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:11: defaults.identify=-n
$TESTTMP/hgrc:2: ui.debug=true
$TESTTMP/hgrc:3: ui.fallbackencoding=ASCII
@@ -157,7 +147,6 @@ plain hgrc
$ HGPLAIN=; export HGPLAIN
$ hg showconfig --config ui.traceback=True --debug
read config from: $TESTTMP/hgrc
- none: bundle.mainreporoot=$TESTTMP
none: ui.traceback=True
none: ui.verbose=False
none: ui.debug=True
@@ -169,13 +158,12 @@ plain mode with exceptions
> def uisetup(ui):
> ui.write('plain: %r\n' % ui.plain())
> EOF
- $ echo "[extensions]" >> $HGRC
- $ echo "plain=./plain.py" >> $HGRC
+ $ echo "[extensions]" >> $HGRCPATH
+ $ echo "plain=./plain.py" >> $HGRCPATH
$ HGPLAINEXCEPT=; export HGPLAINEXCEPT
$ hg showconfig --config ui.traceback=True --debug
plain: True
read config from: $TESTTMP/hgrc
- none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:15: extensions.plain=./plain.py
none: ui.traceback=True
none: ui.verbose=False
@@ -185,7 +173,6 @@ plain mode with exceptions
$ hg showconfig --config ui.traceback=True --debug
plain: True
read config from: $TESTTMP/hgrc
- none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:15: extensions.plain=./plain.py
none: ui.traceback=True
none: ui.verbose=False
@@ -195,7 +182,6 @@ plain mode with exceptions
$ hg showconfig --config ui.traceback=True --debug
plain: True
read config from: $TESTTMP/hgrc
- none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:15: extensions.plain=./plain.py
none: ui.traceback=True
none: ui.verbose=False
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
index acf337e..ed07981 100644
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
An attempt at more fully testing the hgweb web interface.
The following things are tested elsewhere and are therefore omitted:
- archive, tested in test-archive
@@ -22,31 +20,13 @@ Set up the repo
$ echo another > foo
$ hg branch stable
marked working directory as branch stable
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -Ambranch
- $ hg branch unstable
- marked working directory as branch unstable
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Ambranch
- $ echo [graph] >> .hg/hgrc
- $ echo default.width = 3 >> .hg/hgrc
- $ echo stable.width = 3 >> .hg/hgrc
- $ echo stable.color = FF0000 >> .hg/hgrc
$ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
- $ hg log -G --template '{rev}:{node|short} {desc}\n'
- @ 3:ba87b23d29ca branch
- |
- o 2:1d22e65f027e branch
- |
- o 1:a4f92ed23982 Added tag 1.0 for changeset 2ef0ac749a14
- |
- o 0:2ef0ac749a14 base
-
Logs and changes
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/?style=atom'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -60,22 +40,6 @@ Logs and changes
<entry>
<title>branch</title>
- <id>http://*:$HGPORT/#changeset-ba87b23d29ca67a305625d81a20ac279c1e3f444</id> (glob)
- <link href="http://*:$HGPORT/rev/ba87b23d29ca"/> (glob)
- <author>
- <name>test</name>
- <email>&#116;&#101;&#115;&#116;</email>
- </author>
- <updated>1970-01-01T00:00:00+00:00</updated>
- <published>1970-01-01T00:00:00+00:00</published>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <pre xml:space="preserve">branch</pre>
- </div>
- </content>
- </entry>
- <entry>
- <title>branch</title>
<id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
<link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
<author>
@@ -124,7 +88,7 @@ Logs and changes
</entry>
</feed>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/?style=atom'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -138,22 +102,6 @@ Logs and changes
<entry>
<title>branch</title>
- <id>http://*:$HGPORT/#changeset-ba87b23d29ca67a305625d81a20ac279c1e3f444</id> (glob)
- <link href="http://*:$HGPORT/rev/ba87b23d29ca"/> (glob)
- <author>
- <name>test</name>
- <email>&#116;&#101;&#115;&#116;</email>
- </author>
- <updated>1970-01-01T00:00:00+00:00</updated>
- <published>1970-01-01T00:00:00+00:00</published>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <pre xml:space="preserve">branch</pre>
- </div>
- </content>
- </entry>
- <entry>
- <title>branch</title>
<id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
<link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
<author>
@@ -202,7 +150,7 @@ Logs and changes
</entry>
</feed>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/foo/?style=atom'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -230,7 +178,7 @@ Logs and changes
</entry>
</feed>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog/'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -257,14 +205,14 @@ Logs and changes
</div>
<ul>
<li class="active">log</li>
- <li><a href="/graph/ba87b23d29ca">graph</a></li>
+ <li><a href="/graph/1d22e65f027e">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
- <li><a href="/rev/ba87b23d29ca">changeset</a></li>
- <li><a href="/file/ba87b23d29ca">browse</a></li>
+ <li><a href="/rev/1d22e65f027e">changeset</a></li>
+ <li><a href="/file/1d22e65f027e">browse</a></li>
</ul>
<ul>
@@ -286,9 +234,9 @@ Logs and changes
</form>
<div class="navigate">
- <a href="/shortlog/3?revcount=30">less</a>
- <a href="/shortlog/3?revcount=120">more</a>
- | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
+ <a href="/shortlog/2?revcount=30">less</a>
+ <a href="/shortlog/2?revcount=120">more</a>
+ | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
</div>
<table class="bigtable">
@@ -298,22 +246,17 @@ Logs and changes
<th class="description">description</th>
</tr>
<tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
- <td class="description"><a href="/rev/ba87b23d29ca">branch</a><span class="branchhead">unstable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
+ <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
</tr>
<tr class="parity1">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
- <td class="author">test</td>
- <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> </td>
- </tr>
- <tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
</tr>
- <tr class="parity1">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <tr class="parity0">
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
</tr>
@@ -321,9 +264,9 @@ Logs and changes
</table>
<div class="navigate">
- <a href="/shortlog/3?revcount=30">less</a>
- <a href="/shortlog/3?revcount=120">more</a>
- | rev 3: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
+ <a href="/shortlog/2?revcount=30">less</a>
+ <a href="/shortlog/2?revcount=120">more</a>
+ | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
</div>
</div>
@@ -335,7 +278,7 @@ Logs and changes
</body>
</html>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/0/'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -396,7 +339,7 @@ Logs and changes
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td></tr>
<tr>
<th class="author">parents</th>
<td class="author"></td>
@@ -462,7 +405,7 @@ Logs and changes
</body>
</html>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/1/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
200 Script output follows
@@ -479,7 +422,7 @@ Logs and changes
@@ -0,0 +1,1 @@
+2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log?rev=base'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -533,7 +476,7 @@ Logs and changes
<th class="description">description</th>
</tr>
<tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
</tr>
@@ -557,11 +500,11 @@ Logs and changes
File-related
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/foo/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
200 Script output follows
foo
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'annotate/1/foo/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
200 Script output follows
@@ -570,7 +513,7 @@ File-related
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
200 Script output follows
@@ -579,7 +522,7 @@ File-related
-rw-r--r-- 4 foo
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/foo'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -614,7 +557,6 @@ File-related
<li class="active">file</li>
<li><a href="/file/tip/foo">latest</a></li>
<li><a href="/diff/a4f92ed23982/foo">diff</a></li>
- <li><a href="/comparison/a4f92ed23982/foo">comparison</a></li>
<li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
<li><a href="/log/a4f92ed23982/foo">file log</a></li>
<li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
@@ -644,7 +586,7 @@ File-related
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
<tr>
<th class="author">parents</th>
@@ -673,11 +615,11 @@ File-related
</body>
</html>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'filediff/0/foo/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
200 Script output follows
- diff -r 000000000000 -r 2ef0ac749a14 foo
+ diff -r 000000000000 -r a4f92ed23982 foo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/foo Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,1 @@
@@ -687,34 +629,24 @@ File-related
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'filediff/1/foo/?style=raw'
- 200 Script output follows
-
-
-
-
-
-
-
Overviews
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-tags'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
200 Script output follows
- tip ba87b23d29ca67a305625d81a20ac279c1e3f444
+ tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-branches'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
200 Script output follows
- unstable ba87b23d29ca67a305625d81a20ac279c1e3f444 open
- stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe inactive
+ stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open
default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-bookmarks'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-bookmarks'
200 Script output follows
anotherthing 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
- something ba87b23d29ca67a305625d81a20ac279c1e3f444
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'summary/?style=gitweb'
+ something 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -753,7 +685,7 @@ Overviews
<a href="/tags?style=gitweb">tags</a> |
<a href="/bookmarks?style=gitweb">bookmarks</a> |
<a href="/branches?style=gitweb">branches</a> |
- <a href="/file/ba87b23d29ca?style=gitweb">files</a> |
+ <a href="/file/1d22e65f027e?style=gitweb">files</a> |
<a href="/help?style=gitweb">help</a>
<br/>
</div>
@@ -769,26 +701,12 @@ Overviews
<table cellspacing="0">
<tr class="parity0">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
- <td><i>test</i></td>
- <td>
- <a class="list" href="/rev/ba87b23d29ca?style=gitweb">
- <b>branch</b>
- <span class="logtags"><span class="branchtag" title="unstable">unstable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="something">something</span> </span>
- </a>
- </td>
- <td class="link" nowrap>
- <a href="/rev/ba87b23d29ca?style=gitweb">changeset</a> |
- <a href="/file/ba87b23d29ca?style=gitweb">files</a>
- </td>
- </tr>
- <tr class="parity1">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><i>test</i></td>
<td>
<a class="list" href="/rev/1d22e65f027e?style=gitweb">
<b>branch</b>
- <span class="logtags"><span class="branchtag" title="stable">stable</span> </span>
+ <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="something">something</span> </span>
</a>
</td>
<td class="link" nowrap>
@@ -796,8 +714,8 @@ Overviews
<a href="/file/1d22e65f027e?style=gitweb">files</a>
</td>
</tr>
- <tr class="parity0">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <tr class="parity1">
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><i>test</i></td>
<td>
<a class="list" href="/rev/a4f92ed23982?style=gitweb">
@@ -810,8 +728,8 @@ Overviews
<a href="/file/a4f92ed23982?style=gitweb">files</a>
</td>
</tr>
- <tr class="parity1">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <tr class="parity0">
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><i>test</i></td>
<td>
<a class="list" href="/rev/2ef0ac749a14?style=gitweb">
@@ -831,7 +749,7 @@ Overviews
<table cellspacing="0">
<tr class="parity0">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
<td class="link">
<a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
@@ -846,7 +764,7 @@ Overviews
<table cellspacing="0">
<tr class="parity0">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td>
<td class="link">
<a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
@@ -855,32 +773,22 @@ Overviews
</td>
</tr>
<tr class="parity1">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
- <td><a class="list" href="/rev/ba87b23d29ca?style=gitweb"><b>something</b></a></td>
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
+ <td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td>
<td class="link">
- <a href="/rev/ba87b23d29ca?style=gitweb">changeset</a> |
- <a href="/log/ba87b23d29ca?style=gitweb">changelog</a> |
- <a href="/file/ba87b23d29ca?style=gitweb">files</a>
+ <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
+ <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
+ <a href="/file/1d22e65f027e?style=gitweb">files</a>
</td>
</tr>
<tr class="light"><td colspan="3"><a class="list" href="/bookmarks?style=gitweb">...</a></td></tr>
</table>
- <div><a class="title" href="/branches?style=gitweb">branches</a></div>
+ <div><a class="title" href="#">branches</a></div>
<table cellspacing="0">
<tr class="parity0">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
- <td><a class="list" href="/shortlog/ba87b23d29ca?style=gitweb"><b>ba87b23d29ca</b></a></td>
- <td class="">unstable</td>
- <td class="link">
- <a href="/changeset/ba87b23d29ca?style=gitweb">changeset</a> |
- <a href="/log/ba87b23d29ca?style=gitweb">changelog</a> |
- <a href="/file/ba87b23d29ca?style=gitweb">files</a>
- </td>
- </tr>
- <tr class="parity1">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
<td class="">stable</td>
<td class="link">
@@ -889,8 +797,8 @@ Overviews
<a href="/file/1d22e65f027e?style=gitweb">files</a>
</td>
</tr>
- <tr class="parity0">
- <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
+ <tr class="parity1">
+ <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
<td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
<td class="">default</td>
<td class="link">
@@ -900,7 +808,7 @@ Overviews
</td>
</tr>
<tr class="light">
- <td colspan="4"><a class="list" href="/branches?style=gitweb">...</a></td>
+ <td colspan="4"><a class="list" href="#">...</a></td>
</tr>
</table>
<script type="text/javascript">process_dates()</script>
@@ -916,7 +824,7 @@ Overviews
</body>
</html>
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/?style=gitweb'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -950,17 +858,17 @@ Overviews
<div class="page_nav">
<a href="/summary?style=gitweb">summary</a> |
<a href="/shortlog?style=gitweb">shortlog</a> |
- <a href="/log/3?style=gitweb">changelog</a> |
+ <a href="/log/2?style=gitweb">changelog</a> |
graph |
<a href="/tags?style=gitweb">tags</a> |
<a href="/bookmarks?style=gitweb">bookmarks</a> |
<a href="/branches?style=gitweb">branches</a> |
- <a href="/file/ba87b23d29ca?style=gitweb">files</a> |
+ <a href="/file/1d22e65f027e?style=gitweb">files</a> |
<a href="/help?style=gitweb">help</a>
<br/>
- <a href="/graph/3?style=gitweb&revcount=30">less</a>
- <a href="/graph/3?style=gitweb&revcount=120">more</a>
- | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
+ <a href="/graph/2?style=gitweb&revcount=30">less</a>
+ <a href="/graph/2?style=gitweb&revcount=120">more</a>
+ | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
</div>
<div class="title">&nbsp;</div>
@@ -969,17 +877,27 @@ Overviews
<div id="wrapper">
<ul id="nodebgs"></ul>
- <canvas id="graph" width="480" height="168"></canvas>
+ <canvas id="graph" width="480" height="129"></canvas>
<ul id="graphnodes"></ul>
</div>
<script>
<!-- hide script content
- var data = [["ba87b23d29ca", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
+ var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
var graph = new Graph();
graph.scale(39);
+ graph.edge = function(x0, y0, x1, y1, color) {
+
+ this.setColor(color, 0.0, 0.65);
+ this.ctx.beginPath();
+ this.ctx.moveTo(x0, y0);
+ this.ctx.lineTo(x1, y1);
+ this.ctx.stroke();
+
+ }
+
var revlink = '<li style="_STYLE"><span class="desc">';
revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
revlink += '</span> _TAGS';
@@ -1039,9 +957,9 @@ Overviews
</script>
<div class="page_nav">
- <a href="/graph/3?style=gitweb&revcount=30">less</a>
- <a href="/graph/3?style=gitweb&revcount=120">more</a>
- | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/tip?style=gitweb">tip</a>
+ <a href="/graph/2?style=gitweb&revcount=30">less</a>
+ <a href="/graph/2?style=gitweb&revcount=120">more</a>
+ | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
</div>
<script type="text/javascript">process_dates()</script>
@@ -1057,55 +975,6 @@ Overviews
</body>
</html>
-raw graph
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/?style=raw'
- 200 Script output follows
-
-
- # HG graph
- # Node ID ba87b23d29ca67a305625d81a20ac279c1e3f444
- # Rows shown 4
-
- changeset: ba87b23d29ca
- user: test
- date: 1970-01-01
- summary: branch
- branch: unstable
- tag: tip
- bookmark: something
-
- node: (0, 0) (color 1)
- edge: (0, 0) -> (0, 1) (color 1)
-
- changeset: 1d22e65f027e
- user: test
- date: 1970-01-01
- summary: branch
- branch: stable
-
- node: (0, 1) (color 1)
- edge: (0, 1) -> (0, 2) (color 1)
-
- changeset: a4f92ed23982
- user: test
- date: 1970-01-01
- summary: Added tag 1.0 for changeset 2ef0ac749a14
- branch: default
-
- node: (0, 2) (color 1)
- edge: (0, 2) -> (0, 3) (color 1)
-
- changeset: 2ef0ac749a14
- user: test
- date: 1970-01-01
- summary: base
- tag: 1.0
- bookmark: anotherthing
-
- node: (0, 3) (color 1)
-
-
capabilities
@@ -1119,7 +988,7 @@ heads
$ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
200 Script output follows
- ba87b23d29ca67a305625d81a20ac279c1e3f444
+ 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
branches
@@ -1133,11 +1002,10 @@ changegroup
$ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000'
200 Script output follows
- x\x9c\xbdTMHTQ\x14\x1e\xfc\xef\xd9&\x10\x11*x\x88\x81\x9aN\xf7\xddw\xdf{\xf7Y\x0efR\xb4\x11\xb1U\x82\xc5\xfd\x9d!c\x06\x9c'd\xa0\x99X\x82\x92i\xablUZ-*\x08\x84\x82\x02KkQ\xf8\x13\xe4\xaa\x8dn\x94\x906)\xd5B\x02\xeb\xbe\x9c\x01\x85\xc9\x996\x1d\xf8x\x97{\xefy\xe7;\xe7|\xe7\x06\x02\x81\xb1\xe0\xda\x13\xefN\xd1\xca\x8f\xcb-\xbde\xfc\xeepU\xecJ\xc3\xcd@\x86\x96\xc6\xb7^`\xe9"[H\xe4\x18T\x1a\x16p]\xc3\x96\x14\x13\xcbt\xa1tM\x0c\x1c\x0b2,M\xcd\x13qO\x03:\xd089"c1\xcd\x87FI\\\xa8\xbf|\xbc\xbf\x11\\p{_\xe5\xb6\xddn^j\xdd\xec\x0f=z\xb7\xb6\x94)\xebT\xbe\x89\xa3 (esc)
- \x1f6!6p\x00\xc4H`L\x18\x83\xdc\xa6\x8c\x0b\x84\x01\x06\x06s\xb84\x1cn2F4u\x19*\xd4*\x14\x04#a\x8f\x84\xe3\xfe^\xc8OS\xa1\xfc8\xe7\x82\xebj[7\x82@\x97\xb1v\x9dEH4,\xe2\xc2\xd3\xa1\x90\x800\x07\xb9\xc4@\xea\xee\xe4\xc1\xd2\xcf\xe7\xb3\xba[\xf2\xf6X\xdd]C\x1d\x05\xf3\x87\x1f,l\xeeBt\x87\xa5\xf2\xdd\x9e\x90*\xa9kC\xac"!\x17\x12)!c\x000\xd7\x05&\xb5\xa9\xc5\xa8-Ln (esc)
- \x0c|\xf2A\x85\x1a\x85bUy\x9d\xb6\x93(\x8b\xd4\xc4=B/\x8a?\rP'G\x15\x98B\xde\xd6\xa9Zy/\xfb'j+f\xc2\xe3\xb9\xb4\xf5\xea\x98\xf6\xa6sz\xf9{\xc3.\xa4vX*\xdf\x04\x0f\xff[\xb4\x8dGG4\xc1$\xe1:\xb9\xbaq\xf2\xeb\xa9\xfd\xebM\xa3\xc5?\x07\xce\xdc\xda\xc0\xf9\xcd\xef\xbf\xa5\xd3g\xd2\xd2\xa8\xa5uKu\x01(8$\xa6k@\x02(D\x16\x80\x00\x99\x82\x08\xa5\r\x81(t\\f`\xea\x02\xce\xb5\x7f\xba\xac\x02\x8c\\x\x98\x9f\xd5\xb7:0W\xdd6\xbf\xd2\xd3s\xa0k\xbd\xeb\xd8L\xa6 \xa5Q\x86\x91Pc\x80\x98\x8cB,L\x07#\x80\x04\x82\xb6\x8d)\xa3\x08X\x02\x00\xear\x0c-`b\x9b\x18>\xa1\x1b\xf9g\xe9@\xd1\xe9\xca_US{G\xb3\x9f?\x9b\x8d\xd6\x86zR\x91LE\xe8/\xdd& (esc)
- C
- \xd5~u\xb0e#\x08\r\x8c\xd5\xf83\x93\x01B\x95\xe8\x1c\x03\xdb\x92s*\x99`\xcc0\x88\xb4d\xb2\xbd\x85\xc9,\x14\xb7\xf1\xd9\xf2\xe5Ku\x8d\xf5rp\xb6\xee\\\xe0\xc5\xa7C\xd9\xd7\xefe\xda\xe94\xc5\xaa\xde>\x8a\x02I\xcb!\x16\xc1\x10"\x1b\x11\xe0\x02\xc8l\xe9H\x84\xb0\xf4\xa78\xc9-\xf1(\xa9\x15\x0f.\x8c\x8fT\x16\x965\xe9'\xbe\xac6\xaeLtN\x0f\x0e/fJ-\x8d\x08s\x12#\xe7[\xfe\xff\x0b\x17\xb9\xc6KK\xfa\xa2o\xa7\x1e\x87\xfaKb\x8b\xaf?\xcc\xed{z>\xd3\xb8\xbb\xcc}\x8eB\x01\x89\xc6\xbc\x88hO\xa6\x15\xf8\rr4\xb3\xe5 (no-eol) (esc)
+ x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 (esc)
+ 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\\n\xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee \xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk (esc)
+ \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3'\x859 (esc)
+ \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00 _\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc (no-eol) (esc)
stream_out
@@ -1157,7 +1025,7 @@ failing unbundle, requires POST request
Static files
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'static/style.css'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
200 Script output follows
a { text-decoration:none; }
@@ -1266,10 +1134,10 @@ Static files
top: -1px;
}
-Stop and restart with HGENCODING=cp932 and preferuncompressed
+Stop and restart with HGENCODING=cp932
$ "$TESTDIR/killdaemons.py"
- $ HGENCODING=cp932 hg serve --config server.preferuncompressed=True -n test \
+ $ HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \
> -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
@@ -1280,84 +1148,10 @@ commit message with Japanese Kanji 'Noh', which ends with '\x5c'
Graph json escape of multibyte character
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/' \
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
> | grep '^var data ='
- var data = [["548001d11f45", [0, 1], [[0, 0, 1, -1, ""]], "\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["ba87b23d29ca", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
-
-capabilities
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo
- 200 Script output follows
-
- lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream-preferred stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
-
-heads
+ var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
ERRORS ENCOUNTERED
$ cat errors.log
- $ "$TESTDIR/killdaemons.py"
-
- $ cd ..
-
-Test graph paging
-
- $ mkcommit() {
- > echo $1 >> a
- > hg ci -Am $1 a
- > }
-
- $ hg init graph
- $ cd graph
- $ mkcommit 0
- $ mkcommit 1
- $ mkcommit 2
- $ mkcommit 3
- $ mkcommit 4
- $ mkcommit 5
- $ hg serve --config server.uncompressed=False \
- > --config web.maxshortchanges=2 \
- > -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ hg log -G --template '{rev}:{node|short} {desc}\n'
- @ 5:aed2d9c1d0e7 5
- |
- o 4:b60a39a85a01 4
- |
- o 3:ada793dcc118 3
- |
- o 2:ab4f1438558b 2
- |
- o 1:e06180cbfb0c 1
- |
- o 0:b4e73ffab476 0
-
-
-Test paging
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \
- > 'graph/?style=raw' | grep changeset
- changeset: aed2d9c1d0e7
- changeset: b60a39a85a01
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \
- > 'graph/?style=raw&revcount=3' | grep changeset
- changeset: aed2d9c1d0e7
- changeset: b60a39a85a01
- changeset: ada793dcc118
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \
- > 'graph/e06180cbfb0?style=raw&revcount=3' | grep changeset
- changeset: ab4f1438558b
- changeset: e06180cbfb0c
- changeset: b4e73ffab476
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT \
- > 'graph/b4e73ffab47?style=raw&revcount=3' | grep changeset
- changeset: ab4f1438558b
- changeset: e06180cbfb0c
- changeset: b4e73ffab476
-
- $ cat errors.log
-
- $ cd ..
diff --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t
index b97c018..db70cfd 100644
--- a/tests/test-hgweb-descend-empties.t
+++ b/tests/test-hgweb-descend-empties.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Test chains of near empty directories, terminating 3 different ways:
- a1: file at level 4 (deepest)
- b1: two dirs at level 3
@@ -29,7 +27,7 @@ Set up the repo
manifest with descending
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file'
+ $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -140,5 +138,3 @@ manifest with descending
$ cat errors.log
-
- $ cd ..
diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t
index f96f42b..6bb9d81 100644
--- a/tests/test-hgweb-diffs.t
+++ b/tests/test-hgweb-diffs.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
setting up repo
$ hg init test
@@ -12,22 +10,8 @@ setting up repo
change permissions for git diffs
- $ hg import -q --bypass - <<EOF
- > # HG changeset patch
- > # User test
- > # Date 0 0
- > b
- >
- > diff --git a/a b/a
- > old mode 100644
- > new mode 100755
- > diff --git a/b b/b
- > deleted file mode 100644
- > --- a/b
- > +++ /dev/null
- > @@ -1,1 +0,0 @@
- > -b
- > EOF
+ $ chmod 755 a
+ $ hg ci -Amb
set up hgweb
@@ -36,7 +20,7 @@ set up hgweb
revision
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -97,14 +81,14 @@ revision
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td></tr>
<tr>
<th class="author">parents</th>
<td class="author"></td>
</tr>
<tr>
<th class="author">children</th>
- <td class="author"> <a href="/rev/559edbd9ed20">559edbd9ed20</a></td>
+ <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
</tr>
<tr>
<th class="files">files</th>
@@ -166,7 +150,7 @@ revision
raw revision
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
200 Script output follows
@@ -191,7 +175,7 @@ raw revision
diff removed file
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/b'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -202,7 +186,7 @@ diff removed file
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
<script type="text/javascript" src="/static/mercurial.js"></script>
- <title>test: b diff</title>
+ <title>test: a diff</title>
</head>
<body>
@@ -213,24 +197,23 @@ diff removed file
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
- <li><a href="/shortlog/559edbd9ed20">log</a></li>
- <li><a href="/graph/559edbd9ed20">graph</a></li>
+ <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
+ <li><a href="/graph/78e4ebad7cdf">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
- <li><a href="/rev/559edbd9ed20">changeset</a></li>
- <li><a href="/file/559edbd9ed20">browse</a></li>
+ <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
+ <li><a href="/file/78e4ebad7cdf">browse</a></li>
</ul>
<ul>
- <li><a href="/file/559edbd9ed20/b">file</a></li>
- <li><a href="/file/tip/b">latest</a></li>
+ <li><a href="/file/78e4ebad7cdf/a">file</a></li>
+ <li><a href="/file/tip/a">latest</a></li>
<li class="active">diff</li>
- <li><a href="/comparison/559edbd9ed20/b">comparison</a></li>
- <li><a href="/annotate/559edbd9ed20/b">annotate</a></li>
- <li><a href="/log/559edbd9ed20/b">file log</a></li>
- <li><a href="/raw-file/559edbd9ed20/b">raw</a></li>
+ <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
+ <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
+ <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
</ul>
<ul>
<li><a href="/help">help</a></li>
@@ -239,7 +222,7 @@ diff removed file
<div class="main">
<h2><a href="/">test</a></h2>
- <h3>diff b @ 1:559edbd9ed20</h3>
+ <h3>diff a @ 1:78e4ebad7cdf</h3>
<form class="search" action="/log">
<p></p>
@@ -257,11 +240,11 @@ diff removed file
</tr>
<tr>
<th>date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
<tr>
<th>parents</th>
- <td><a href="/file/0cd96de13884/b">0cd96de13884</a> </td>
+ <td></td>
</tr>
<tr>
<th>children</th>
@@ -273,10 +256,10 @@ diff removed file
<div class="overflow">
<div class="sourcefirst"> line diff</div>
- <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/b Thu Jan 01 00:00:00 1970 +0000
- </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
- </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
- </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-b
+ <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+ </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
+ </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
+ </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
</span></pre></div>
</div>
</div>
@@ -297,7 +280,7 @@ set up hgweb with git diffs
revision
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -358,14 +341,14 @@ revision
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td></tr>
<tr>
<th class="author">parents</th>
<td class="author"></td>
</tr>
<tr>
<th class="author">children</th>
- <td class="author"> <a href="/rev/559edbd9ed20">559edbd9ed20</a></td>
+ <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
</tr>
<tr>
<th class="files">files</th>
@@ -429,7 +412,7 @@ revision
revision
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
200 Script output follows
@@ -456,7 +439,7 @@ revision
diff removed file
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/a'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -478,24 +461,23 @@ diff removed file
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
- <li><a href="/shortlog/559edbd9ed20">log</a></li>
- <li><a href="/graph/559edbd9ed20">graph</a></li>
+ <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
+ <li><a href="/graph/78e4ebad7cdf">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
- <li><a href="/rev/559edbd9ed20">changeset</a></li>
- <li><a href="/file/559edbd9ed20">browse</a></li>
+ <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
+ <li><a href="/file/78e4ebad7cdf">browse</a></li>
</ul>
<ul>
- <li><a href="/file/559edbd9ed20/a">file</a></li>
+ <li><a href="/file/78e4ebad7cdf/a">file</a></li>
<li><a href="/file/tip/a">latest</a></li>
<li class="active">diff</li>
- <li><a href="/comparison/559edbd9ed20/a">comparison</a></li>
- <li><a href="/annotate/559edbd9ed20/a">annotate</a></li>
- <li><a href="/log/559edbd9ed20/a">file log</a></li>
- <li><a href="/raw-file/559edbd9ed20/a">raw</a></li>
+ <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
+ <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
+ <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
</ul>
<ul>
<li><a href="/help">help</a></li>
@@ -504,7 +486,7 @@ diff removed file
<div class="main">
<h2><a href="/">test</a></h2>
- <h3>diff a @ 1:559edbd9ed20</h3>
+ <h3>diff a @ 1:78e4ebad7cdf</h3>
<form class="search" action="/log">
<p></p>
@@ -522,7 +504,7 @@ diff removed file
</tr>
<tr>
<th>date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
<tr>
<th>parents</th>
@@ -538,377 +520,12 @@ diff removed file
<div class="overflow">
<div class="sourcefirst"> line diff</div>
- <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> old mode 100644
- <a href="#l1.2" id="l1.2"> 1.2</a> new mode 100755
- </pre></div>
- </div>
- </div>
- </div>
-
- <script type="text/javascript">process_dates()</script>
-
-
- </body>
- </html>
-
-
-comparison new file
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/0/a'
- 200 Script output follows
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
- <head>
- <link rel="icon" href="/static/hgicon.png" type="image/png" />
- <meta name="robots" content="index, nofollow" />
- <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
- <script type="text/javascript" src="/static/mercurial.js"></script>
-
- <title>test: a comparison</title>
- </head>
- <body>
-
- <div class="container">
- <div class="menu">
- <div class="logo">
- <a href="http://mercurial.selenic.com/">
- <img src="/static/hglogo.png" alt="mercurial" /></a>
- </div>
- <ul>
- <li><a href="/shortlog/0cd96de13884">log</a></li>
- <li><a href="/graph/0cd96de13884">graph</a></li>
- <li><a href="/tags">tags</a></li>
- <li><a href="/bookmarks">bookmarks</a></li>
- <li><a href="/branches">branches</a></li>
- </ul>
- <ul>
- <li><a href="/rev/0cd96de13884">changeset</a></li>
- <li><a href="/file/0cd96de13884">browse</a></li>
- </ul>
- <ul>
- <li><a href="/file/0cd96de13884/a">file</a></li>
- <li><a href="/file/tip/a">latest</a></li>
- <li><a href="/diff/0cd96de13884/a">diff</a></li>
- <li class="active">comparison</li>
- <li><a href="/annotate/0cd96de13884/a">annotate</a></li>
- <li><a href="/log/0cd96de13884/a">file log</a></li>
- <li><a href="/raw-file/0cd96de13884/a">raw</a></li>
- </ul>
- <ul>
- <li><a href="/help">help</a></li>
- </ul>
- </div>
-
- <div class="main">
- <h2><a href="/">test</a></h2>
- <h3>comparison a @ 0:0cd96de13884</h3>
-
- <form class="search" action="/log">
- <p></p>
- <p><input name="rev" id="search1" type="text" size="30" /></p>
- <div id="hint">find changesets by author, revision,
- files, or words in the commit message</div>
- </form>
-
- <div class="description">a</div>
-
- <table id="changesetEntry">
- <tr>
- <th>author</th>
- <td>&#116;&#101;&#115;&#116;</td>
- </tr>
- <tr>
- <th>date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
- </tr>
- <tr>
- <th>parents</th>
- <td></td>
- </tr>
- <tr>
- <th>children</th>
- <td></td>
- </tr>
-
- </table>
-
- <div class="overflow">
- <div class="sourcefirst"> comparison</div>
- <div class="legend">
- <span class="legendinfo equal">equal</span>
- <span class="legendinfo delete">deleted</span>
- <span class="legendinfo insert">inserted</span>
- <span class="legendinfo replace">replaced</span>
- </div>
-
- <table class="bigtable">
- <thead class="header">
- <tr>
- <th>-1:000000000000</th>
- <th>0:b789fdd96dc2</th>
- </tr>
- </thead>
-
- <tbody class="block">
-
- <tr>
- <td class="source insert"><a href="#r1" id="r1"> </a> </td>
- <td class="source insert"><a href="#r1" id="r1"> 1</a> a</td>
- </tr>
- </tbody>
- </table>
-
- </div>
- </div>
- </div>
-
- <script type="text/javascript">process_dates()</script>
-
-
- </body>
- </html>
-
-
-comparison existing file
-
- $ hg up
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo a >> a
- $ hg ci -mc
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/tip/a'
- 200 Script output follows
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
- <head>
- <link rel="icon" href="/static/hgicon.png" type="image/png" />
- <meta name="robots" content="index, nofollow" />
- <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
- <script type="text/javascript" src="/static/mercurial.js"></script>
-
- <title>test: a comparison</title>
- </head>
- <body>
-
- <div class="container">
- <div class="menu">
- <div class="logo">
- <a href="http://mercurial.selenic.com/">
- <img src="/static/hglogo.png" alt="mercurial" /></a>
- </div>
- <ul>
- <li><a href="/shortlog/d73db4d812ff">log</a></li>
- <li><a href="/graph/d73db4d812ff">graph</a></li>
- <li><a href="/tags">tags</a></li>
- <li><a href="/bookmarks">bookmarks</a></li>
- <li><a href="/branches">branches</a></li>
- </ul>
- <ul>
- <li><a href="/rev/d73db4d812ff">changeset</a></li>
- <li><a href="/file/d73db4d812ff">browse</a></li>
- </ul>
- <ul>
- <li><a href="/file/d73db4d812ff/a">file</a></li>
- <li><a href="/file/tip/a">latest</a></li>
- <li><a href="/diff/d73db4d812ff/a">diff</a></li>
- <li class="active">comparison</li>
- <li><a href="/annotate/d73db4d812ff/a">annotate</a></li>
- <li><a href="/log/d73db4d812ff/a">file log</a></li>
- <li><a href="/raw-file/d73db4d812ff/a">raw</a></li>
- </ul>
- <ul>
- <li><a href="/help">help</a></li>
- </ul>
- </div>
-
- <div class="main">
- <h2><a href="/">test</a></h2>
- <h3>comparison a @ 2:d73db4d812ff</h3>
-
- <form class="search" action="/log">
- <p></p>
- <p><input name="rev" id="search1" type="text" size="30" /></p>
- <div id="hint">find changesets by author, revision,
- files, or words in the commit message</div>
- </form>
-
- <div class="description">c</div>
-
- <table id="changesetEntry">
- <tr>
- <th>author</th>
- <td>&#116;&#101;&#115;&#116;</td>
- </tr>
- <tr>
- <th>date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
- </tr>
- <tr>
- <th>parents</th>
- <td><a href="/file/0cd96de13884/a">0cd96de13884</a> </td>
- </tr>
- <tr>
- <th>children</th>
- <td></td>
- </tr>
-
- </table>
-
- <div class="overflow">
- <div class="sourcefirst"> comparison</div>
- <div class="legend">
- <span class="legendinfo equal">equal</span>
- <span class="legendinfo delete">deleted</span>
- <span class="legendinfo insert">inserted</span>
- <span class="legendinfo replace">replaced</span>
- </div>
-
- <table class="bigtable">
- <thead class="header">
- <tr>
- <th>0:b789fdd96dc2</th>
- <th>1:a80d06849b33</th>
- </tr>
- </thead>
-
- <tbody class="block">
-
- <tr>
- <td class="source equal"><a href="#l1r1" id="l1r1"> 1</a> a</td>
- <td class="source equal"><a href="#l1r1" id="l1r1"> 1</a> a</td>
- </tr>
- <tr>
- <td class="source insert"><a href="#r2" id="r2"> </a> </td>
- <td class="source insert"><a href="#r2" id="r2"> 2</a> a</td>
- </tr>
- </tbody>
- </table>
-
- </div>
- </div>
- </div>
-
- <script type="text/javascript">process_dates()</script>
-
-
- </body>
- </html>
-
-
-comparison removed file
-
- $ hg rm a
- $ hg ci -md
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'comparison/tip/a'
- 200 Script output follows
-
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
- <head>
- <link rel="icon" href="/static/hgicon.png" type="image/png" />
- <meta name="robots" content="index, nofollow" />
- <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
- <script type="text/javascript" src="/static/mercurial.js"></script>
-
- <title>test: a comparison</title>
- </head>
- <body>
-
- <div class="container">
- <div class="menu">
- <div class="logo">
- <a href="http://mercurial.selenic.com/">
- <img src="/static/hglogo.png" alt="mercurial" /></a>
- </div>
- <ul>
- <li><a href="/shortlog/20e80271eb7a">log</a></li>
- <li><a href="/graph/20e80271eb7a">graph</a></li>
- <li><a href="/tags">tags</a></li>
- <li><a href="/bookmarks">bookmarks</a></li>
- <li><a href="/branches">branches</a></li>
- </ul>
- <ul>
- <li><a href="/rev/20e80271eb7a">changeset</a></li>
- <li><a href="/file/20e80271eb7a">browse</a></li>
- </ul>
- <ul>
- <li><a href="/file/20e80271eb7a/a">file</a></li>
- <li><a href="/file/tip/a">latest</a></li>
- <li><a href="/diff/20e80271eb7a/a">diff</a></li>
- <li class="active">comparison</li>
- <li><a href="/annotate/20e80271eb7a/a">annotate</a></li>
- <li><a href="/log/20e80271eb7a/a">file log</a></li>
- <li><a href="/raw-file/20e80271eb7a/a">raw</a></li>
- </ul>
- <ul>
- <li><a href="/help">help</a></li>
- </ul>
- </div>
-
- <div class="main">
- <h2><a href="/">test</a></h2>
- <h3>comparison a @ 3:20e80271eb7a</h3>
-
- <form class="search" action="/log">
- <p></p>
- <p><input name="rev" id="search1" type="text" size="30" /></p>
- <div id="hint">find changesets by author, revision,
- files, or words in the commit message</div>
- </form>
-
- <div class="description">d</div>
-
- <table id="changesetEntry">
- <tr>
- <th>author</th>
- <td>&#116;&#101;&#115;&#116;</td>
- </tr>
- <tr>
- <th>date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
- </tr>
- <tr>
- <th>parents</th>
- <td><a href="/file/0cd96de13884/a">0cd96de13884</a> </td>
- </tr>
- <tr>
- <th>children</th>
- <td></td>
- </tr>
-
- </table>
-
- <div class="overflow">
- <div class="sourcefirst"> comparison</div>
- <div class="legend">
- <span class="legendinfo equal">equal</span>
- <span class="legendinfo delete">deleted</span>
- <span class="legendinfo insert">inserted</span>
- <span class="legendinfo replace">replaced</span>
- </div>
-
- <table class="bigtable">
- <thead class="header">
- <tr>
- <th>1:a80d06849b33</th>
- <th>-1:000000000000</th>
- </tr>
- </thead>
-
- <tbody class="block">
-
- <tr>
- <td class="source delete"><a href="#l1" id="l1"> 1</a> a</td>
- <td class="source delete"><a href="#l1" id="l1"> </a> </td>
- </tr>
- <tr>
- <td class="source delete"><a href="#l2" id="l2"> 2</a> a</td>
- <td class="source delete"><a href="#l2" id="l2"> </a> </td>
- </tr>
- </tbody>
- </table>
-
+ <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755
+ <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
+ </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
+ </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
+ </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
+ </span></pre></div>
</div>
</div>
</div>
@@ -919,7 +536,6 @@ comparison removed file
</body>
</html>
-
$ cd ..
test import rev as raw-rev
@@ -932,55 +548,8 @@ test import rev as raw-rev
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd test1
- $ hg import -q --bypass --exact http://localhost:$HGPORT/rev/1
-
-raw revision with diff block numbers
-
- $ "$TESTDIR/killdaemons.py"
- $ cat <<EOF > .hg/hgrc
- > [web]
- > templates = rawdiff
- > EOF
- $ mkdir rawdiff
- $ cat <<EOF > rawdiff/map
- > mimetype = 'text/plain; charset={encoding}'
- > changeset = '{diff}'
- > difflineplus = '{line}'
- > difflineminus = '{line}'
- > difflineat = '{line}'
- > diffline = '{line}'
- > filenodelink = ''
- > filenolink = ''
- > fileline = '{line}'
- > diffblock = 'Block: {blockno}\n{lines}\n'
- > EOF
- $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0'
- 200 Script output follows
-
- Block: 1
- diff -r 000000000000 -r 0cd96de13884 a
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/a Thu Jan 01 00:00:00 1970 +0000
- @@ -0,0 +1,1 @@
- +a
-
- Block: 2
- diff -r 000000000000 -r 0cd96de13884 b
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/b Thu Jan 01 00:00:00 1970 +0000
- @@ -0,0 +1,1 @@
- +b
-
- $ "$TESTDIR/killdaemons.py"
- $ rm .hg/hgrc rawdiff/map
- $ rmdir rawdiff
- $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
- $ cat hg.pid >> $DAEMON_PIDS
+ $ hg import -q --exact http://localhost:$HGPORT/rev/1
errors
$ cat ../test/errors.log
-
- $ cd ..
diff --git a/tests/test-hgweb-empty.t b/tests/test-hgweb-empty.t
index 33d6cfd..010e55c 100644
--- a/tests/test-hgweb-empty.t
+++ b/tests/test-hgweb-empty.t
@@ -1,12 +1,10 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Some tests for hgweb in an empty repository
$ hg init test
$ cd test
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'shortlog')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/shortlog')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -91,7 +89,7 @@ Some tests for hgweb in an empty repository
</body>
</html>
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -176,7 +174,7 @@ Some tests for hgweb in an empty repository
</body>
</html>
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'graph')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/graph')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -250,6 +248,16 @@ Some tests for hgweb in an empty repository
var graph = new Graph();
graph.scale(39);
+ graph.edge = function(x0, y0, x1, y1, color) {
+
+ this.setColor(color, 0.0, 0.65);
+ this.ctx.beginPath();
+ this.ctx.moveTo(x0, y0);
+ this.ctx.lineTo(x1, y1);
+ this.ctx.stroke();
+
+ }
+
var revlink = '<li style="_STYLE"><span class="desc">';
revlink += '<a href="/rev/_NODEID" title="_NODEID">_DESC</a>';
revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
@@ -322,7 +330,7 @@ Some tests for hgweb in an empty repository
</body>
</html>
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -395,5 +403,3 @@ Some tests for hgweb in an empty repository
</body>
</html>
-
- $ cd ..
diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t
index 95d7f9e..c38dbae 100644
--- a/tests/test-hgweb-filelog.t
+++ b/tests/test-hgweb-filelog.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hg init test
$ cd test
@@ -109,7 +108,7 @@
tip - two revisions
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/tip/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -148,7 +147,6 @@ tip - two revisions
<ul>
<li><a href="/file/01de2d66a28d/a">file</a></li>
<li><a href="/diff/01de2d66a28d/a">diff</a></li>
- <li><a href="/comparison/01de2d66a28d/a">comparison</a></li>
<li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
<li class="active">file log</li>
<li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
@@ -181,12 +179,12 @@ tip - two revisions
<th class="description">description</th>
</tr>
<tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
</tr>
<tr class="parity1">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
</tr>
@@ -211,7 +209,7 @@ tip - two revisions
second version - two revisions
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/3/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -250,7 +248,6 @@ second version - two revisions
<ul>
<li><a href="/file/01de2d66a28d/a">file</a></li>
<li><a href="/diff/01de2d66a28d/a">diff</a></li>
- <li><a href="/comparison/01de2d66a28d/a">comparison</a></li>
<li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
<li class="active">file log</li>
<li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
@@ -283,12 +280,12 @@ second version - two revisions
<th class="description">description</th>
</tr>
<tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
</tr>
<tr class="parity1">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
</tr>
@@ -313,7 +310,7 @@ second version - two revisions
first deleted - one revision
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/2/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -352,7 +349,6 @@ first deleted - one revision
<ul>
<li><a href="/file/5ed941583260/a">file</a></li>
<li><a href="/diff/5ed941583260/a">diff</a></li>
- <li><a href="/comparison/5ed941583260/a">comparison</a></li>
<li><a href="/annotate/5ed941583260/a">annotate</a></li>
<li class="active">file log</li>
<li><a href="/raw-file/5ed941583260/a">raw</a></li>
@@ -385,7 +381,7 @@ first deleted - one revision
<th class="description">description</th>
</tr>
<tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
</tr>
@@ -410,7 +406,7 @@ first deleted - one revision
first version - one revision
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/1/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -449,7 +445,6 @@ first version - one revision
<ul>
<li><a href="/file/5ed941583260/a">file</a></li>
<li><a href="/diff/5ed941583260/a">diff</a></li>
- <li><a href="/comparison/5ed941583260/a">comparison</a></li>
<li><a href="/annotate/5ed941583260/a">annotate</a></li>
<li class="active">file log</li>
<li><a href="/raw-file/5ed941583260/a">raw</a></li>
@@ -482,7 +477,7 @@ first version - one revision
<th class="description">description</th>
</tr>
<tr class="parity0">
- <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
<td class="author">test</td>
<td class="description"><a href="/rev/5ed941583260">first a</a></td>
</tr>
@@ -507,7 +502,7 @@ first version - one revision
before addition - error
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/0/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
404 Not Found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -534,8 +529,6 @@ before addition - error
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
- </ul>
- <ul>
<li><a href="/help">help</a></li>
</ul>
</div>
@@ -573,7 +566,7 @@ before addition - error
should show base link, use spartan because it shows it
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/tip/c?style=spartan')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan')
200 Script output follows
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
@@ -611,7 +604,7 @@ should show base link, use spartan because it shows it
<table class="logEntry parity0">
<tr>
- <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
+ <th><span class="age">Thu Jan 01 00:00:00 1970 +0000</span>:</th>
<th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th>
</tr>
<tr>
@@ -629,14 +622,14 @@ should show base link, use spartan because it shows it
</tr>
<tr>
<th class="date">date:</th>
- <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
</table>
<table class="logEntry parity1">
<tr>
- <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
+ <th><span class="age">Thu Jan 01 00:00:00 1970 +0000</span>:</th>
<th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th>
</tr>
<tr>
@@ -662,7 +655,7 @@ should show base link, use spartan because it shows it
</tr>
<tr>
<th class="date">date:</th>
- <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
</table>
@@ -682,7 +675,7 @@ should show base link, use spartan because it shows it
rss log
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rss-log/tip/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rss-log/tip/a')
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -713,7 +706,7 @@ rss log
atom log
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'atom-log/tip/a')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/atom-log/tip/a')
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -761,5 +754,3 @@ atom log
errors
$ cat errors.log
-
- $ cd ..
diff --git a/tests/test-hgweb-no-path-info.t b/tests/test-hgweb-no-path-info.t
index dfcc571..7741d5e 100644
--- a/tests/test-hgweb-no-path-info.t
+++ b/tests/test-hgweb-no-path-info.t
@@ -105,5 +105,3 @@ should be used from d74fc8dec2b4 onward to route the request.
---- ERRORS
-
- $ cd ..
diff --git a/tests/test-hgweb-no-request-uri.t b/tests/test-hgweb-no-request-uri.t
index e6fb1f8..cc9fd00 100644
--- a/tests/test-hgweb-no-request-uri.t
+++ b/tests/test-hgweb-no-request-uri.t
@@ -139,5 +139,3 @@ should be used from d74fc8dec2b4 onward to route the request.
---- ERRORS
-
- $ cd ..
diff --git a/tests/test-hgweb-non-interactive.t b/tests/test-hgweb-non-interactive.t
index da04036..aab9e77 100644
--- a/tests/test-hgweb-non-interactive.t
+++ b/tests/test-hgweb-non-interactive.t
@@ -78,5 +78,3 @@ by the WSGI standard and strictly implemented by mod_wsgi.
[]
---- request.ENVIRON wsgi variables
['wsgi.errors', 'wsgi.input', 'wsgi.multiprocess', 'wsgi.multithread', 'wsgi.run_once', 'wsgi.url_scheme', 'wsgi.version']
-
- $ cd ..
diff --git a/tests/test-hgweb-raw.t b/tests/test-hgweb-raw.t
index b982ba3..fbe0b89 100644
--- a/tests/test-hgweb-raw.t
+++ b/tests/test-hgweb-raw.t
@@ -1,58 +1,57 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Test raw style of hgweb
$ hg init test
$ cd test
$ mkdir sub
- $ cat >'sub/some text%.txt' <<ENDSOME
+ $ cat >'sub/some "text".txt' <<ENDSOME
> This is just some random text
> that will go inside the file and take a few lines.
> It is very boring to read, but computers don't
> care about things like that.
> ENDSOME
- $ hg add 'sub/some text%.txt'
+ $ hg add 'sub/some "text".txt'
+ warning: filename contains '"', which is reserved on Windows: 'sub/some "text".txt'
$ hg commit -d "1 0" -m "Just some text"
$ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid
$ cat hg.pid >> $DAEMON_PIDS
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt
-
- $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done
-
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
+ $ sleep 5
+ $ kill `cat hg.pid`
+ $ sleep 1 # wait for server to scream and die
$ cat getoutput.txt
200 Script output follows
content-type: application/binary
content-length: 157
- content-disposition: inline; filename="some text%.txt"
+ content-disposition: inline; filename="some \"text\".txt"
This is just some random text
that will go inside the file and take a few lines.
It is very boring to read, but computers don't
care about things like that.
$ cat access.log error.log
- 127.0.0.1 - - [*] "GET /?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw HTTP/1.1" 200 - (glob)
+ 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob)
$ rm access.log error.log
$ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
> --config web.guessmime=True
$ cat hg.pid >> $DAEMON_PIDS
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt
- $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done
-
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
+ $ sleep 5
+ $ kill `cat hg.pid`
+ $ sleep 1 # wait for server to scream and die
$ cat getoutput.txt
200 Script output follows
content-type: text/plain; charset="ascii"
content-length: 157
- content-disposition: inline; filename="some text%.txt"
+ content-disposition: inline; filename="some \"text\".txt"
This is just some random text
that will go inside the file and take a few lines.
It is very boring to read, but computers don't
care about things like that.
$ cat access.log error.log
- 127.0.0.1 - - [*] "GET /?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw HTTP/1.1" 200 - (glob)
+ 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob)
- $ cd ..
diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t
index d96997c..745427e 100644
--- a/tests/test-hgweb-removed.t
+++ b/tests/test-hgweb-removed.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
setting up repo
$ hg init test
@@ -17,7 +15,7 @@ set up hgweb
revision
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/tip'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -78,7 +76,7 @@ revision
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td></tr>
<tr>
<th class="author">parents</th>
<td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td>
@@ -135,7 +133,7 @@ revision
diff removed file
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/a'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -171,7 +169,6 @@ diff removed file
<li><a href="/file/c78f6c5cbea9/a">file</a></li>
<li><a href="/file/tip/a">latest</a></li>
<li class="active">diff</li>
- <li><a href="/comparison/c78f6c5cbea9/a">comparison</a></li>
<li><a href="/annotate/c78f6c5cbea9/a">annotate</a></li>
<li><a href="/log/c78f6c5cbea9/a">file log</a></li>
<li><a href="/raw-file/c78f6c5cbea9/a">raw</a></li>
@@ -201,7 +198,7 @@ diff removed file
</tr>
<tr>
<th>date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
<tr>
<th>parents</th>
@@ -232,5 +229,3 @@ diff removed file
</body>
</html>
-
- $ cd ..
diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t
index e8846a3..5a8a1e4 100644
--- a/tests/test-hgweb.t
+++ b/tests/test-hgweb.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Some tests for hgweb. Tests static files, plain files and different 404's.
$ hg init test
@@ -15,7 +13,7 @@ Some tests for hgweb. Tests static files, plain files and different 404's.
manifest
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=raw')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
200 Script output follows
@@ -23,7 +21,7 @@ manifest
-rw-r--r-- 4 foo
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/da?style=raw')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
200 Script output follows
@@ -33,14 +31,14 @@ manifest
plain file
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/foo?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw'
200 Script output follows
foo
should give a 404 - static file that does not exist
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'static/bogus'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus'
404 Not Found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -67,8 +65,6 @@ should give a 404 - static file that does not exist
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
- </ul>
- <ul>
<li><a href="/help">help</a></li>
</ul>
</div>
@@ -106,7 +102,7 @@ should give a 404 - static file that does not exist
should give a 404 - bad revision
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/spam/foo?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw'
404 Not Found
@@ -115,7 +111,7 @@ should give a 404 - bad revision
should give a 400 - bad command
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/foo?cmd=spam&style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw'
400* (glob)
@@ -124,13 +120,13 @@ should give a 400 - bad command
should give a 404 - file does not exist
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/bork?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
404 Not Found
error: bork@2ef0ac749a14: not found in manifest
[1]
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/bork'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork'
404 Not Found
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -157,8 +153,6 @@ should give a 404 - file does not exist
<li><a href="/tags">tags</a></li>
<li><a href="/bookmarks">bookmarks</a></li>
<li><a href="/branches">branches</a></li>
- </ul>
- <ul>
<li><a href="/help">help</a></li>
</ul>
</div>
@@ -193,7 +187,7 @@ should give a 404 - file does not exist
</html>
[1]
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/bork?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
404 Not Found
@@ -202,7 +196,7 @@ should give a 404 - file does not exist
try bad style
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=foobar')
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar')
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -310,7 +304,7 @@ Test the access/error files are opened in append mode
static file
- $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT 'static/style-gitweb.css'
+ $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT '/static/style-gitweb.css'
200 Script output follows
body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
@@ -441,52 +435,9 @@ static file
top: -3px;
font-style: italic;
}
-
- /* Comparison */
- .legend {
- padding: 1.5% 0 1.5% 0;
- }
-
- .legendinfo {
- border: 1px solid #d9d8d1;
- font-size: 80%;
- text-align: center;
- padding: 0.5%;
- }
-
- .equal {
- background-color: #ffffff;
- }
-
- .delete {
- background-color: #faa;
- color: #333;
- }
-
- .insert {
- background-color: #ffa;
- }
-
- .replace {
- background-color: #e8e8e8;
- }
-
- .comparison {
- overflow-x: auto;
- }
-
- .header th {
- text-align: center;
- }
-
- .block {
- border-top: 1px solid #d9d8d1;
- }
304 Not Modified
errors
$ cat errors.log
-
- $ cd ..
diff --git a/tests/test-hgwebdir.t b/tests/test-hgwebdir.t
index 4e3a58b..f3d43fa 100644
--- a/tests/test-hgwebdir.t
+++ b/tests/test-hgwebdir.t
@@ -1,10 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
-hide outer repo and work in dir without '.hg'
- $ hg init
- $ mkdir dir
- $ cd dir
-
Tests some basic hgwebdir functionality. Tests setting up paths and
collection, different forms of 404s and the subdirectory support.
@@ -36,36 +29,12 @@ create a nested repository
$ hg --cwd c ci -Amc -d'3 0'
adding c
-create a subdirectory containing repositories and subrepositories
-
- $ mkdir notrepo
- $ cd notrepo
- $ hg init e
- $ echo e > e/e
- $ hg --cwd e ci -Ame -d'4 0'
- adding e
- $ hg init e/e2
- $ echo e2 > e/e2/e2
- $ hg --cwd e/e2 ci -Ame2 -d '4 0'
- adding e2
- $ hg init f
- $ echo f > f/f
- $ hg --cwd f ci -Amf -d'4 0'
- adding f
- $ hg init f/f2
- $ echo f2 > f/f2/f2
- $ hg --cwd f/f2 ci -Amf2 -d '4 0'
- adding f2
- $ cd ..
-
create repository without .hg/store
$ hg init nostore
$ rm -R nostore/.hg/store
$ root=`pwd`
$ cd ..
-
-serve
$ cat > paths.conf <<EOF
> [paths]
> a=$root/a
@@ -77,7 +46,7 @@ serve
should give a 404 - file does not exist
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/file/tip/bork?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/bork?style=raw'
404 Not Found
@@ -86,25 +55,25 @@ should give a 404 - file does not exist
should succeed
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
200 Script output follows
/a/
/b/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw'
200 Script output follows
a
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'b/file/tip/b?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
200 Script output follows
b
should give a 404 - repo is not published
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'c/file/tip/c?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
404 Not Found
@@ -113,14 +82,14 @@ should give a 404 - repo is not published
atom-log without basedir
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/atom-log' | grep '<link'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' | grep '<link'
<link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob)
<link rel="alternate" href="http://*:$HGPORT/a/"/> (glob)
<link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob)
rss-log without basedir
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/rss-log' | grep '<guid'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' | grep '<guid'
<guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob)
$ cat > paths.conf <<EOF
> [paths]
@@ -138,7 +107,7 @@ rss-log without basedir
should succeed, slashy names
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
200 Script output follows
@@ -148,36 +117,24 @@ should succeed, slashy names
/coll/a/.hg/patches/
/coll/b/
/coll/c/
- /coll/notrepo/e/
- /coll/notrepo/f/
/rcoll/a/
/rcoll/a/.hg/patches/
/rcoll/b/
/rcoll/b/d/
/rcoll/c/
- /rcoll/notrepo/e/
- /rcoll/notrepo/e/e2/
- /rcoll/notrepo/f/
- /rcoll/notrepo/f/f2/
/star/webdir/a/
/star/webdir/a/.hg/patches/
/star/webdir/b/
/star/webdir/c/
- /star/webdir/notrepo/e/
- /star/webdir/notrepo/f/
/starstar/webdir/a/
/starstar/webdir/a/.hg/patches/
/starstar/webdir/b/
/starstar/webdir/b/d/
/starstar/webdir/c/
- /starstar/webdir/notrepo/e/
- /starstar/webdir/notrepo/e/e2/
- /starstar/webdir/notrepo/f/
- /starstar/webdir/notrepo/f/f2/
/astar/
/astar/.hg/patches/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=paper'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -258,22 +215,6 @@ should succeed, slashy names
</tr>
<tr class="parity0">
- <td><a href="/coll/notrepo/e/?style=paper">coll/notrepo/e</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity1">
- <td><a href="/coll/notrepo/f/?style=paper">coll/notrepo/f</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity0">
<td><a href="/rcoll/a/?style=paper">rcoll/a</a></td>
<td>unknown</td>
<td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
@@ -314,38 +255,6 @@ should succeed, slashy names
</tr>
<tr class="parity1">
- <td><a href="/rcoll/notrepo/e/?style=paper">rcoll/notrepo/e</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity0">
- <td><a href="/rcoll/notrepo/e/e2/?style=paper">rcoll/notrepo/e/e2</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity1">
- <td><a href="/rcoll/notrepo/f/?style=paper">rcoll/notrepo/f</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity0">
- <td><a href="/rcoll/notrepo/f/f2/?style=paper">rcoll/notrepo/f/f2</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity1">
<td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td>
<td>unknown</td>
<td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
@@ -378,22 +287,6 @@ should succeed, slashy names
</tr>
<tr class="parity1">
- <td><a href="/star/webdir/notrepo/e/?style=paper">star/webdir/notrepo/e</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity0">
- <td><a href="/star/webdir/notrepo/f/?style=paper">star/webdir/notrepo/f</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity1">
<td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td>
<td>unknown</td>
<td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
@@ -434,38 +327,6 @@ should succeed, slashy names
</tr>
<tr class="parity0">
- <td><a href="/starstar/webdir/notrepo/e/?style=paper">starstar/webdir/notrepo/e</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity1">
- <td><a href="/starstar/webdir/notrepo/e/e2/?style=paper">starstar/webdir/notrepo/e/e2</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity0">
- <td><a href="/starstar/webdir/notrepo/f/?style=paper">starstar/webdir/notrepo/f</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity1">
- <td><a href="/starstar/webdir/notrepo/f/f2/?style=paper">starstar/webdir/notrepo/f/f2</a></td>
- <td>unknown</td>
- <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
- <td class="age">*</td> (glob)
- <td class="indexlinks"></td>
- </tr>
-
- <tr class="parity0">
<td><a href="/astar/?style=paper">astar</a></td>
<td>unknown</td>
<td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
@@ -490,19 +351,19 @@ should succeed, slashy names
</body>
</html>
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw'
200 Script output follows
/t/a/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
200 Script output follows
/t/a/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=paper'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -551,7 +412,7 @@ should succeed, slashy names
</body>
</html>
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a?style=atom'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -581,7 +442,7 @@ should succeed, slashy names
</entry>
</feed>
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a/?style=atom'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom'
200 Script output follows
<?xml version="1.0" encoding="ascii"?>
@@ -611,14 +472,14 @@ should succeed, slashy names
</entry>
</feed>
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/file/tip/a?style=raw'
200 Script output follows
a
Test [paths] '*' extension
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw'
200 Script output follows
@@ -626,60 +487,15 @@ Test [paths] '*' extension
/coll/a/.hg/patches/
/coll/b/
/coll/c/
- /coll/notrepo/e/
- /coll/notrepo/f/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
200 Script output follows
a
Test [paths] '**' extension
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw'
- 200 Script output follows
-
-
- /rcoll/a/
- /rcoll/a/.hg/patches/
- /rcoll/b/
- /rcoll/b/d/
- /rcoll/c/
- /rcoll/notrepo/e/
- /rcoll/notrepo/e/e2/
- /rcoll/notrepo/f/
- /rcoll/notrepo/f/f2/
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
- 200 Script output follows
-
- d
-
-Test collapse = True
-
- $ "$TESTDIR/killdaemons.py"
- $ cat >> paths.conf <<EOF
- > [web]
- > collapse=true
- > EOF
- $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
- > -A access-paths.log -E error-paths-3.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw'
- 200 Script output follows
-
-
- /coll/a/
- /coll/a/.hg/patches/
- /coll/b/
- /coll/c/
- /coll/notrepo/
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
- 200 Script output follows
-
- a
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
200 Script output follows
@@ -688,97 +504,12 @@ Test collapse = True
/rcoll/b/
/rcoll/b/d/
/rcoll/c/
- /rcoll/notrepo/
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
- 200 Script output follows
-
- d
-
-Test intermediate directories
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
- 200 Script output follows
-
-
- /rcoll/notrepo/e/
- /rcoll/notrepo/e/e2/
- /rcoll/notrepo/f/
- /rcoll/notrepo/f/f2/
-
-
-Test repositories inside intermediate directories
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw'
- 200 Script output follows
-
- e
-
-Test subrepositories inside intermediate directories
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw'
- 200 Script output follows
-
- f2
-
-Test descend = False
-
- $ "$TESTDIR/killdaemons.py"
- $ cat >> paths.conf <<EOF
- > descend=false
- > EOF
- $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
- > -A access-paths.log -E error-paths-4.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw'
- 200 Script output follows
-
-
- /coll/a/
- /coll/b/
- /coll/c/
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw'
- 200 Script output follows
-
- a
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw'
- 200 Script output follows
-
-
- /rcoll/a/
- /rcoll/b/
- /rcoll/c/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
200 Script output follows
d
-Test intermediate directories
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw'
- 200 Script output follows
-
-
- /rcoll/notrepo/e/
- /rcoll/notrepo/f/
-
-
-Test repositories inside intermediate directories
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw'
- 200 Script output follows
-
- e
-
-Test subrepositories inside intermediate directories
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw'
- 200 Script output follows
-
- f2
-
Test [paths] '*' in a repo root
$ hg id http://localhost:$HGPORT1/astar
@@ -790,67 +521,22 @@ Test [paths] '*' in a repo root
> t/a = $root/a
> t/b = $root/b
> c = $root/c
- > EOF
- $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
- > -A access-paths.log -E error-paths-5.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
- 200 Script output follows
-
-
- /t/a/
- /t/b/
- /c/
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
- 200 Script output follows
-
-
- /t/a/
- /t/b/
-
-
-Test collapse = True
-
- $ "$TESTDIR/killdaemons.py"
- $ cat >> paths.conf <<EOF
> [web]
- > collapse=true
+ > descend=false
> EOF
$ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
- > -A access-paths.log -E error-paths-6.log
+ > -A access-paths.log -E error-paths-3.log
$ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
- 200 Script output follows
-
-
- /t/
- /c/
-
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
- 200 Script output follows
-
-
- /t/a/
- /t/b/
-
test descend = False
- $ "$TESTDIR/killdaemons.py"
- $ cat >> paths.conf <<EOF
- > descend=false
- > EOF
- $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
- > -A access-paths.log -E error-paths-7.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
200 Script output follows
/c/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
200 Script output follows
@@ -864,12 +550,12 @@ test descend = False
> inexistent = $root/inexistent
> EOF
$ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
- > -A access-paths.log -E error-paths-8.log
+ > -A access-paths.log -E error-paths-4.log
$ cat hg.pid >> $DAEMON_PIDS
test inexistent and inaccessible repo should be ignored silently
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 ''
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/'
200 Script output follows
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
@@ -921,7 +607,7 @@ test inexistent and inaccessible repo should be ignored silently
collections: should succeed
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
200 Script output follows
@@ -929,32 +615,30 @@ collections: should succeed
/a/.hg/patches/
/b/
/c/
- /notrepo/e/
- /notrepo/f/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
200 Script output follows
a
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'b/file/tip/b?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
200 Script output follows
b
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'c/file/tip/c?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
200 Script output follows
c
atom-log with basedir /
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/atom-log' | grep '<link'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
<link rel="self" href="http://hg.example.com:8080/a/atom-log"/>
<link rel="alternate" href="http://hg.example.com:8080/a/"/>
<link href="http://hg.example.com:8080/a/rev/8580ff50825a"/>
rss-log with basedir /
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/rss-log' | grep '<guid'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
<guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid>
$ "$TESTDIR/killdaemons.py"
$ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \
@@ -964,14 +648,14 @@ rss-log with basedir /
atom-log with basedir /foo/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/atom-log' | grep '<link'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
<link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/>
<link rel="alternate" href="http://hg.example.com:8080/foo/a/"/>
<link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/>
rss-log with basedir /foo/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/rss-log' | grep '<guid'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
<guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid>
paths errors 1
@@ -986,26 +670,6 @@ paths errors 3
$ cat error-paths-3.log
-paths errors 4
-
- $ cat error-paths-4.log
-
-paths errors 5
-
- $ cat error-paths-5.log
-
-paths errors 6
-
- $ cat error-paths-6.log
-
-paths errors 7
-
- $ cat error-paths-7.log
-
-paths errors 8
-
- $ cat error-paths-8.log
-
collections errors
$ cat error-collections.log
diff --git a/tests/test-hgwebdirsym.t b/tests/test-hgwebdirsym.t
index ee479e2..be4385b 100644
--- a/tests/test-hgwebdirsym.t
+++ b/tests/test-hgwebdirsym.t
@@ -1,10 +1,6 @@
Tests whether or not hgwebdir properly handles various symlink topologies.
- $ "$TESTDIR/hghave" serve symlink || exit 80
-
-hide outer repo
- $ hg init
-
+ $ "$TESTDIR/hghave" symlink || exit 80
$ hg init a
$ echo a > a/a
$ hg --cwd a ci -Ama -d'1 0'
@@ -33,7 +29,7 @@ hide outer repo
should succeed
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
200 Script output follows
@@ -41,34 +37,34 @@ should succeed
/b/
/c/
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'al/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/al/file/tip/a?style=raw'
200 Script output follows
a
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'b/file/tip/b?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
200 Script output follows
b
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'c/file/tip/c?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
200 Script output follows
c
should fail
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'circle/al/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/al/file/tip/a?style=raw'
404 Not Found
error: repository circle/al/file/tip/a not found
[1]
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'circle/b/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/b/file/tip/a?style=raw'
404 Not Found
error: repository circle/b/file/tip/a not found
[1]
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'circle/c/file/tip/a?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/c/file/tip/a?style=raw'
404 Not Found
diff --git a/tests/test-highlight.t b/tests/test-highlight.t
index 53ea7e1..7394e48 100644
--- a/tests/test-highlight.t
+++ b/tests/test-highlight.t
@@ -1,5 +1,5 @@
- $ "$TESTDIR/hghave" pygments serve || exit 80
+ $ "$TESTDIR/hghave" pygments || exit 80
$ cat <<EOF >> $HGRCPATH
> [extensions]
> highlight =
@@ -55,7 +55,7 @@ hg serve
hgweb filerevision, html
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py') \
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py') \
> | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
200 Script output follows
@@ -92,7 +92,6 @@ hgweb filerevision, html
<li class="active">file</li>
<li><a href="/file/tip/primes.py">latest</a></li>
<li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
- <li><a href="/comparison/853dcd4de2a6/primes.py">comparison</a></li>
<li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
<li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
<li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
@@ -122,7 +121,7 @@ hgweb filerevision, html
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
<tr>
<th class="author">parents</th>
@@ -184,7 +183,7 @@ hgweb filerevision, html
hgweb fileannotate, html
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py') \
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py') \
> | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mi\"/class=\"mf\"/g"
200 Script output follows
@@ -223,7 +222,6 @@ hgweb fileannotate, html
<li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
<li><a href="/file/tip/primes.py">latest</a></li>
<li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
- <li><a href="/comparison/853dcd4de2a6/primes.py">comparison</a></li>
<li class="active">annotate</li>
<li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
<li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
@@ -253,7 +251,7 @@ hgweb fileannotate, html
</tr>
<tr>
<th class="date">date</th>
- <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
+ <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
</tr>
<tr>
<th class="author">parents</th>
@@ -275,224 +273,224 @@ hgweb fileannotate, html
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l1"
+ <a href="/annotate/853dcd4de2a6/primes.py#1"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l2"
+ <a href="/annotate/853dcd4de2a6/primes.py#2"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l2" id="l2"> 2</a> </td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l3"
+ <a href="/annotate/853dcd4de2a6/primes.py#3"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l4"
+ <a href="/annotate/853dcd4de2a6/primes.py#4"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l4" id="l4"> 4</a> </td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l5"
+ <a href="/annotate/853dcd4de2a6/primes.py#5"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l6"
+ <a href="/annotate/853dcd4de2a6/primes.py#6"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l7"
+ <a href="/annotate/853dcd4de2a6/primes.py#7"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l8"
+ <a href="/annotate/853dcd4de2a6/primes.py#8"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l8" id="l8"> 8</a> </td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l9"
+ <a href="/annotate/853dcd4de2a6/primes.py#9"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l10"
+ <a href="/annotate/853dcd4de2a6/primes.py#10"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l10" id="l10"> 10</a> </td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l11"
+ <a href="/annotate/853dcd4de2a6/primes.py#11"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l12"
+ <a href="/annotate/853dcd4de2a6/primes.py#12"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l13"
+ <a href="/annotate/853dcd4de2a6/primes.py#13"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l14"
+ <a href="/annotate/853dcd4de2a6/primes.py#14"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l15"
+ <a href="/annotate/853dcd4de2a6/primes.py#15"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l16"
+ <a href="/annotate/853dcd4de2a6/primes.py#16"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l17"
+ <a href="/annotate/853dcd4de2a6/primes.py#17"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l18"
+ <a href="/annotate/853dcd4de2a6/primes.py#18"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mf">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l19"
+ <a href="/annotate/853dcd4de2a6/primes.py#19"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l20"
+ <a href="/annotate/853dcd4de2a6/primes.py#20"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l21"
+ <a href="/annotate/853dcd4de2a6/primes.py#21"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l21" id="l21"> 21</a> </td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l22"
+ <a href="/annotate/853dcd4de2a6/primes.py#22"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mf">2</span> <span class="o">==</span> <span class="mf">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l23"
+ <a href="/annotate/853dcd4de2a6/primes.py#23"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mf">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mf">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l24"
+ <a href="/annotate/853dcd4de2a6/primes.py#24"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l24" id="l24"> 24</a> </td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l25"
+ <a href="/annotate/853dcd4de2a6/primes.py#25"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l26"
+ <a href="/annotate/853dcd4de2a6/primes.py#26"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l27"
+ <a href="/annotate/853dcd4de2a6/primes.py#27"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l28"
+ <a href="/annotate/853dcd4de2a6/primes.py#28"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l29"
+ <a href="/annotate/853dcd4de2a6/primes.py#29"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l30"
+ <a href="/annotate/853dcd4de2a6/primes.py#30"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mf">10</span></td>
</tr>
<tr class="parity0">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l31"
+ <a href="/annotate/853dcd4de2a6/primes.py#31"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td>
</tr>
<tr class="parity1">
<td class="annotate">
- <a href="/annotate/853dcd4de2a6/primes.py#l32"
+ <a href="/annotate/853dcd4de2a6/primes.py#32"
title="853dcd4de2a6: a">test@0</a>
</td>
<td class="source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td>
@@ -511,7 +509,7 @@ hgweb fileannotate, html
hgweb fileannotate, raw
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py?style=raw') \
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py?style=raw') \
> | sed "s/test@//" > a
$ echo "200 Script output follows" > b
$ echo "" >> b
@@ -522,19 +520,23 @@ hgweb fileannotate, raw
$ echo "" >> b
$ echo "" >> b
$ diff -u b a
+ $ echo
+
hgweb filerevision, raw
- $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py?style=raw') \
+ $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py?style=raw') \
> > a
$ echo "200 Script output follows" > b
$ echo "" >> b
$ hg cat primes.py >> b
$ diff -u b a
+ $ echo
+
hgweb highlightcss friendly
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
$ head -n 4 out
200 Script output follows
@@ -561,7 +563,7 @@ hg serve again
hgweb highlightcss fruity
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
$ head -n 4 out
200 Script output follows
@@ -585,7 +587,7 @@ errors encountered
> cat hg.pid >> $DAEMON_PIDS
>
> echo % hgweb filerevision, html
- > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "file/tip/$2" \
+ > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \
> | grep '<div class="parity0 source">'
> echo % errors encountered
> cat errors.log
@@ -605,5 +607,3 @@ errors encountered
% hgweb filerevision, html
<div class="parity0 source"><a href="#l1" id="l1"> 1</a> ??</div>
% errors encountered
-
- $ cd ..
diff --git a/tests/test-histedit-bookmark-motion.t b/tests/test-histedit-bookmark-motion.t
deleted file mode 100644
index 8ab9907..0000000
--- a/tests/test-histedit-bookmark-motion.t
+++ /dev/null
@@ -1,187 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ hg init r
- $ cd r
-
- $ for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
-
- $ hg book -r 1 will-move-backwards
- $ hg book -r 2 two
- $ hg book -r 2 also-two
- $ hg book -r 3 three
- $ hg book -r 4 four
- $ hg book -r tip five
- $ hg log --graph
- @ changeset: 5:652413bf663e
- | bookmark: five
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | bookmark: four
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | bookmark: three
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | bookmark: also-two
- | bookmark: two
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | bookmark: will-move-backwards
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
- $ HGEDITOR=cat hg histedit 1
- pick d2ae7f538514 1 b
- pick 177f92b77385 2 c
- pick 055a42cdd887 3 d
- pick e860deea161a 4 e
- pick 652413bf663e 5 f
-
- # Edit history between d2ae7f538514 and 652413bf663e
- #
- # Commands:
- # p, pick = use commit
- # e, edit = use commit, but stop for amending
- # f, fold = use commit, but fold into previous commit (combines N and N-1)
- # d, drop = remove commit from history
- # m, mess = edit message without changing commit content
- #
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cat >> commands.txt <<EOF
- > pick 177f92b77385 2 c
- > drop d2ae7f538514 1 b
- > pick 055a42cdd887 3 d
- > fold e860deea161a 4 e
- > pick 652413bf663e 5 f
- > EOF
- $ hg histedit 1 --commands commands.txt --verbose | grep histedit
- histedit: Should update metadata for the following changes:
- histedit: 055a42cdd887 to ae467701c500
- histedit: moving bookmarks three
- histedit: 177f92b77385 to d36c0562f908
- histedit: moving bookmarks also-two, two
- histedit: 652413bf663e to 0efacef7cb48
- histedit: moving bookmarks five
- histedit: d2ae7f538514 to cb9a9f314b8b
- histedit: moving bookmarks will-move-backwards
- histedit: e860deea161a to ae467701c500
- histedit: moving bookmarks four
- saved backup bundle to $TESTTMP/r/.hg/strip-backup/d2ae7f538514-backup.hg (glob)
- saved backup bundle to $TESTTMP/r/.hg/strip-backup/34a9919932c1-backup.hg (glob)
- $ hg log --graph
- @ changeset: 3:0efacef7cb48
- | bookmark: five
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 2:ae467701c500
- | bookmark: four
- | bookmark: three
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 1:d36c0562f908
- | bookmark: also-two
- | bookmark: two
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 0:cb9a9f314b8b
- bookmark: will-move-backwards
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
- $ HGEDITOR=cat hg histedit 1
- pick d36c0562f908 1 c
- pick ae467701c500 2 d
- pick 0efacef7cb48 3 f
-
- # Edit history between d36c0562f908 and 0efacef7cb48
- #
- # Commands:
- # p, pick = use commit
- # e, edit = use commit, but stop for amending
- # f, fold = use commit, but fold into previous commit (combines N and N-1)
- # d, drop = remove commit from history
- # m, mess = edit message without changing commit content
- #
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cat > commands.txt << EOF
- > pick d36c0562f908 1 c
- > pick 0efacef7cb48 3 f
- > pick ae467701c500 2 d
- > EOF
- $ hg histedit 1 --commands commands.txt --verbose | grep histedit
- histedit: Should update metadata for the following changes:
- histedit: 0efacef7cb48 to 1be9c35b4cb2
- histedit: moving bookmarks five
- histedit: 0efacef7cb48 to 7c044e3e33a9
- histedit: ae467701c500 to 1be9c35b4cb2
- histedit: moving bookmarks four, three
- saved backup bundle to $TESTTMP/r/.hg/strip-backup/ae467701c500-backup.hg (glob)
-
-We expect 'five' to stay at tip, since the tipmost bookmark is most
-likely the useful signal.
-
- $ hg log --graph
- @ changeset: 3:1be9c35b4cb2
- | bookmark: five
- | bookmark: four
- | bookmark: three
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:7c044e3e33a9
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 1:d36c0562f908
- | bookmark: also-two
- | bookmark: two
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 0:cb9a9f314b8b
- bookmark: will-move-backwards
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
diff --git a/tests/test-histedit-commute.t b/tests/test-histedit-commute.t
deleted file mode 100644
index 7c1257b..0000000
--- a/tests/test-histedit-commute.t
+++ /dev/null
@@ -1,359 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick e860deea161a e
- > pick 652413bf663e f
- > pick 055a42cdd887 d
- > EOF
- $ initrepo ()
- > {
- > hg init r
- > cd r
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > }
-
- $ initrepo
-
-log before edit
- $ hg log --graph
- @ changeset: 5:652413bf663e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-show the edit commands offered
- $ HGEDITOR=cat hg histedit 177f92b77385
- pick 177f92b77385 2 c
- pick 055a42cdd887 3 d
- pick e860deea161a 4 e
- pick 652413bf663e 5 f
-
- # Edit history between 177f92b77385 and 652413bf663e
- #
- # Commands:
- # p, pick = use commit
- # e, edit = use commit, but stop for amending
- # f, fold = use commit, but fold into previous commit (combines N and N-1)
- # d, drop = remove commit from history
- # m, mess = edit message without changing commit content
- #
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-rules should end up in .hg/histedit-last-edit.txt:
- $ cat .hg/histedit-last-edit.txt
- pick 177f92b77385 c
- pick e860deea161a e
- pick 652413bf663e f
- pick 055a42cdd887 d
-
-log after edit
- $ hg log --graph
- @ changeset: 5:853c68da763f
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 4:26f6a030ae82
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 3:b069cc29fb22
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-put things back
-
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick 853c68da763f d
- > pick b069cc29fb22 e
- > pick 26f6a030ae82 f
- > EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
- $ hg log --graph
- @ changeset: 5:652413bf663e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-slightly different this time
-
- $ cat > $EDITED <<EOF
- > pick 055a42cdd887 d
- > pick 652413bf663e f
- > pick e860deea161a e
- > pick 177f92b77385 c
- > EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log --graph
- @ changeset: 5:99a62755c625
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 4:7c6fdd608667
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:c4f52e213402
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 2:bfe4a5a76b37
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-keep prevents stripping dead revs
- $ cat > $EDITED <<EOF
- > pick bfe4a5a76b37 d
- > pick c4f52e213402 f
- > pick 99a62755c625 c
- > pick 7c6fdd608667 e
- > EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit bfe4a5a76b37 --keep 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log --graph
- > cat > $EDITED <<EOF
- > pick 7c6fdd608667 e
- > pick 99a62755c625 c
- > EOF
- @ changeset: 7:99e266581538
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 6:5ad36efb0653
- | parent: 3:c4f52e213402
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- | o changeset: 5:99a62755c625
- | | user: test
- | | date: Thu Jan 01 00:00:00 1970 +0000
- | | summary: c
- | |
- | o changeset: 4:7c6fdd608667
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:c4f52e213402
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 2:bfe4a5a76b37
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-try with --rev
- $ hg histedit --commands "$EDITED" --rev -2 2>&1 | fixbundle
- abort: may not use changesets other than the ones listed
- $ hg log --graph
- @ changeset: 7:99e266581538
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 6:5ad36efb0653
- | parent: 3:c4f52e213402
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- | o changeset: 5:99a62755c625
- | | user: test
- | | date: Thu Jan 01 00:00:00 1970 +0000
- | | summary: c
- | |
- | o changeset: 4:7c6fdd608667
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:c4f52e213402
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 2:bfe4a5a76b37
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-should also work if a commit message is missing
- $ BUNDLE="$TESTDIR/missing-comment.hg"
- $ hg init missing
- $ cd missing
- $ hg unbundle $BUNDLE
- adding changesets
- adding manifests
- adding file changes
- added 3 changesets with 3 changes to 1 files
- (run 'hg update' to get a working copy)
- $ hg co tip
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg log --graph
- @ changeset: 2:bd22688093b3
- | tag: tip
- | user: Robert Altman <robert.altman@telventDTN.com>
- | date: Mon Nov 28 16:40:04 2011 +0000
- | summary: Update file.
- |
- o changeset: 1:3b3e956f9171
- | user: Robert Altman <robert.altman@telventDTN.com>
- | date: Mon Nov 28 16:37:57 2011 +0000
- |
- o changeset: 0:141947992243
- user: Robert Altman <robert.altman@telventDTN.com>
- date: Mon Nov 28 16:35:28 2011 +0000
- summary: Checked in text file
-
- $ hg histedit 0
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ..
diff --git a/tests/test-histedit-drop.t b/tests/test-histedit-drop.t
deleted file mode 100644
index f425263..0000000
--- a/tests/test-histedit-drop.t
+++ /dev/null
@@ -1,107 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > drop 177f92b77385 c
- > pick e860deea161a e
- > pick 652413bf663e f
- > pick 055a42cdd887 d
- > EOF
- $ initrepo ()
- > {
- > hg init r
- > cd r
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > }
-
- $ initrepo
-
-log before edit
- $ hg log --graph
- @ changeset: 5:652413bf663e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-log after edit
- $ hg log --graph
- @ changeset: 4:708943196e52
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 3:75cbdffecadb
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 2:493dc0964412
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-manifest after edit
- $ hg manifest
- a
- b
- d
- e
- f
-
- $ cd ..
diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t
deleted file mode 100644
index 0ebe620..0000000
--- a/tests/test-histedit-edit.t
+++ /dev/null
@@ -1,178 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick 055a42cdd887 d
- > edit e860deea161a e
- > pick 652413bf663e f
- > EOF
- $ initrepo ()
- > {
- > hg init r
- > cd r
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > }
-
- $ initrepo
-
-log before edit
- $ hg log --graph
- @ changeset: 5:652413bf663e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- abort: Make changes as needed, you may commit or record as needed now.
- When you are finished, run hg histedit --continue to resume.
-
-commit, then edit the revision
- $ hg ci -m 'wat'
- created new head
- $ echo a > e
- $ HGEDITOR='echo foobaz > ' hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
- $ hg log --graph
- @ changeset: 6:bf757c081cd0
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 5:d6b15fed32d4
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: foobaz
- |
- o changeset: 4:1a60820cd1f6
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: wat
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
- $ hg cat e
- a
-
- $ cat > $EDITED <<EOF
- > edit bf757c081cd0 f
- > EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- abort: Make changes as needed, you may commit or record as needed now.
- When you are finished, run hg histedit --continue to resume.
- $ hg status
- A f
- $ HGEDITOR='true' hg histedit --continue
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg status
-
-log after edit
- $ hg log --limit 1
- changeset: 6:bf757c081cd0
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: f
-
-
-say we'll change the message, but don't.
- $ cat > ../edit.sh <<EOF
- > cat "\$1" | sed s/pick/mess/ > tmp
- > mv tmp "\$1"
- > EOF
- $ HGEDITOR="sh ../edit.sh" hg histedit tip 2>&1 | fixbundle
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg status
- $ hg log --limit 1
- changeset: 6:bf757c081cd0
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: f
-
-
-modify the message
- $ cat > $EDITED <<EOF
- > mess bf757c081cd0 f
- > EOF
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit tip 2>&1 | fixbundle
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg status
- $ hg log --limit 1
- changeset: 6:0b16746f8e89
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: mess bf757c081cd0 f
-
-
-rollback should not work after a histedit
- $ hg rollback
- no rollback information available
- [1]
-
- $ cd ..
diff --git a/tests/test-histedit-fold-non-commute.t b/tests/test-histedit-fold-non-commute.t
deleted file mode 100644
index 502446b..0000000
--- a/tests/test-histedit-fold-non-commute.t
+++ /dev/null
@@ -1,147 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick 055a42cdd887 d
- > fold bfa474341cc9 does not commute with e
- > pick e860deea161a e
- > pick 652413bf663e f
- > EOF
- $ initrepo ()
- > {
- > hg init $1
- > cd $1
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > echo a >> e
- > hg ci -m 'does not commute with e'
- > cd ..
- > }
-
- $ initrepo r
- $ cd r
-
-log before edit
- $ hg log --graph
- @ changeset: 6:bfa474341cc9
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: does not commute with e
- |
- o changeset: 5:652413bf663e
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-fix up
- $ echo a > e
- $ hg add e
- $ cat > cat.py <<EOF
- > import sys
- > print open(sys.argv[1]).read()
- > print
- > print
- > EOF
- $ HGEDITOR="python cat.py" hg histedit --continue 2>&1 | fixbundle | grep -v '2 files removed'
- d
- ***
- does not commute with e
-
-
-
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- file e already exists
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-just continue this time
- $ hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-log after edit
- $ hg log --graph
- @ changeset: 4:f768fd60ca34
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 3:671efe372e33
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-contents of e
- $ hg cat e
- a
-
-manifest
- $ hg manifest
- a
- b
- c
- d
- e
- f
-
- $ cd ..
diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
deleted file mode 100644
index 645cbc2..0000000
--- a/tests/test-histedit-fold.t
+++ /dev/null
@@ -1,238 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick e860deea161a e
- > pick 652413bf663e f
- > fold 177f92b77385 c
- > pick 055a42cdd887 d
- > EOF
- $ initrepo ()
- > {
- > hg init r
- > cd r
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > }
-
- $ initrepo
-
-log before edit
- $ hg log --graph
- @ changeset: 5:652413bf663e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-log after edit
- $ hg log --graph
- @ changeset: 4:82b0c1ff1777
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 3:150aafb44a91
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: pick e860deea161a e
- |
- o changeset: 2:493dc0964412
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-post-fold manifest
- $ hg manifest
- a
- b
- c
- d
- e
- f
-
- $ cd ..
-
-folding and creating no new change doesn't break:
- $ mkdir fold-to-empty-test
- $ cd fold-to-empty-test
- $ hg init
- $ printf "1\n2\n3\n" > file
- $ hg add file
- $ hg commit -m '1+2+3'
- $ echo 4 >> file
- $ hg commit -m '+4'
- $ echo 5 >> file
- $ hg commit -m '+5'
- $ echo 6 >> file
- $ hg commit -m '+6'
- $ hg log --graph
- @ changeset: 3:251d831eeec5
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: +6
- |
- o changeset: 2:888f9082bf99
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: +5
- |
- o changeset: 1:617f94f13c0f
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: +4
- |
- o changeset: 0:0189ba417d34
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 1+2+3
-
-
- $ cat > editor.py <<EOF
- > import re, sys
- > rules = sys.argv[1]
- > data = open(rules).read()
- > data = re.sub(r'pick ([0-9a-f]{12} 2 \+5)', r'drop \1', data)
- > data = re.sub(r'pick ([0-9a-f]{12} 2 \+6)', r'fold \1', data)
- > open(rules, 'w').write(data)
- > EOF
-
- $ HGEDITOR='python editor.py' hg histedit 1
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- patching file file
- Hunk #1 FAILED at 2
- 1 out of 1 hunks FAILED -- saving rejects to file file.rej
- abort: Fix up the change and run hg histedit --continue
- [255]
-There were conflicts, but we'll continue without resolving. This
-should effectively drop the changes from +6.
- $ hg status
- ? editor.py
- ? file.rej
- $ hg histedit --continue
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/*-backup.hg (glob)
- $ hg log --graph
- @ changeset: 1:617f94f13c0f
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: +4
- |
- o changeset: 0:0189ba417d34
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: 1+2+3
-
-
- $ cd ..
-
-Test corner case where folded revision is separated from its parent by a
-dropped revision.
-
-
- $ hg init fold-with-dropped
- $ cd fold-with-dropped
- $ printf "1\n2\n3\n" > file
- $ hg commit -Am '1+2+3'
- adding file
- $ echo 4 >> file
- $ hg commit -m '+4'
- $ echo 5 >> file
- $ hg commit -m '+5'
- $ echo 6 >> file
- $ hg commit -m '+6'
- $ hg log -G --template '{rev}:{node|short} {desc|firstline}\n'
- @ 3:251d831eeec5 +6
- |
- o 2:888f9082bf99 +5
- |
- o 1:617f94f13c0f +4
- |
- o 0:0189ba417d34 1+2+3
-
- $ EDITED="$TESTTMP/editcommands"
- $ cat > $EDITED <<EOF
- > pick 617f94f13c0f 1 +4
- > drop 888f9082bf99 2 +5
- > fold 251d831eeec5 3 +6
- > EOF
- $ HGEDITOR="cat $EDITED >" hg histedit 1
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- patching file file
- Hunk #1 FAILED at 2
- 1 out of 1 hunks FAILED -- saving rejects to file file.rej
- abort: Fix up the change and run hg histedit --continue
- [255]
- $ echo 5 >> file
- $ hg commit -m '+5.2'
- created new head
- $ echo 6 >> file
- $ HGEDITOR=cat hg histedit --continue
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- +4
- ***
- +5.2
- ***
- +6
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/fold-with-dropped/.hg/strip-backup/617f94f13c0f-backup.hg (glob)
- $ cd ..
-
diff --git a/tests/test-histedit-no-change.t b/tests/test-histedit-no-change.t
deleted file mode 100644
index 6d9ce27..0000000
--- a/tests/test-histedit-no-change.t
+++ /dev/null
@@ -1,187 +0,0 @@
-test for old histedit issue #6:
-editing a changeset without any actual change would corrupt the repository
-
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ initrepo ()
- > {
- > dir="$1"
- > comment="$2"
- > if [ -n "${comment}" ]; then
- > echo % ${comment}
- > echo % ${comment} | sed 's:.:-:g'
- > fi
- > hg init ${dir}
- > cd ${dir}
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > cd ..
- > }
-
- $ geneditor ()
- > {
- > # generate an editor script for selecting changesets to be edited
- > choice=$1 # changesets that should be edited (using sed line ranges)
- > cat <<EOF | sed 's:^....::'
- > # editing the rules, replacing 'pick' with 'edit' for the chosen lines
- > sed '${choice}s:^pick:edit:' "\$1" > "\${1}.tmp"
- > mv "\${1}.tmp" "\$1"
- > # displaying the resulting rules, minus comments and empty lines
- > sed '/^#/d;/^$/d;s:^:| :' "\$1" >&2
- > EOF
- > }
-
- $ startediting ()
- > {
- > # begin an editing session
- > choice="$1" # changesets that should be edited
- > number="$2" # number of changesets considered (from tip)
- > comment="$3"
- > geneditor "${choice}" > edit.sh
- > echo % start editing the history ${comment}
- > HGEDITOR="sh ./edit.sh" hg histedit -- -${number} 2>&1 | fixbundle
- > }
-
- $ continueediting ()
- > {
- > # continue an edit already in progress
- > editor="$1" # message editor when finalizing editing
- > comment="$2"
- > echo % finalize changeset editing ${comment}
- > HGEDITOR=${editor} hg histedit --continue 2>&1 | fixbundle
- > }
-
- $ graphlog ()
- > {
- > comment="${1:-log}"
- > echo % "${comment}"
- > hg glog --template '{rev} {node} \"{desc|firstline}\"\n'
- > }
-
-
- $ initrepo r1 "test editing with no change"
- % test editing with no change
- -----------------------------
- $ cd r1
- $ graphlog "log before editing"
- % log before editing
- @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f"
- |
- o 4 e860deea161a2f77de56603b340ebbb4536308ae "e"
- |
- o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d"
- |
- o 2 177f92b773850b59254aa5e923436f921b55483b "c"
- |
- o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b"
- |
- o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a"
-
- $ startediting 2 3 "(not changing anything)" # edit the 2nd of 3 changesets
- % start editing the history (not changing anything)
- | pick 055a42cdd887 3 d
- | edit e860deea161a 4 e
- | pick 652413bf663e 5 f
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- abort: Make changes as needed, you may commit or record as needed now.
- When you are finished, run hg histedit --continue to resume.
- $ continueediting true "(leaving commit message unaltered)"
- % finalize changeset editing (leaving commit message unaltered)
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-check state of working copy
- $ hg id
- 652413bf663e tip
-
- $ graphlog "log after history editing"
- % log after history editing
- @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f"
- |
- o 4 e860deea161a2f77de56603b340ebbb4536308ae "e"
- |
- o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d"
- |
- o 2 177f92b773850b59254aa5e923436f921b55483b "c"
- |
- o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b"
- |
- o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a"
-
-
- $ cd ..
-
- $ initrepo r2 "test editing with no change, then abort"
- % test editing with no change, then abort
- -----------------------------------------
- $ cd r2
- $ graphlog "log before editing"
- % log before editing
- @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f"
- |
- o 4 e860deea161a2f77de56603b340ebbb4536308ae "e"
- |
- o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d"
- |
- o 2 177f92b773850b59254aa5e923436f921b55483b "c"
- |
- o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b"
- |
- o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a"
-
- $ startediting 1,2 3 "(not changing anything)" # edit the 1st two of 3 changesets
- % start editing the history (not changing anything)
- | edit 055a42cdd887 3 d
- | edit e860deea161a 4 e
- | pick 652413bf663e 5 f
- 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
- abort: Make changes as needed, you may commit or record as needed now.
- When you are finished, run hg histedit --continue to resume.
- $ continueediting true "(leaving commit message unaltered)"
- % finalize changeset editing (leaving commit message unaltered)
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- abort: Make changes as needed, you may commit or record as needed now.
- When you are finished, run hg histedit --continue to resume.
- $ graphlog "log after first edit"
- % log after first edit
- o 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f"
- |
- o 4 e860deea161a2f77de56603b340ebbb4536308ae "e"
- |
- @ 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d"
- |
- o 2 177f92b773850b59254aa5e923436f921b55483b "c"
- |
- o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b"
- |
- o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a"
-
-
-abort editing session
- $ hg histedit --abort 2>&1 | fixbundle
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
- $ graphlog "log after abort"
- % log after abort
- @ 5 652413bf663ef2a641cab26574e46d5f5a64a55a "f"
- |
- o 4 e860deea161a2f77de56603b340ebbb4536308ae "e"
- |
- o 3 055a42cdd88768532f9cf79daa407fc8d138de9b "d"
- |
- o 2 177f92b773850b59254aa5e923436f921b55483b "c"
- |
- o 1 d2ae7f538514cd87c17547b0de4cea71fe1af9fb "b"
- |
- o 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b "a"
-
-
- $ cd ..
diff --git a/tests/test-histedit-non-commute-abort.t b/tests/test-histedit-non-commute-abort.t
deleted file mode 100644
index 925a624..0000000
--- a/tests/test-histedit-non-commute-abort.t
+++ /dev/null
@@ -1,131 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick 055a42cdd887 d
- > pick bfa474341cc9 does not commute with e
- > pick e860deea161a e
- > pick 652413bf663e f
- > EOF
- $ initrepo ()
- > {
- > hg init r
- > cd r
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > echo a >> e
- > hg ci -m 'does not commute with e'
- > cd ..
- > }
-
- $ initrepo
- $ cd r
-
-log before edit
- $ hg log --graph
- @ changeset: 6:bfa474341cc9
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: does not commute with e
- |
- o changeset: 5:652413bf663e
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-fix up (pre abort)
- $ echo a > e
- $ hg add e
- $ hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- file e already exists
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-abort the edit
- $ hg histedit --abort 2>&1 | fixbundle
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-log after abort
- $ hg log --graph
- @ changeset: 6:bfa474341cc9
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: does not commute with e
- |
- o changeset: 5:652413bf663e
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
- $ cd ..
diff --git a/tests/test-histedit-non-commute.t b/tests/test-histedit-non-commute.t
deleted file mode 100644
index 31d6096..0000000
--- a/tests/test-histedit-non-commute.t
+++ /dev/null
@@ -1,244 +0,0 @@
- $ . "$TESTDIR/histedit-helpers.sh"
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ EDITED="$TESTTMP/editedhistory"
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick 055a42cdd887 d
- > pick bfa474341cc9 does not commute with e
- > pick e860deea161a e
- > pick 652413bf663e f
- > EOF
- $ initrepo ()
- > {
- > hg init $1
- > cd $1
- > for x in a b c d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > echo a >> e
- > hg ci -m 'does not commute with e'
- > cd ..
- > }
-
- $ initrepo r1
- $ cd r1
-
-log before edit
- $ hg log --graph
- @ changeset: 6:bfa474341cc9
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: does not commute with e
- |
- o changeset: 5:652413bf663e
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-abort the edit
- $ hg histedit --abort 2>&1 | fixbundle
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-
-second edit set
-
- $ hg log --graph
- @ changeset: 6:bfa474341cc9
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: does not commute with e
- |
- o changeset: 5:652413bf663e
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:e860deea161a
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-edit the history
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-fix up
- $ echo a > e
- $ hg add e
- $ hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- file e already exists
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
-just continue this time
- $ hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-log after edit
- $ hg log --graph
- @ changeset: 5:9ab84894b459
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:1fff3ae8199d
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: does not commute with e
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
-start over
-
- $ cd ..
-
- $ initrepo r2
- $ cd r2
- $ cat > $EDITED <<EOF
- > pick 177f92b77385 c
- > pick 055a42cdd887 d
- > mess bfa474341cc9 does not commute with e
- > pick e860deea161a e
- > pick 652413bf663e f
- > EOF
-
-edit the history, this time with a fold action
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-
- $ echo a > e
- $ hg add e
- $ HGEDITOR="cat \"$EDITED\" > " hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- file e already exists
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- abort: Fix up the change and run hg histedit --continue
-second edit also fails, but just continue
- $ hg histedit --continue 2>&1 | fixbundle
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-post message fix
- $ hg log --graph
- @ changeset: 5:6459970fb49b
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: f
- |
- o changeset: 4:556f27c874b0
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: pick 177f92b77385 c
- |
- o changeset: 3:055a42cdd887
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: d
- |
- o changeset: 2:177f92b77385
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: c
- |
- o changeset: 1:d2ae7f538514
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b
- |
- o changeset: 0:cb9a9f314b8b
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a
-
-
- $ cd ..
diff --git a/tests/test-histedit-outgoing.t b/tests/test-histedit-outgoing.t
deleted file mode 100644
index 8025891..0000000
--- a/tests/test-histedit-outgoing.t
+++ /dev/null
@@ -1,84 +0,0 @@
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
- $ initrepos ()
- > {
- > hg init r
- > cd r
- > for x in a b c ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > cd ..
- > hg clone r r2 | grep -v updating
- > cd r2
- > for x in d e f ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > cd ..
- > hg init r3
- > cd r3
- > for x in g h i ; do
- > echo $x > $x
- > hg add $x
- > hg ci -m $x
- > done
- > cd ..
- > }
-
- $ initrepos
- 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-show the edit commands offered by outgoing
- $ cd r2
- $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching
- pick 055a42cdd887 3 d
- pick e860deea161a 4 e
- pick 652413bf663e 5 f
-
- # Edit history between 055a42cdd887 and 652413bf663e
- #
- # Commands:
- # p, pick = use commit
- # e, edit = use commit, but stop for amending
- # f, fold = use commit, but fold into previous commit (combines N and N-1)
- # d, drop = remove commit from history
- # m, mess = edit message without changing commit content
- #
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ..
-
-show the error from unrelated repos
- $ cd r3
- $ HGEDITOR=cat hg histedit --outgoing ../r | grep -v comparing | grep -v searching
- abort: repository is unrelated
- [1]
- $ cd ..
-
-show the error from unrelated repos
- $ cd r3
- $ HGEDITOR=cat hg histedit --force --outgoing ../r
- comparing with ../r
- searching for changes
- warning: repository is unrelated
- pick 2a4042b45417 0 g
- pick 68c46b4927ce 1 h
- pick 51281e65ba79 2 i
-
- # Edit history between 2a4042b45417 and 51281e65ba79
- #
- # Commands:
- # p, pick = use commit
- # e, edit = use commit, but stop for amending
- # f, fold = use commit, but fold into previous commit (combines N and N-1)
- # d, drop = remove commit from history
- # m, mess = edit message without changing commit content
- #
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ..
diff --git a/tests/test-histedit-revspec.t b/tests/test-histedit-revspec.t
deleted file mode 100644
index 06601d3..0000000
--- a/tests/test-histedit-revspec.t
+++ /dev/null
@@ -1,62 +0,0 @@
-This test requires parentrevspec support in revsets, so check for that
-and skip the test if we're on an unusual hg that supports .t tests but
-not parentrevspec.
- $ python -c 'from mercurial import revset ; revset.methods["parentpost"]' || exit 80
-
-Enable extensions used by this test.
- $ cat >>$HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > histedit=
- > EOF
-
-Repo setup.
- $ hg init foo
- $ cd foo
- $ echo alpha >> alpha
- $ hg addr
- adding alpha
- $ hg ci -m one
- $ echo alpha >> alpha
- $ hg ci -m two
- $ echo alpha >> alpha
- $ hg ci -m three
- $ echo alpha >> alpha
- $ hg ci -m four
- $ echo alpha >> alpha
- $ hg ci -m five
-
- $ hg log --style compact --graph
- @ 4[tip] 08d98a8350f3 1970-01-01 00:00 +0000 test
- | five
- |
- o 3 c8e68270e35a 1970-01-01 00:00 +0000 test
- | four
- |
- o 2 eb57da33312f 1970-01-01 00:00 +0000 test
- | three
- |
- o 1 579e40513370 1970-01-01 00:00 +0000 test
- | two
- |
- o 0 6058cbb6cfd7 1970-01-01 00:00 +0000 test
- one
-
-
-Run a dummy edit to make sure we get tip^^ correctly via revsingle.
- $ HGEDITOR=cat hg histedit "tip^^"
- pick eb57da33312f 2 three
- pick c8e68270e35a 3 four
- pick 08d98a8350f3 4 five
-
- # Edit history between eb57da33312f and 08d98a8350f3
- #
- # Commands:
- # p, pick = use commit
- # e, edit = use commit, but stop for amending
- # f, fold = use commit, but fold into previous commit (combines N and N-1)
- # d, drop = remove commit from history
- # m, mess = edit message without changing commit content
- #
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
diff --git a/tests/test-hook.t b/tests/test-hook.t
index 8b0b12c..6d61f19 100644
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -2,25 +2,23 @@ commit hooks can see env vars
$ hg init a
$ cd a
- $ cat > .hg/hgrc <<EOF
- > [hooks]
- > commit = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" commit"
- > commit.b = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" commit.b"
- > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= python \"$TESTDIR/printenv.py\" precommit"
- > pretxncommit = sh -c "HG_LOCAL= HG_TAG= python \"$TESTDIR/printenv.py\" pretxncommit"
- > pretxncommit.tip = hg -q tip
- > pre-identify = python "$TESTDIR/printenv.py" pre-identify 1
- > pre-cat = python "$TESTDIR/printenv.py" pre-cat
- > post-cat = python "$TESTDIR/printenv.py" post-cat
- > EOF
+ $ echo "[hooks]" > .hg/hgrc
+ $ echo 'commit = unset HG_LOCAL HG_TAG; python "$TESTDIR"/printenv.py commit' >> .hg/hgrc
+ $ echo 'commit.b = unset HG_LOCAL HG_TAG; python "$TESTDIR"/printenv.py commit.b' >> .hg/hgrc
+ $ echo 'precommit = unset HG_LOCAL HG_NODE HG_TAG; python "$TESTDIR"/printenv.py precommit' >> .hg/hgrc
+ $ echo 'pretxncommit = unset HG_LOCAL HG_TAG; python "$TESTDIR"/printenv.py pretxncommit' >> .hg/hgrc
+ $ echo 'pretxncommit.tip = hg -q tip' >> .hg/hgrc
+ $ echo 'pre-identify = python "$TESTDIR"/printenv.py pre-identify 1' >> .hg/hgrc
+ $ echo 'pre-cat = python "$TESTDIR"/printenv.py pre-cat' >> .hg/hgrc
+ $ echo 'post-cat = python "$TESTDIR"/printenv.py post-cat' >> .hg/hgrc
$ echo a > a
$ hg add a
$ hg commit -m a
- precommit hook: HG_PARENT1=0000000000000000000000000000000000000000
- pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$TESTTMP/a
+ precommit hook: HG_PARENT1=0000000000000000000000000000000000000000
+ pretxncommit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000 HG_PENDING=$TESTTMP/a
0:cb9a9f314b8b
- commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
- commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
+ commit hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
+ commit.b hook: HG_NODE=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PARENT1=0000000000000000000000000000000000000000
$ hg clone . ../b
updating to branch default
@@ -29,118 +27,114 @@ commit hooks can see env vars
changegroup hooks can see env vars
- $ cat > .hg/hgrc <<EOF
- > [hooks]
- > prechangegroup = python "$TESTDIR/printenv.py" prechangegroup
- > changegroup = python "$TESTDIR/printenv.py" changegroup
- > incoming = python "$TESTDIR/printenv.py" incoming
- > EOF
+ $ echo '[hooks]' > .hg/hgrc
+ $ echo 'prechangegroup = python "$TESTDIR"/printenv.py prechangegroup' >> .hg/hgrc
+ $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
+ $ echo 'incoming = python "$TESTDIR"/printenv.py incoming' >> .hg/hgrc
pretxncommit and commit hooks can see both parents of merge
$ cd ../a
$ echo b >> a
$ hg commit -m a1 -d "1 0"
- precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
- pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
+ precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
+ pretxncommit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
1:ab228980c14d
- commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
- commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
+ commit hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
+ commit.b hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
$ hg update -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo b > b
$ hg add b
$ hg commit -m b -d '1 0'
- precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
- pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
+ precommit hook: HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
+ pretxncommit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b HG_PENDING=$TESTTMP/a
2:ee9deb46ab31
- commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
- commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
+ commit hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
+ commit.b hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT1=cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
created new head
$ hg merge 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg commit -m merge -d '2 0'
- precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
- pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$TESTTMP/a
+ precommit hook: HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
+ pretxncommit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd HG_PENDING=$TESTTMP/a
3:07f3376c1e65
- commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
- commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
+ commit hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
+ commit.b hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PARENT1=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_PARENT2=ab228980c14deea8b9555d91c9581127383e40fd
test generic hooks
$ hg id
- pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[]
+ pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'num': None, 'rev': '', 'tags': None} HG_PATS=[]
warning: pre-identify hook exited with status 1
[1]
$ hg cat b
- pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b']
+ pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b']
b
- post-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] HG_RESULT=0
+ post-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] HG_RESULT=0
$ cd ../b
$ hg pull ../a
pulling from ../a
searching for changes
- prechangegroup hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ prechangegroup hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a
adding changesets
adding manifests
adding file changes
added 3 changesets with 2 changes to 2 files
- changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a
- incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a
- incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a
- incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a
(run 'hg update' to get a working copy)
tag hooks can see env vars
$ cd ../a
- $ cat >> .hg/hgrc <<EOF
- > pretag = python "$TESTDIR/printenv.py" pretag
- > tag = sh -c "HG_PARENT1= HG_PARENT2= python \"$TESTDIR/printenv.py\" tag"
- > EOF
+ $ echo 'pretag = python "$TESTDIR"/printenv.py pretag' >> .hg/hgrc
+ $ echo 'tag = unset HG_PARENT1 HG_PARENT2; python "$TESTDIR"/printenv.py tag' >> .hg/hgrc
$ hg tag -d '3 0' a
- pretag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
- precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
- pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a
+ pretag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
+ precommit hook: HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
+ pretxncommit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2 HG_PENDING=$TESTTMP/a
4:539e4b31b6dc
- tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
- commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
- commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
+ commit hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
+ commit.b hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PARENT1=07f3376c1e655977439df2a814e3cc14b27abac2
+ tag hook: HG_LOCAL=0 HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_TAG=a
$ hg tag -l la
- pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
- tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
+ pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
+ tag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=la
pretag hook can forbid tagging
- $ echo "pretag.forbid = python \"$TESTDIR/printenv.py\" pretag.forbid 1" >> .hg/hgrc
+ $ echo 'pretag.forbid = python "$TESTDIR"/printenv.py pretag.forbid 1' >> .hg/hgrc
$ hg tag -d '4 0' fa
- pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
- pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
+ pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
+ pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa
abort: pretag.forbid hook exited with status 1
[255]
$ hg tag -l fla
- pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
- pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
+ pretag hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
+ pretag.forbid hook: HG_LOCAL=1 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fla
abort: pretag.forbid hook exited with status 1
[255]
pretxncommit hook can see changeset, can roll back txn, changeset no
more there after
- $ echo "pretxncommit.forbid0 = hg tip -q" >> .hg/hgrc
- $ echo "pretxncommit.forbid1 = python \"$TESTDIR/printenv.py\" pretxncommit.forbid 1" >> .hg/hgrc
+ $ echo 'pretxncommit.forbid0 = hg tip -q' >> .hg/hgrc
+ $ echo 'pretxncommit.forbid1 = python "$TESTDIR"/printenv.py pretxncommit.forbid 1' >> .hg/hgrc
$ echo z > z
$ hg add z
$ hg -q tip
4:539e4b31b6dc
$ hg commit -m 'fail' -d '4 0'
- precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
- pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
+ precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
+ pretxncommit hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
5:6f611f8018c1
5:6f611f8018c1
- pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
+ pretxncommit.forbid hook: HG_NODE=6f611f8018c10e827fee6bd2bc807f937e761567 HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/a
transaction abort!
rollback completed
abort: pretxncommit.forbid1 hook exited with status 1
@@ -150,10 +144,10 @@ more there after
precommit hook can prevent commit
- $ echo "precommit.forbid = python \"$TESTDIR/printenv.py\" precommit.forbid 1" >> .hg/hgrc
+ $ echo 'precommit.forbid = python "$TESTDIR"/printenv.py precommit.forbid 1' >> .hg/hgrc
$ hg commit -m 'fail' -d '4 0'
- precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
- precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
+ precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
+ precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10
abort: precommit.forbid hook exited with status 1
[255]
$ hg -q tip
@@ -161,22 +155,22 @@ precommit hook can prevent commit
preupdate hook can prevent update
- $ echo "preupdate = python \"$TESTDIR/printenv.py\" preupdate" >> .hg/hgrc
+ $ echo 'preupdate = python "$TESTDIR"/printenv.py preupdate' >> .hg/hgrc
$ hg update 1
- preupdate hook: HG_PARENT1=ab228980c14d
+ preupdate hook: HG_PARENT1=ab228980c14d
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
update hook
- $ echo "update = python \"$TESTDIR/printenv.py\" update" >> .hg/hgrc
+ $ echo 'update = python "$TESTDIR"/printenv.py update' >> .hg/hgrc
$ hg update
- preupdate hook: HG_PARENT1=539e4b31b6dc
- update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc
+ preupdate hook: HG_PARENT1=539e4b31b6dc
+ update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
pushkey hook
- $ echo "pushkey = python \"$TESTDIR/printenv.py\" pushkey" >> .hg/hgrc
+ $ echo 'pushkey = python "$TESTDIR"/printenv.py pushkey' >> .hg/hgrc
$ cd ../b
$ hg bookmark -r null foo
$ hg push -B foo ../a
@@ -184,51 +178,47 @@ pushkey hook
searching for changes
no changes found
exporting bookmark foo
- pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1
- [1]
+ pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1
$ cd ../a
listkeys hook
- $ echo "listkeys = python \"$TESTDIR/printenv.py\" listkeys" >> .hg/hgrc
+ $ echo 'listkeys = python "$TESTDIR"/printenv.py listkeys' >> .hg/hgrc
$ hg bookmark -r null bar
$ cd ../b
$ hg pull -B bar ../a
pulling from ../a
- listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
+ listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
no changes found
- listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
- listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
- adding remote bookmark bar
+ listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
importing bookmark bar
$ cd ../a
test that prepushkey can prevent incoming keys
- $ echo "prepushkey = python \"$TESTDIR/printenv.py\" prepushkey.forbid 1" >> .hg/hgrc
+ $ echo 'prepushkey = python "$TESTDIR"/printenv.py prepushkey.forbid 1' >> .hg/hgrc
$ cd ../b
$ hg bookmark -r null baz
$ hg push -B baz ../a
pushing to ../a
searching for changes
no changes found
- listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
- listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
- listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
+ listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
+ listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
exporting bookmark baz
- prepushkey.forbid hook: HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000
+ prepushkey.forbid hook: HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000
abort: prepushkey hook exited with status 1
[255]
$ cd ../a
test that prelistkeys can prevent listing keys
- $ echo "prelistkeys = python \"$TESTDIR/printenv.py\" prelistkeys.forbid 1" >> .hg/hgrc
+ $ echo 'prelistkeys = python "$TESTDIR"/printenv.py prelistkeys.forbid 1' >> .hg/hgrc
$ hg bookmark -r null quux
$ cd ../b
$ hg pull -B quux ../a
pulling from ../a
- prelistkeys.forbid hook: HG_NAMESPACE=bookmarks
+ prelistkeys.forbid hook: HG_NAMESPACE=bookmarks
abort: prelistkeys hook exited with status 1
[255]
$ cd ../a
@@ -238,25 +228,21 @@ prechangegroup hook can prevent incoming changes
$ cd ../b
$ hg -q tip
3:07f3376c1e65
- $ cat > .hg/hgrc <<EOF
- > [hooks]
- > prechangegroup.forbid = python "$TESTDIR/printenv.py" prechangegroup.forbid 1
- > EOF
+ $ echo '[hooks]' > .hg/hgrc
+ $ echo 'prechangegroup.forbid = python "$TESTDIR"/printenv.py prechangegroup.forbid 1' >> .hg/hgrc
$ hg pull ../a
pulling from ../a
searching for changes
- prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a
abort: prechangegroup.forbid hook exited with status 1
[255]
pretxnchangegroup hook can see incoming changes, can roll back txn,
incoming changes no longer there after
- $ cat > .hg/hgrc <<EOF
- > [hooks]
- > pretxnchangegroup.forbid0 = hg tip -q
- > pretxnchangegroup.forbid1 = python "$TESTDIR/printenv.py" pretxnchangegroup.forbid 1
- > EOF
+ $ echo '[hooks]' > .hg/hgrc
+ $ echo 'pretxnchangegroup.forbid0 = hg tip -q' >> .hg/hgrc
+ $ echo 'pretxnchangegroup.forbid1 = python "$TESTDIR"/printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc
$ hg pull ../a
pulling from ../a
searching for changes
@@ -265,7 +251,7 @@ incoming changes no longer there after
adding file changes
added 1 changesets with 1 changes to 1 files
4:539e4b31b6dc
- pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_URL=file:$TESTTMP/a
+ pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_URL=file:$TESTTMP/a
transaction abort!
rollback completed
abort: pretxnchangegroup.forbid1 hook exited with status 1
@@ -276,61 +262,56 @@ incoming changes no longer there after
outgoing hooks can see env vars
$ rm .hg/hgrc
- $ cat > ../a/.hg/hgrc <<EOF
- > [hooks]
- > preoutgoing = python "$TESTDIR/printenv.py" preoutgoing
- > outgoing = python "$TESTDIR/printenv.py" outgoing
- > EOF
+ $ echo '[hooks]' > ../a/.hg/hgrc
+ $ echo 'preoutgoing = python "$TESTDIR"/printenv.py preoutgoing' >> ../a/.hg/hgrc
+ $ echo 'outgoing = python "$TESTDIR"/printenv.py outgoing' >> ../a/.hg/hgrc
$ hg pull ../a
pulling from ../a
searching for changes
- preoutgoing hook: HG_SOURCE=pull
+ preoutgoing hook: HG_SOURCE=pull
adding changesets
- outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull
+ outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
- adding remote bookmark quux
(run 'hg update' to get a working copy)
$ hg rollback
repository tip rolled back to revision 3 (undo pull)
+ working directory now based on revision 0
preoutgoing hook can prevent outgoing changes
- $ echo "preoutgoing.forbid = python \"$TESTDIR/printenv.py\" preoutgoing.forbid 1" >> ../a/.hg/hgrc
+ $ echo 'preoutgoing.forbid = python "$TESTDIR"/printenv.py preoutgoing.forbid 1' >> ../a/.hg/hgrc
$ hg pull ../a
pulling from ../a
searching for changes
- preoutgoing hook: HG_SOURCE=pull
- preoutgoing.forbid hook: HG_SOURCE=pull
+ preoutgoing hook: HG_SOURCE=pull
+ preoutgoing.forbid hook: HG_SOURCE=pull
abort: preoutgoing.forbid hook exited with status 1
[255]
outgoing hooks work for local clones
$ cd ..
- $ cat > a/.hg/hgrc <<EOF
- > [hooks]
- > preoutgoing = python "$TESTDIR/printenv.py" preoutgoing
- > outgoing = python "$TESTDIR/printenv.py" outgoing
- > EOF
+ $ echo '[hooks]' > a/.hg/hgrc
+ $ echo 'preoutgoing = python "$TESTDIR"/printenv.py preoutgoing' >> a/.hg/hgrc
+ $ echo 'outgoing = python "$TESTDIR"/printenv.py outgoing' >> a/.hg/hgrc
$ hg clone a c
- preoutgoing hook: HG_SOURCE=clone
- outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone
+ preoutgoing hook: HG_SOURCE=clone
+ outgoing hook: HG_NODE=0000000000000000000000000000000000000000 HG_SOURCE=clone
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm -rf c
preoutgoing hook can prevent outgoing changes for local clones
- $ echo "preoutgoing.forbid = python \"$TESTDIR/printenv.py\" preoutgoing.forbid 1" >> a/.hg/hgrc
+ $ echo 'preoutgoing.forbid = python "$TESTDIR"/printenv.py preoutgoing.forbid 1' >> a/.hg/hgrc
$ hg clone a zzz
- preoutgoing hook: HG_SOURCE=clone
- preoutgoing.forbid hook: HG_SOURCE=clone
+ preoutgoing hook: HG_SOURCE=clone
+ preoutgoing.forbid hook: HG_SOURCE=clone
abort: preoutgoing.forbid hook exited with status 1
[255]
-
- $ cd "$TESTTMP/b"
+ $ cd b
$ cat > hooktests.py <<EOF
> from mercurial import util
@@ -368,20 +349,13 @@ preoutgoing hook can prevent outgoing changes for local clones
> def verbosehook(ui, **args):
> ui.note('verbose output from hook\n')
>
- > def printtags(ui, repo, **args):
- > print repo.tags().keys()
- >
> class container:
> unreachable = 1
> EOF
test python hooks
-#if windows
- $ PYTHONPATH="$TESTTMP/b;$PYTHONPATH"
-#else
- $ PYTHONPATH="$TESTTMP/b:$PYTHONPATH"
-#endif
+ $ PYTHONPATH="`pwd`:$PYTHONPATH"
$ export PYTHONPATH
$ echo '[hooks]' > ../a/.hg/hgrc
@@ -466,7 +440,6 @@ test python hooks
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
- adding remote bookmark quux
(run 'hg update' to get a working copy)
make sure --traceback works
@@ -528,20 +501,6 @@ test python hook configured with python:[file]:[hook] syntax
nothing changed
[1]
- $ echo '[hooks]' > .hg/hgrc
- $ echo "update.ne = python:`pwd`/nonexisting.py:testhook" >> .hg/hgrc
- $ echo "pre-identify.npmd = python:`pwd`/:no_python_module_dir" >> .hg/hgrc
-
- $ hg up null
- loading update.ne hook failed:
- abort: No such file or directory: $TESTTMP/d/repo/nonexisting.py
- [255]
-
- $ hg id
- loading pre-identify.npmd hook failed:
- abort: No module named repo!
- [255]
-
$ cd ../../b
make sure --traceback works on hook import failure
@@ -556,7 +515,7 @@ make sure --traceback works on hook import failure
$ echo 'precommit.importfail = python:importfail.whatever' >> .hg/hgrc
$ echo a >> a
- $ hg --traceback commit -ma 2>&1 | egrep -v '^( +File| [a-zA-Z(])'
+ $ hg --traceback commit -ma 2>&1 | egrep '^(exception|Traceback|ImportError)'
exception from first failed import attempt:
Traceback (most recent call last):
ImportError: No module named somebogusmodule
@@ -564,8 +523,6 @@ make sure --traceback works on hook import failure
Traceback (most recent call last):
ImportError: No module named hgext_importfail
Traceback (most recent call last):
- Abort: precommit.importfail hook is invalid (import of "importfail" failed)
- abort: precommit.importfail hook is invalid (import of "importfail" failed)
Issue1827: Hooks Update & Commit not completely post operation
@@ -592,53 +549,3 @@ that is passed to pre/post hooks
calling hook pre-identify: hooktests.verbosehook
verbose output from hook
cb9a9f314b8b
-
-Ensure hooks can be prioritized
-
- $ echo '[hooks]' > .hg/hgrc
- $ echo 'pre-identify.a = python:hooktests.verbosehook' >> .hg/hgrc
- $ echo 'pre-identify.b = python:hooktests.verbosehook' >> .hg/hgrc
- $ echo 'priority.pre-identify.b = 1' >> .hg/hgrc
- $ echo 'pre-identify.c = python:hooktests.verbosehook' >> .hg/hgrc
- $ hg id --verbose
- calling hook pre-identify.b: hooktests.verbosehook
- verbose output from hook
- calling hook pre-identify.a: hooktests.verbosehook
- verbose output from hook
- calling hook pre-identify.c: hooktests.verbosehook
- verbose output from hook
- cb9a9f314b8b
-
-new tags must be visible in pretxncommit (issue3210)
-
- $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc
- $ hg tag -f foo
- ['a', 'foo', 'tip']
-
-new commits must be visible in pretxnchangegroup (issue3428)
-
- $ cd ..
- $ hg init to
- $ echo '[hooks]' >> to/.hg/hgrc
- $ echo 'pretxnchangegroup = hg --traceback tip' >> to/.hg/hgrc
- $ echo a >> to/a
- $ hg --cwd to ci -Ama
- adding a
- $ hg clone to from
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo aa >> from/a
- $ hg --cwd from ci -mb
- $ hg --cwd from push
- pushing to $TESTTMP/to (glob)
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- changeset: 1:9836a07b9b9d
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: b
-
diff --git a/tests/test-http-branchmap.t b/tests/test-http-branchmap.t
index 1f0b95a..fd64c8d 100644
--- a/tests/test-http-branchmap.t
+++ b/tests/test-http-branchmap.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hgserve() {
> hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
@@ -7,7 +6,6 @@
$ hg init a
$ hg --encoding utf-8 -R a branch æ
marked working directory as branch \xc3\xa6 (esc)
- (branches are permanent and global, did you want a bookmark?)
$ echo foo > a/foo
$ hg -R a ci -Am foo
adding foo
diff --git a/tests/test-http-clone-r.t b/tests/test-http-clone-r.t
index 454fd3b..b3ff94e 100644
--- a/tests/test-http-clone-r.t
+++ b/tests/test-http-clone-r.t
@@ -1,10 +1,8 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
creating 'remote
$ hg init remote
$ cd remote
- $ hg unbundle "$TESTDIR/bundles/remote.hg"
+ $ hg unbundle $TESTDIR/bundles/remote.hg
adding changesets
adding manifests
adding file changes
diff --git a/tests/test-http-proxy.t b/tests/test-http-proxy.t
index a8d6890..b82a1df 100644
--- a/tests/test-http-proxy.t
+++ b/tests/test-http-proxy.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hg init a
$ cd a
@@ -8,9 +7,10 @@
$ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid >> $DAEMON_PIDS
$ cd ..
- $ "$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
- $ while [ ! -f proxy.pid ]; do sleep 0; done
+ $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
+ $ echo $! > proxy.pid)
$ cat proxy.pid >> $DAEMON_PIDS
+ $ sleep 2
url for proxy, stream
@@ -104,21 +104,17 @@ do not use the proxy if it is in the no list
* - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
- * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
- * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
- * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
- * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
* - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
diff --git a/tests/test-http.t b/tests/test-http.t
index 6c3f6b4..eb9b7df 100644
--- a/tests/test-http.t
+++ b/tests/test-http.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hg init test
$ cd test
@@ -17,15 +16,9 @@
Test server address cannot be reused
-#if windows
- $ hg serve -p $HGPORT1 2>&1
- abort: cannot start server at ':$HGPORT1': * (glob)
- [255]
-#else
$ hg serve -p $HGPORT1 2>&1
abort: cannot start server at ':$HGPORT1': Address already in use
[255]
-#endif
$ cd ..
$ cat hg1.pid hg2.pid >> $DAEMON_PIDS
@@ -99,7 +92,7 @@ pull
$ cd copy-pull
$ echo '[hooks]' >> .hg/hgrc
- $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
+ $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
$ hg pull
pulling from http://localhost:$HGPORT1/
searching for changes
@@ -107,7 +100,7 @@ pull
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
- changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/
+ changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/
(run 'hg update' to get a working copy)
$ cd ..
@@ -118,7 +111,6 @@ clone from invalid URL
[255]
test http authentication
-+ use the same server to test server side streaming preference
$ cd test
$ cat << EOT > userpass.py
@@ -134,8 +126,7 @@ test http authentication
> def extsetup():
> common.permhooks.insert(0, perform_authentication)
> EOT
- $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid \
- > --config server.preferuncompressed=True
+ $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid
$ cat pid >> $DAEMON_PIDS
$ hg id http://localhost:$HGPORT2/
@@ -157,13 +148,8 @@ test http authentication
5fed3813f7f5
$ hg id http://user@localhost:$HGPORT2/
5fed3813f7f5
- $ hg clone http://user:pass@localhost:$HGPORT2/ dest 2>&1
- streaming all changes
- 7 files to transfer, 916 bytes of data
- transferred * bytes in * seconds (*/sec) (glob)
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
+ $ hg id http://user:pass@localhost:$HGPORT2/
+ 5fed3813f7f5
$ hg id http://user2@localhost:$HGPORT2/
abort: http authorization required
[255]
@@ -176,10 +162,7 @@ test http authentication
clone of serve with repo in root and unserved subrepo (issue2970)
$ hg --cwd test init sub
- $ echo empty > test/sub/empty
- $ hg --cwd test/sub add empty
- $ hg --cwd test/sub commit -qm 'add empty'
- $ hg --cwd test/sub tag -r 0 something
+ $ hg --cwd test/sub tag something
$ echo sub = sub > test/.hgsub
$ hg --cwd test add .hgsub
$ hg --cwd test commit -qm 'add subrepo'
diff --git a/tests/test-https.t b/tests/test-https.t
index c702de8..4bf272d 100644
--- a/tests/test-https.t
+++ b/tests/test-https.t
@@ -1,6 +1,6 @@
Proper https client requires the built-in ssl from Python 2.6.
- $ "$TESTDIR/hghave" serve ssl || exit 80
+ $ "$TESTDIR/hghave" ssl || exit 80
Certificates created with:
printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
@@ -104,15 +104,9 @@ cacert not found
Test server address cannot be reused
-#if windows
- $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
- abort: cannot start server at ':$HGPORT': (glob)
- [255]
-#else
$ hg serve -p $HGPORT --certificate=$PRIV 2>&1
abort: cannot start server at ':$HGPORT': Address already in use
[255]
-#endif
$ cd ..
clone via pull
@@ -124,9 +118,9 @@ clone via pull
adding manifests
adding file changes
added 1 changesets with 4 changes to 4 files
- warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
$ hg verify -R copy-pull
checking changesets
checking manifests
@@ -143,7 +137,7 @@ pull without cacert
$ cd copy-pull
$ echo '[hooks]' >> .hg/hgrc
- $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
+ $ echo "changegroup = python '$TESTDIR'/printenv.py changegroup" >> .hg/hgrc
$ hg pull
warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
pulling from https://localhost:$HGPORT/
@@ -152,8 +146,8 @@ pull without cacert
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
+ changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
- changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
(run 'hg update' to get a working copy)
$ cd ..
@@ -186,8 +180,7 @@ variables in the filename
cacert mismatch
$ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
- abort: 127.0.0.1 certificate error: certificate is for localhost
- (configure hostfingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca or use --insecure to connect insecurely)
+ abort: 127.0.0.1 certificate error: certificate is for localhost (use --insecure to connect insecurely)
[255]
$ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure
warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
@@ -231,21 +224,22 @@ Fingerprints
- fails when cert doesn't match hostname (port is ignored)
$ hg -R copy-pull id https://localhost:$HGPORT1/
- abort: certificate for localhost has unexpected fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b
- (check hostfingerprint configuration)
+ abort: invalid certificate for localhost with fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b
[255]
- ignores that certificate doesn't match hostname
$ hg -R copy-pull id https://127.0.0.1:$HGPORT/
5fed3813f7f5
- $ while kill `cat hg1.pid` 2>/dev/null; do sleep 0; done
-
Prepare for connecting through proxy
- $ "$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log </dev/null 2>&1 &
- $ while [ ! -f proxy.pid ]; do sleep 0; done
+ $ kill `cat hg1.pid`
+ $ sleep 1
+
+ $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
+ $ echo $! > proxy.pid)
$ cat proxy.pid >> $DAEMON_PIDS
+ $ sleep 2
$ echo "[http_proxy]" >> copy-pull/.hg/hgrc
$ echo "always=True" >> copy-pull/.hg/hgrc
diff --git a/tests/test-hup.t b/tests/test-hup.t
index 9745643..12aeba7 100644
--- a/tests/test-hup.t
+++ b/tests/test-hup.t
@@ -1,28 +1,20 @@
Test hangup signal in the middle of transaction
- $ "$TESTDIR/hghave" serve fifo || exit 80
+ $ "$TESTDIR/hghave" fifo || exit 80
$ hg init
$ mkfifo p
- $ hg serve --stdio < p 1>out 2>&1 &
+ $ hg serve --stdio < p &
$ P=$!
-
-Do test while holding fifo open
-
- $ (
- > echo lock
- > echo addchangegroup
- > while [ ! -s .hg/store/journal ]; do sleep 0; done
- > kill -HUP $P
- > ) > p
-
- $ wait
- $ cat out
+ $ (echo lock; echo addchangegroup; sleep 5) > p &
+ $ Q=$!
+ $ sleep 3
0
0
adding changesets
+ $ kill -HUP $P
+ $ wait
transaction abort!
rollback completed
killed!
-
$ echo .hg/* .hg/store/*
- .hg/00changelog.i .hg/journal.bookmarks .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a .hg/store/journal.phaseroots
+ .hg/00changelog.i .hg/journal.bookmarks .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a
diff --git a/tests/test-i18n.t b/tests/test-i18n.t
index ec90fd0..f40d004 100644
--- a/tests/test-i18n.t
+++ b/tests/test-i18n.t
@@ -2,8 +2,6 @@ Translations are optional:
$ "$TESTDIR/hghave" gettext || exit 80
-#if no-outer-repo
-
Test that translations are compiled and installed correctly.
Default encoding in tests is "ascii" and the translation is encoded
@@ -24,17 +22,3 @@ Different encoding:
$ HGENCODING=Latin-1 LANGUAGE=pt_BR hg tip
abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc)
[255]
-
-#endif
-
-Test keyword search in translated help text:
-
- $ HGENCODING=UTF-8 LANGUAGE=de hg help -k blättern
- Topics:
-
- extensions Benutzung erweiterter Funktionen
-
- Erweiterungen:
-
- pager Verwendet einen externen Pager zum Bl\xc3\xa4ttern in der Ausgabe von Befehlen (esc)
-
diff --git a/tests/test-identify.t b/tests/test-identify.t
index 823badb..c0432cc 100644
--- a/tests/test-identify.t
+++ b/tests/test-identify.t
@@ -1,6 +1,4 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
-#if no-outer-repo
+ $ "$TESTDIR/hghave" no-outer-repo || exit 80
no repo
@@ -8,8 +6,6 @@ no repo
abort: there is no Mercurial repository here (.hg not found)
[255]
-#endif
-
create repo
$ hg init test
@@ -55,10 +51,8 @@ other local repo
$ cd ..
$ hg -R test id
cb9a9f314b8b+ tip
-#if no-outer-repo
$ hg id test
cb9a9f314b8b+ tip
-#endif
with remote http repo
@@ -117,8 +111,7 @@ Make sure we do not obscure unknown requires file entries (issue2649)
[255]
$ cd ..
-#if no-outer-repo
$ hg id test
abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
[255]
-#endif
+
diff --git a/tests/test-impexp-branch.t b/tests/test-impexp-branch.t
index c089a46..fbe9aac 100644
--- a/tests/test-impexp-branch.t
+++ b/tests/test-impexp-branch.t
@@ -1,6 +1,3 @@
- $ echo '[extensions]' >> $HGRCPATH
- $ echo 'mq =' >> $HGRCPATH
-
$ cat >findbranch.py <<EOF
> import re, sys
>
@@ -22,7 +19,6 @@
$ hg commit -m "No branch."
$ hg branch abranch
marked working directory as branch abranch
- (branches are permanent and global, did you want a bookmark?)
$ echo "Rev 2" >rev
$ hg commit -m "With branch."
@@ -58,16 +54,3 @@ Make sure import still works with branch information in patches.
applying ../r0.patch
$ hg import --exact ../r1.patch
applying ../r1.patch
-
-Test --exact and patch header separators (issue3356)
-
- $ hg strip --no-backup .
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- >>> import re
- >>> p = file('../r1.patch', 'rb').read()
- >>> p = re.sub(r'Parent\s+', 'Parent ', p)
- >>> file('../r1-ws.patch', 'wb').write(p)
- $ hg import --exact ../r1-ws.patch
- applying ../r1-ws.patch
-
- $ cd ..
diff --git a/tests/test-import-bypass.t b/tests/test-import-bypass.t
index bbee13b..7413ce2 100644
--- a/tests/test-import-bypass.t
+++ b/tests/test-import-bypass.t
@@ -16,7 +16,6 @@ Test --bypass with other options
$ echo a >> a
$ hg branch foo
marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Am changea
$ hg export . > ../test.diff
$ hg up null
@@ -62,7 +61,8 @@ Test --user, --date and --message
@ 0:07f494440405 test 0 0 - default - adda
$ hg rollback
- repository tip rolled back to revision 1 (undo import)
+ repository tip rolled back to revision 1 (undo commit)
+ working directory now based on revision 0
Test --import-branch
@@ -74,7 +74,8 @@ Test --import-branch
@ 0:07f494440405 test 0 0 - default - adda
$ hg rollback
- repository tip rolled back to revision 1 (undo import)
+ repository tip rolled back to revision 1 (undo commit)
+ working directory now based on revision 0
Test --strip
@@ -96,7 +97,8 @@ Test --strip
> EOF
applying patch from stdin
$ hg rollback
- repository tip rolled back to revision 1 (undo import)
+ repository tip rolled back to revision 1 (undo commit)
+ working directory now based on revision 0
Test unsupported combinations
@@ -109,15 +111,7 @@ Test unsupported combinations
Test commit editor
- $ cat > ../test.diff <<EOF
- > diff -r 07f494440405 -r 4e322f7ce8e3 a
- > --- a/a Thu Jan 01 00:00:00 1970 +0000
- > +++ b/a Thu Jan 01 00:00:00 1970 +0000
- > @@ -1,1 +1,2 @@
- > -a
- > +b
- > +c
- > EOF
+ $ hg diff -c 1 > ../test.diff
$ HGEDITOR=cat hg import --bypass ../test.diff
applying ../test.diff
@@ -144,7 +138,7 @@ Test patch.eol is handled
$ hg --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff
applying ../test.diff
$ shortlog
- o 3:c606edafba99 test 0 0 - default - test patch.eol
+ o 3:d7805b4d2cb3 test 0 0 - default - test patch.eol
|
@ 2:872023de769d test 0 0 - default - makeacrlf
|
@@ -180,6 +174,7 @@ Test applying multiple patches
$ hg import --bypass ../patch1.diff ../patch2.diff
applying ../patch1.diff
applying ../patch2.diff
+ applied 16581080145e
$ shortlog
o 3:bc8ca3f8a7c4 test 0 0 - default - addf
|
@@ -204,6 +199,7 @@ Test applying multiple patches with --exact
$ hg import --bypass --exact ../patch1.diff ../patch2.diff
applying ../patch1.diff
applying ../patch2.diff
+ applied 16581080145e
$ shortlog
o 3:d60cb8989666 test 0 0 - foo - addf
|
@@ -216,8 +212,6 @@ Test applying multiple patches with --exact
$ cd ..
-#if symlink execbit
-
Test complicated patch with --exact
$ hg init repo-exact
@@ -265,6 +259,3 @@ data. If not, diff both heads to debug it.
|
o 0:a0e19e636a43 test 0 0 - default - t
-#endif
-
- $ cd ..
diff --git a/tests/test-import-context.t b/tests/test-import-context.t
index 848cd41..befa54c 100644
--- a/tests/test-import-context.t
+++ b/tests/test-import-context.t
@@ -123,4 +123,3 @@ What's in a
$ python ../cat.py d
'A\nA\nA\nA\n'
- $ cd ..
diff --git a/tests/test-import-git.t b/tests/test-import-git.t
index caba23b..ca5462a 100644
--- a/tests/test-import-git.t
+++ b/tests/test-import-git.t
@@ -1,5 +1,5 @@
- $ hg init repo
- $ cd repo
+
+ $ hg init
New file:
@@ -40,19 +40,14 @@ chmod +x:
> EOF
applying patch from stdin
-#if execbit
$ hg tip -q
2:3a34410f282e
+
$ test -x new
- $ hg rollback -q
-#else
- $ hg tip -q
- 1:ab199dc869b5
-#endif
-Copy and removing x bit:
+Copy:
- $ hg import -f -d "1000000 0" -mcopy - <<EOF
+ $ hg import -d "1000000 0" -mcopy - <<EOF
> diff --git a/new b/copy
> old mode 100755
> new mode 100644
@@ -66,37 +61,15 @@ Copy and removing x bit:
> EOF
applying patch from stdin
- $ test -f copy
-#if execbit
- $ test ! -x copy
- $ test -x copyx
- $ hg tip -q
- 2:21dfaae65c71
-#else
$ hg tip -q
- 2:0efdaa8e3bf3
-#endif
-
- $ hg up -qCr1
- $ hg rollback -q
+ 3:37bacb7ca14d
-Copy (like above but independent of execbit):
-
- $ hg import -d "1000000 0" -mcopy - <<EOF
- > diff --git a/new b/copy
- > similarity index 100%
- > copy from new
- > copy to copy
- > diff --git a/new b/copyx
- > similarity index 100%
- > copy from new
- > copy to copyx
- > EOF
- applying patch from stdin
-
- $ hg tip -q
- 2:0efdaa8e3bf3
- $ test -f copy
+ $ if "$TESTDIR/hghave" -q execbit; then
+ > test -f copy -a ! -x copy || echo bad
+ > test -x copyx || echo bad
+ > else
+ > test -f copy || echo bad
+ > fi
$ cat copy
a
@@ -115,7 +88,7 @@ Rename:
applying patch from stdin
$ hg tip -q
- 3:b1f57753fad2
+ 4:47b81a94361d
$ hg locate
copyx
@@ -137,7 +110,7 @@ Delete:
applying patch from stdin
$ hg tip -q
- 4:1bd1da94b9b2
+ 5:d9b001d98336
$ hg locate
empty
@@ -164,7 +137,7 @@ Regular diff:
applying patch from stdin
$ hg tip -q
- 5:46fe99cb3035
+ 6:ebe901e7576b
Copy and modify:
@@ -187,7 +160,7 @@ Copy and modify:
applying patch from stdin
$ hg tip -q
- 6:ffeb3197c12d
+ 7:18f368958ecd
$ hg cat copy2
a
@@ -217,7 +190,7 @@ Rename and modify:
applying patch from stdin
$ hg tip -q
- 7:401aede9e6bb
+ 8:c32b0d7e6f44
$ hg locate copy2
[1]
@@ -241,10 +214,10 @@ One file renamed multiple times:
applying patch from stdin
$ hg tip -q
- 8:2ef727e684e8
+ 9:034a6bf95330
$ hg log -vr. --template '{rev} {files} / {file_copies}\n'
- 8 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
+ 9 rename2 rename3 rename3-2 / rename3 (rename2)rename3-2 (rename2)
$ hg locate rename2 rename3 rename3-2
rename3
@@ -285,7 +258,7 @@ Binary files and regular patch hunks:
applying patch from stdin
$ hg tip -q
- 10:27377172366e
+ 11:c39bce63e786
$ cat foo2
foo
@@ -314,7 +287,7 @@ Multiple binary files:
applying patch from stdin
$ hg tip -q
- 11:18b73a84b4ab
+ 12:30b530085242
$ hg manifest --debug | grep mbinary
045c85ba38952325e126c70962cc0f9d9077bc67 644 mbinary1
@@ -334,7 +307,7 @@ Filenames with spaces:
applying patch from stdin
$ hg tip -q
- 12:47500ce1614e
+ 13:04750ef42fb3
$ cat "foo bar"
foo
@@ -357,7 +330,7 @@ Copy then modify the original file:
applying patch from stdin
$ hg tip -q
- 13:6757efb07ea9
+ 14:c4cd9cdeaa74
$ cat foo3
foo
@@ -388,77 +361,6 @@ Move text file and patch as binary
A binary2
text2
R text2
-
-Invalid base85 content
-
- $ hg rollback
- repository tip rolled back to revision 14 (undo import)
- working directory now based on revision 14
- $ hg revert -aq
- $ hg import -d "1000000 0" -m invalid-binary - <<"EOF"
- > diff --git a/text2 b/binary2
- > rename from text2
- > rename to binary2
- > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
- > GIT binary patch
- > literal 5
- > Mc$`b*O.$Pw00T?_*Z=?k
- >
- > EOF
- applying patch from stdin
- abort: could not decode "binary2" binary patch: bad base85 character at position 6
- [255]
-
- $ hg revert -aq
- $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
- > diff --git a/text2 b/binary2
- > rename from text2
- > rename to binary2
- > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
- > GIT binary patch
- > literal 6
- > Mc$`b*O5$Pw00T?_*Z=?k
- >
- > EOF
- applying patch from stdin
- abort: "binary2" length is 5 bytes, should be 6
- [255]
-
- $ hg revert -aq
- $ hg import -d "1000000 0" -m rename-as-binary - <<"EOF"
- > diff --git a/text2 b/binary2
- > rename from text2
- > rename to binary2
- > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
- > GIT binary patch
- > Mc$`b*O5$Pw00T?_*Z=?k
- >
- > EOF
- applying patch from stdin
- abort: could not extract "binary2" binary data
- [255]
-
-Simulate a copy/paste turning LF into CRLF (issue2870)
-
- $ hg revert -aq
- $ cat > binary.diff <<"EOF"
- > diff --git a/text2 b/binary2
- > rename from text2
- > rename to binary2
- > index 78981922613b2afb6025042ff6bd878ac1994e85..10efcb362e9f3b3420fcfbfc0e37f3dc16e29757
- > GIT binary patch
- > literal 5
- > Mc$`b*O5$Pw00T?_*Z=?k
- >
- > EOF
- >>> fp = file('binary.diff', 'rb')
- >>> data = fp.read()
- >>> fp.close()
- >>> file('binary.diff', 'wb').write(data.replace('\n', '\r\n'))
- $ rm binary2
- $ hg import --no-commit binary.diff
- applying binary.diff
-
$ cd ..
Consecutive import with renames (issue2459)
@@ -499,23 +401,6 @@ Renames and strip
A b
a
R a
-
-Renames, similarity and git diff
-
- $ hg revert -aC
- undeleting a
- forgetting b
- $ rm b
- $ hg import --similarity 90 --no-commit - <<EOF
- > diff --git a/a b/b
- > rename from a
- > rename to b
- > EOF
- applying patch from stdin
- $ hg st --copies
- A b
- a
- R a
$ cd ..
Pure copy with existing destination
@@ -558,8 +443,6 @@ Copy and changes with existing destination
$ cat b
b
-#if symlink
-
$ ln -s b linkb
$ hg add linkb
$ hg ci -m addlinkb
@@ -582,30 +465,4 @@ Copy and changes with existing destination
? b.rej
? linkb.rej
-#endif
-
-Test corner case involving copies and multiple hunks (issue3384)
-
- $ hg revert -qa
- $ hg import --no-commit - <<EOF
- > diff --git a/a b/c
- > copy from a
- > copy to c
- > --- a/a
- > +++ b/c
- > @@ -1,1 +1,2 @@
- > a
- > +a
- > @@ -2,1 +2,2 @@
- > a
- > +a
- > diff --git a/a b/a
- > --- a/a
- > +++ b/a
- > @@ -1,1 +1,2 @@
- > a
- > +b
- > EOF
- applying patch from stdin
-
$ cd ..
diff --git a/tests/test-import-merge.t b/tests/test-import-merge.t
deleted file mode 100644
index 924f076..0000000
--- a/tests/test-import-merge.t
+++ /dev/null
@@ -1,115 +0,0 @@
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "mq=" >> $HGRCPATH
-
- $ tipparents() {
- > hg parents --template "{rev}:{node|short} {desc|firstline}\n" -r tip
- > }
-
-Test import and merge diffs
-
- $ hg init repo
- $ cd repo
- $ echo a > a
- $ hg ci -Am adda
- adding a
- $ echo a >> a
- $ hg ci -m changea
- $ echo c > c
- $ hg ci -Am addc
- adding c
- $ hg up 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo b > b
- $ hg ci -Am addb
- adding b
- created new head
- $ hg up 1
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg merge 3
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m merge
- $ hg export . > ../merge.diff
- $ cd ..
- $ hg clone -r2 repo repo2
- adding changesets
- adding manifests
- adding file changes
- added 3 changesets with 3 changes to 2 files
- updating to branch default
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd repo2
- $ hg pull -r3 ../repo
- pulling from ../repo
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
-
-Test without --exact and diff.p1 == workingdir.p1
-
- $ hg up 1
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg import ../merge.diff
- applying ../merge.diff
- $ tipparents
- 1:540395c44225 changea
- 3:102a90ea7b4a addb
- $ hg strip --no-backup tip
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
-Test without --exact and diff.p1 != workingdir.p1
-
- $ hg up 2
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg import ../merge.diff
- applying ../merge.diff
- $ tipparents
- 2:890ecaa90481 addc
- $ hg strip --no-backup tip
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
-Test with --exact
-
- $ hg import --exact ../merge.diff
- applying ../merge.diff
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ tipparents
- 1:540395c44225 changea
- 3:102a90ea7b4a addb
- $ hg strip --no-backup tip
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
-Test with --bypass and diff.p1 == workingdir.p1
-
- $ hg up 1
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg import --bypass ../merge.diff
- applying ../merge.diff
- $ tipparents
- 1:540395c44225 changea
- 3:102a90ea7b4a addb
- $ hg strip --no-backup tip
-
-Test with --bypass and diff.p1 != workingdir.p1
-
- $ hg up 2
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg import --bypass ../merge.diff
- applying ../merge.diff
- $ tipparents
- 2:890ecaa90481 addc
- $ hg strip --no-backup tip
-
-Test with --bypass and --exact
-
- $ hg import --bypass --exact ../merge.diff
- applying ../merge.diff
- $ tipparents
- 1:540395c44225 changea
- 3:102a90ea7b4a addb
- $ hg strip --no-backup tip
-
- $ cd ..
diff --git a/tests/test-import-unknown.t b/tests/test-import-unknown.t
index a143676..c0ee1bd 100644
--- a/tests/test-import-unknown.t
+++ b/tests/test-import-unknown.t
@@ -65,5 +65,3 @@ Test copying onto an unknown file
applying ../unknown.diff
abort: cannot create copied: destination already exists
[255]
-
- $ cd ..
diff --git a/tests/test-import.t b/tests/test-import.t
index ccd35cc..a141c32 100644
--- a/tests/test-import.t
+++ b/tests/test-import.t
@@ -10,11 +10,6 @@
$ echo line 2 >> a/a
$ hg --cwd a ci -u someone -d '1 0' -m'second change'
-import with no args:
-
- $ hg --cwd a import
- abort: need at least one patch to import
- [255]
generate patches for the test
@@ -52,6 +47,7 @@ import exported patch with external patcher
> print 'patching file a'
> file('a', 'wb').write('line2\n')
> EOF
+ $ chmod +x dummypatch.py
$ hg clone -r0 a b
adding changesets
adding manifests
@@ -203,6 +199,7 @@ import two patches in one stream
$ hg init b
$ hg --cwd a export 0:tip | hg --cwd b import -
applying patch from stdin
+ applied 80971e65b431
$ hg --cwd a id
1d4bd90af0e4 tip
$ hg --cwd b id
@@ -232,7 +229,7 @@ override commit message
> msg.set_payload('email commit message\n' + patch)
> msg['Subject'] = 'email patch'
> msg['From'] = 'email patcher'
- > file(sys.argv[2], 'wb').write(msg.as_string())
+ > sys.stdout.write(msg.as_string())
> EOF
@@ -245,7 +242,7 @@ plain diff in email, subject, message body
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ python mkmsg.py diffed-tip.patch msg.patch
+ $ python mkmsg.py diffed-tip.patch > msg.patch
$ hg --cwd b import ../msg.patch
applying ../msg.patch
$ hg --cwd b tip | grep email
@@ -307,8 +304,7 @@ hg export in email, should use patch header
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ python mkmsg.py exported-tip.patch msg.patch
- $ cat msg.patch | hg --cwd b import -
+ $ python mkmsg.py exported-tip.patch | hg --cwd b import -
applying patch from stdin
$ hg --cwd b tip | grep second
summary: second change
@@ -325,7 +321,7 @@ The '---' tests the gitsendmail handling without proper mail headers
> msg.set_payload('email patch\n\nnext line\n---\n' + patch)
> msg['Subject'] = '[PATCH] email patch'
> msg['From'] = 'email patcher'
- > file(sys.argv[2], 'wb').write(msg.as_string())
+ > sys.stdout.write(msg.as_string())
> EOF
@@ -338,8 +334,7 @@ plain diff in email, [PATCH] subject, message body with subject
added 1 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ python mkmsg2.py diffed-tip.patch msg.patch
- $ cat msg.patch | hg --cwd b import -
+ $ python mkmsg2.py diffed-tip.patch | hg --cwd b import -
applying patch from stdin
$ hg --cwd b tip --template '{desc}\n'
email patch
@@ -361,20 +356,15 @@ patches: import patch1 patch2; rollback
$ hg clone -qr0 a b
$ hg --cwd b parents --template 'parent: {rev}\n'
parent: 0
- $ hg --cwd b import -v ../patch1 ../patch2
+ $ hg --cwd b import ../patch1 ../patch2
applying ../patch1
- patching file a
- a
- created 1d4bd90af0e4
applying ../patch2
- patching file a
- a
- created 6d019af21222
+ applied 1d4bd90af0e4
$ hg --cwd b rollback
- repository tip rolled back to revision 0 (undo import)
- working directory now based on revision 0
+ repository tip rolled back to revision 1 (undo commit)
+ working directory now based on revision 1
$ hg --cwd b parents --template 'parent: {rev}\n'
- parent: 0
+ parent: 1
$ rm -r b
@@ -442,8 +432,7 @@ Test fuzziness (ambiguous patch location, fuzz=2)
$ hg import --no-commit -v fuzzy-tip.patch
applying fuzzy-tip.patch
patching file a
- Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
- applied to working directory
+ Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
$ hg revert -a
reverting a
@@ -459,8 +448,7 @@ test fuzziness with eol=auto
$ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch
applying fuzzy-tip.patch
patching file a
- Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
- applied to working directory
+ Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
$ cd ..
@@ -629,7 +617,7 @@ test paths outside repo root
> rename to bar
> EOF
applying patch from stdin
- abort: path contains illegal component: ../outside/foo (glob)
+ abort: path contains illegal component: ../outside/foo
[255]
$ cd ..
@@ -660,9 +648,9 @@ test import with similarity and git and strip (issue295 et al.)
applying ../rename.diff
patching file a
patching file b
+ removing a
adding b
recording removal of a as rename to b (88% similar)
- applied to working directory
$ hg st -C
A b
a
@@ -675,8 +663,8 @@ test import with similarity and git and strip (issue295 et al.)
applying ../rename.diff
patching file a
patching file b
+ removing a
adding b
- applied to working directory
$ hg st -C
A b
R a
@@ -692,7 +680,6 @@ Issue1495: add empty file from the end of patch
adding a
$ hg ci -m "commit"
$ cat > a.patch <<EOF
- > add a, b
> diff --git a/a b/a
> --- a/a
> +++ b/a
@@ -703,25 +690,9 @@ Issue1495: add empty file from the end of patch
> EOF
$ hg import --no-commit a.patch
applying a.patch
-
-apply a good patch followed by an empty patch (mainly to ensure
-that dirstate is *not* updated when import crashes)
- $ hg update -q -C .
- $ rm b
- $ touch empty.patch
- $ hg import a.patch empty.patch
- applying a.patch
- applying empty.patch
- transaction abort!
- rollback completed
- abort: empty.patch: no diffs found
- [255]
- $ hg tip --template '{rev} {desc|firstline}\n'
- 0 commit
- $ hg -q status
- M a
$ cd ..
+
create file when source is not /dev/null
$ cat > create.patch <<EOF
@@ -754,7 +725,6 @@ some people have patches like the following too
$ cat foo
a
- $ cd ..
Issue1859: first line mistaken for email headers
@@ -789,7 +759,7 @@ Issue1859: first line mistaken for email headers
$ cd ..
-in commit message
+--- in commit message
$ hg init commitconfusion
$ cd commitconfusion
@@ -905,16 +875,12 @@ Issue2102: hg export and hg import speak different languages
> new mode 100755
> EOF
applying patch from stdin
-
-#if execbit
-
$ hg sum
parent: 1:d59915696727 tip
help management of empty pkg and lib directories in perforce
branch: default
commit: (clean)
update: (current)
-
$ hg diff --git -c tip
diff --git a/lib/place-holder b/lib/place-holder
new file mode 100644
@@ -933,39 +899,6 @@ Issue2102: hg export and hg import speak different languages
diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash
old mode 100644
new mode 100755
-
-#else
-
- $ hg sum
- parent: 1:28f089cc9ccc tip
- help management of empty pkg and lib directories in perforce
- branch: default
- commit: (clean)
- update: (current)
-
- $ hg diff --git -c tip
- diff --git a/lib/place-holder b/lib/place-holder
- new file mode 100644
- --- /dev/null
- +++ b/lib/place-holder
- @@ -0,0 +1,2 @@
- +perforce does not maintain empty directories.
- +this file helps.
- diff --git a/pkg/place-holder b/pkg/place-holder
- new file mode 100644
- --- /dev/null
- +++ b/pkg/place-holder
- @@ -0,0 +1,2 @@
- +perforce does not maintain empty directories.
- +this file helps.
-
-/* The mode change for mksys.bash is missing here, because on platforms */
-/* that don't support execbits, mode changes in patches are ignored when */
-/* they are imported. This is obviously also the reason for why the hash */
-/* in the created changeset is different to the one you see above the */
-/* #else clause */
-
-#endif
$ cd ..
@@ -995,161 +928,3 @@ diff lines looking like headers
$ diff want have
$ cd ..
-import a unified diff with no lines of context (diff -U0)
-
- $ hg init diffzero
- $ cd diffzero
- $ cat > f << EOF
- > c2
- > c4
- > c5
- > EOF
- $ hg commit -Am0
- adding f
-
- $ hg import --no-commit - << EOF
- > # HG changeset patch
- > # User test
- > # Date 0 0
- > # Node ID f4974ab632f3dee767567b0576c0ec9a4508575c
- > # Parent 8679a12a975b819fae5f7ad3853a2886d143d794
- > 1
- > diff -r 8679a12a975b -r f4974ab632f3 f
- > --- a/f Thu Jan 01 00:00:00 1970 +0000
- > +++ b/f Thu Jan 01 00:00:00 1970 +0000
- > @@ -0,0 +1,1 @@
- > +c1
- > @@ -1,0 +3,1 @@
- > +c3
- > @@ -3,1 +4,0 @@
- > -c5
- > EOF
- applying patch from stdin
-
- $ cat f
- c1
- c2
- c3
- c4
-
- $ cd ..
-
-no segfault while importing a unified diff which start line is zero but chunk
-size is non-zero
-
- $ hg init startlinezero
- $ cd startlinezero
- $ echo foo > foo
- $ hg commit -Amfoo
- adding foo
-
- $ hg import --no-commit - << EOF
- > diff a/foo b/foo
- > --- a/foo
- > +++ b/foo
- > @@ -0,1 +0,1 @@
- > foo
- > EOF
- applying patch from stdin
-
- $ cd ..
-
-Test corner case involving fuzz and skew
-
- $ hg init morecornercases
- $ cd morecornercases
-
- $ cat > 01-no-context-beginning-of-file.diff <<EOF
- > diff --git a/a b/a
- > --- a/a
- > +++ b/a
- > @@ -1,0 +1,1 @@
- > +line
- > EOF
-
- $ cat > 02-no-context-middle-of-file.diff <<EOF
- > diff --git a/a b/a
- > --- a/a
- > +++ b/a
- > @@ -1,1 +1,1 @@
- > -2
- > +add some skew
- > @@ -2,0 +2,1 @@
- > +line
- > EOF
-
- $ cat > 03-no-context-end-of-file.diff <<EOF
- > diff --git a/a b/a
- > --- a/a
- > +++ b/a
- > @@ -10,0 +10,1 @@
- > +line
- > EOF
-
- $ cat > 04-middle-of-file-completely-fuzzed.diff <<EOF
- > diff --git a/a b/a
- > --- a/a
- > +++ b/a
- > @@ -1,1 +1,1 @@
- > -2
- > +add some skew
- > @@ -2,2 +2,3 @@
- > not matching, should fuzz
- > ... a bit
- > +line
- > EOF
-
- $ cat > a <<EOF
- > 1
- > 2
- > 3
- > 4
- > EOF
- $ hg ci -Am adda a
- $ for p in *.diff; do
- > hg import -v --no-commit $p
- > cat a
- > hg revert -aqC a
- > # patch -p1 < $p
- > # cat a
- > # hg revert -aC a
- > done
- applying 01-no-context-beginning-of-file.diff
- patching file a
- applied to working directory
- 1
- line
- 2
- 3
- 4
- applying 02-no-context-middle-of-file.diff
- patching file a
- Hunk #1 succeeded at 2 (offset 1 lines).
- Hunk #2 succeeded at 4 (offset 1 lines).
- applied to working directory
- 1
- add some skew
- 3
- line
- 4
- applying 03-no-context-end-of-file.diff
- patching file a
- Hunk #1 succeeded at 5 (offset -6 lines).
- applied to working directory
- 1
- 2
- 3
- 4
- line
- applying 04-middle-of-file-completely-fuzzed.diff
- patching file a
- Hunk #1 succeeded at 2 (offset 1 lines).
- Hunk #2 succeeded at 5 with fuzz 2 (offset 1 lines).
- applied to working directory
- 1
- add some skew
- 3
- 4
- line
-
- $ cd ..
diff --git a/tests/test-incoming-outgoing.t b/tests/test-incoming-outgoing.t
index 03deeac..1d54572 100644
--- a/tests/test-incoming-outgoing.t
+++ b/tests/test-incoming-outgoing.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
$ hg init test
$ cd test
$ for i in 0 1 2 3 4 5 6 7 8; do
@@ -399,15 +397,6 @@ test outgoing
date: Thu Jan 01 00:00:00 1970 +0000
summary: 13
-test outgoing with secret changesets
-
- $ hg -R test-dev phase --force --secret 9
- $ hg -R test-dev outgoing test
- comparing with test
- searching for changes
- no changes found (ignored 5 secret changesets)
- [1]
- $ hg -R test-dev phase --draft -r 'head()'
limit to 3 changesets
diff --git a/tests/test-inherit-mode.t b/tests/test-inherit-mode.t
index cf6c9e5..70ee5d8 100644
--- a/tests/test-inherit-mode.t
+++ b/tests/test-inherit-mode.t
@@ -65,8 +65,6 @@ new directories are setgid
$ python ../printmodes.py .
00700 ./.hg/
00600 ./.hg/00changelog.i
- 00770 ./.hg/cache/
- 00660 ./.hg/cache/branchheads
00660 ./.hg/dirstate
00660 ./.hg/last-message.txt
00600 ./.hg/requires
@@ -78,9 +76,7 @@ new directories are setgid
00660 ./.hg/store/data/dir/bar.i
00660 ./.hg/store/data/foo.i
00660 ./.hg/store/fncache
- 00660 ./.hg/store/phaseroots
00660 ./.hg/store/undo
- 00660 ./.hg/store/undo.phaseroots
00660 ./.hg/undo.bookmarks
00660 ./.hg/undo.branch
00660 ./.hg/undo.desc
@@ -121,9 +117,7 @@ group can still write everything
00660 ../push/.hg/store/data/dir/bar.i
00660 ../push/.hg/store/data/foo.i
00660 ../push/.hg/store/fncache
- 00660 ../push/.hg/store/phaseroots
00660 ../push/.hg/store/undo
- 00660 ../push/.hg/store/undo.phaseroots
00660 ../push/.hg/undo.bookmarks
00660 ../push/.hg/undo.branch
00660 ../push/.hg/undo.desc
@@ -138,7 +132,7 @@ just check that directories have the same mode.
$ hg init setgid
$ cd setgid
$ chmod g+rwx .hg/store
- $ chmod g+s .hg/store 2> /dev/null || true
+ $ chmod g+s .hg/store 2> /dev/null
$ mkdir dir
$ touch dir/file
$ hg ci -qAm 'add dir/file'
@@ -146,7 +140,4 @@ just check that directories have the same mode.
$ dirmode=`python ../mode.py .hg/store/data/dir`
$ if [ "$storemode" != "$dirmode" ]; then
> echo "$storemode != $dirmode"
- > fi
- $ cd ..
-
- $ cd .. # g-s dir
+ $ fi
diff --git a/tests/test-init.t b/tests/test-init.t
index aa4610b..1980769 100644
--- a/tests/test-init.t
+++ b/tests/test-init.t
@@ -19,8 +19,8 @@ creating 'local'
store created
00changelog.i created
revlogv1
- fncache
store
+ fncache
dotencode
$ echo this > local/foo
$ hg ci --cwd local -A -m "init"
@@ -48,8 +48,8 @@ creating repo with format.dotencode=false
store created
00changelog.i created
revlogv1
- fncache
store
+ fncache
test failure
@@ -59,7 +59,7 @@ test failure
init+push to remote2
- $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2
+ $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
$ hg incoming -R remote2 local
comparing with local
changeset: 0:08b9e9f63b32
@@ -69,7 +69,7 @@ init+push to remote2
summary: init
- $ hg push -R local -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote2
+ $ hg push -R local -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote2
pushing to ssh://user@dummy/remote2
searching for changes
remote: adding changesets
@@ -79,7 +79,7 @@ init+push to remote2
clone to remote1
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1
+ $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
searching for changes
remote: adding changesets
remote: adding manifests
@@ -88,14 +88,14 @@ clone to remote1
init to existing repo
- $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1
+ $ hg init -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote1
abort: repository remote1 already exists!
abort: could not create remote repo!
[255]
clone to existing repo
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote1
+ $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote1
abort: repository remote1 already exists!
abort: could not create remote repo!
[255]
@@ -122,7 +122,7 @@ comparing repositories
check names for repositories (clashes with URL schemes, special chars)
- $ for i in bundle file hg http https old-http ssh static-http "with space"; do
+ $ for i in bundle file hg http https old-http ssh static-http " " "with space"; do
> printf "hg init \"$i\"... "
> hg init "$i"
> test -d "$i" -a -d "$i/.hg" && echo "ok" || echo "failed"
@@ -135,13 +135,8 @@ check names for repositories (clashes with URL schemes, special chars)
hg init "old-http"... ok
hg init "ssh"... ok
hg init "static-http"... ok
+ hg init " "... ok
hg init "with space"... ok
-#if eol-in-paths
-/* " " is not a valid name for a directory on Windows */
- $ hg init " "
- $ test -d " "
- $ test -d " /.hg"
-#endif
creating 'local/sub/repo'
@@ -150,8 +145,8 @@ creating 'local/sub/repo'
store created
00changelog.i created
revlogv1
- fncache
store
+ fncache
dotencode
prepare test of init of url configured from paths
@@ -167,8 +162,8 @@ init should (for consistency with clone) expand the url
store created
00changelog.i created
revlogv1
- fncache
store
+ fncache
dotencode
verify that clone also expand urls
@@ -180,8 +175,8 @@ verify that clone also expand urls
store created
00changelog.i created
revlogv1
- fncache
store
+ fncache
dotencode
clone bookmarks
@@ -189,7 +184,7 @@ clone bookmarks
$ hg -R local bookmark test
$ hg -R local bookmarks
* test 0:08b9e9f63b32
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remote-bookmarks
+ $ hg clone -e "python $TESTDIR/dummyssh" local ssh://user@dummy/remote-bookmarks
searching for changes
remote: adding changesets
remote: adding manifests
diff --git a/tests/test-inotify-dirty-dirstate.t b/tests/test-inotify-dirty-dirstate.t
index af9bd8e..15b67bc 100644
--- a/tests/test-inotify-dirty-dirstate.t
+++ b/tests/test-inotify-dirty-dirstate.t
@@ -68,5 +68,3 @@ st should not output anything
$ hg status
$ hg qrefresh
$ hg status
-
- $ cd ..
diff --git a/tests/test-inotify-issue1208.t b/tests/test-inotify-issue1208.t
index e8e5237..b87fa2f 100644
--- a/tests/test-inotify-issue1208.t
+++ b/tests/test-inotify-issue1208.t
@@ -34,5 +34,3 @@ if we try to start twice the server, make sure we get a correct error
abort: child process failed to start
[255]
$ kill `cat hg.pid`
-
- $ cd ..
diff --git a/tests/test-inotify.t b/tests/test-inotify.t
index 34be779..55eb61d 100644
--- a/tests/test-inotify.t
+++ b/tests/test-inotify.t
@@ -158,5 +158,3 @@ build/x & build/y shouldn't appear in "hg st"
$ hg st
$ kill `cat hg.pid`
-
- $ cd ..
diff --git a/tests/test-install.t b/tests/test-install.t
index 5d7741d..3ecc3b0 100644
--- a/tests/test-install.t
+++ b/tests/test-install.t
@@ -1,19 +1,19 @@
hg debuginstall
$ hg debuginstall
- checking encoding (ascii)...
- checking installed modules (*mercurial)... (glob)
- checking templates (*mercurial?templates)... (glob)
- checking commit editor...
- checking username...
- no problems detected
+ Checking encoding (ascii)...
+ Checking installed modules (*/mercurial)... (glob)
+ Checking templates...
+ Checking commit editor...
+ Checking username...
+ No problems detected
hg debuginstall with no username
$ HGUSER= hg debuginstall
- checking encoding (ascii)...
- checking installed modules (*mercurial)... (glob)
- checking templates (*mercurial?templates)... (glob)
- checking commit editor...
- checking username...
+ Checking encoding (ascii)...
+ Checking installed modules (*/mercurial)... (glob)
+ Checking templates...
+ Checking commit editor...
+ Checking username...
no username supplied (see "hg help config")
(specify a username in your configuration file)
1 problems detected, please check your install!
diff --git a/tests/test-interhg.t b/tests/test-interhg.t
index ee08846..5b829a3 100644
--- a/tests/test-interhg.t
+++ b/tests/test-interhg.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
$ hg init test
$ cd test
@@ -23,11 +21,9 @@
log
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '' | grep bts
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/' | grep bts
<td class="description"><a href="/rev/1b0e7ece6bd6"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</a><span class="branchhead">default</span> <span class="tag">tip</span> </td>
errors
$ cat errors.log
-
- $ cd ..
diff --git a/tests/test-issue1089.t b/tests/test-issue1089.t
index 2bdd3d0..5075f64 100644
--- a/tests/test-issue1089.t
+++ b/tests/test-issue1089.t
@@ -7,7 +7,7 @@ http://mercurial.selenic.com/bts/issue1089
adding a/b
$ hg rm a
- removing a/b (glob)
+ removing a/b
$ hg ci -m m a
$ mkdir a b
@@ -16,11 +16,10 @@ http://mercurial.selenic.com/bts/issue1089
adding a/b
$ hg rm a
- removing a/b (glob)
+ removing a/b
$ cd b
Relative delete:
$ hg ci -m m ../a
- $ cd ..
diff --git a/tests/test-issue1306.t b/tests/test-issue1306.t
index a176284..e77970f 100644
--- a/tests/test-issue1306.t
+++ b/tests/test-issue1306.t
@@ -11,7 +11,6 @@ Initialize remote repo with branches:
$ hg branch br
marked working directory as branch br
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Amb
$ echo c > c
diff --git a/tests/test-issue1502.t b/tests/test-issue1502.t
index 4963502..5466c8f 100644
--- a/tests/test-issue1502.t
+++ b/tests/test-issue1502.t
@@ -13,7 +13,7 @@ Initialize repository
$ echo "bar" > foo1/a && hg -R foo1 commit -m "edit a in foo1"
$ echo "hi" > foo/a && hg -R foo commit -m "edited a foo"
$ hg -R foo1 pull -u
- pulling from $TESTTMP/foo (glob)
+ pulling from $TESTTMP/foo
searching for changes
adding changesets
adding manifests
@@ -29,7 +29,7 @@ Pull. Bookmark should not jump to new head.
$ echo "there" >> foo/a && hg -R foo commit -m "edited a again"
$ hg -R foo1 pull
- pulling from $TESTTMP/foo (glob)
+ pulling from $TESTTMP/foo
searching for changes
adding changesets
adding manifests
diff --git a/tests/test-issue1802.t b/tests/test-issue1802.t
deleted file mode 100644
index 9b3268a..0000000
--- a/tests/test-issue1802.t
+++ /dev/null
@@ -1,73 +0,0 @@
- $ "$TESTDIR/hghave" execbit || exit 80
-
-Create extension that can disable exec checks:
-
- $ cat > noexec.py <<EOF
- > from mercurial import extensions, util
- > def setflags(orig, f, l, x):
- > pass
- > def checkexec(orig, path):
- > return False
- > def extsetup(ui):
- > extensions.wrapfunction(util, 'setflags', setflags)
- > extensions.wrapfunction(util, 'checkexec', checkexec)
- > EOF
-
- $ hg init unix-repo
- $ cd unix-repo
- $ touch a
- $ hg add a
- $ hg commit -m 'unix: add a'
- $ hg clone . ../win-repo
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ chmod +x a
- $ hg commit -m 'unix: chmod a'
- $ hg manifest -v
- 755 * a
-
- $ cd ../win-repo
-
- $ touch b
- $ hg add b
- $ hg commit -m 'win: add b'
-
- $ hg manifest -v
- 644 a
- 644 b
-
- $ hg pull
- pulling from $TESTTMP/unix-repo
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 0 changes to 0 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
-
- $ hg manifest -v -r tip
- 755 * a
-
-Simulate a Windows merge:
-
- $ hg --config extensions.n=$TESTTMP/noexec.py merge --debug
- searching for copies back to rev 1
- unmatched files in local:
- b
- resolving manifests
- overwrite: False, partial: False
- ancestor: a03b0deabf2b, local: d6fa54f68ae1+, remote: 2d8bcf2dda39
- a: update permissions -> e
- updating: a 1/1 files (100.00%)
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
-
-Simulate a Windows commit:
-
- $ hg --config extensions.n=$TESTTMP/noexec.py commit -m 'win: merge'
-
- $ hg manifest -v
- 755 * a
- 644 b
-
- $ cd ..
diff --git a/tests/test-issue1877.t b/tests/test-issue1877.t
index aa3083a..64eb9f4 100644
--- a/tests/test-issue1877.t
+++ b/tests/test-issue1877.t
@@ -43,4 +43,3 @@ http://mercurial.selenic.com/bts/issue1877
$ hg book
main 2:d36c0562f908
- $ cd ..
diff --git a/tests/test-issue2137.t b/tests/test-issue2137.t
index 99b41f4..94d626a 100644
--- a/tests/test-issue2137.t
+++ b/tests/test-issue2137.t
@@ -52,5 +52,3 @@ Test that new changesets are visible to repo.lookup():
date: Thu Jan 01 00:00:00 1970 +0000
summary: one more commit to demonstrate the bug
-
- $ cd ..
diff --git a/tests/test-issue3084.t b/tests/test-issue3084.t
deleted file mode 100644
index 43945b1..0000000
--- a/tests/test-issue3084.t
+++ /dev/null
@@ -1,110 +0,0 @@
-
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "largefiles =" >> $HGRCPATH
-
-Create the repository outside $HOME since largefiles write to
-$HOME/.cache/largefiles.
-
- $ hg init test
- $ cd test
- $ echo "root" > root
- $ hg add root
- $ hg commit -m "Root commit"
-
- $ echo "large" > foo
- $ hg add --large foo
- $ hg commit -m "Add foo as a largefile"
-
- $ hg update -r 0
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- getting changed largefiles
- 0 largefiles updated, 1 removed
-
- $ echo "normal" > foo
- $ hg add foo
- $ hg commit -m "Add foo as normal file"
- created new head
-
-Normal file in the working copy, keeping the normal version:
-
- $ echo "n" | hg merge --config ui.interactive=Yes
- foo has been turned into a largefile
- use (l)argefile or keep as (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
-
- $ hg status
- $ cat foo
- normal
-
-Normal file in the working copy, keeping the largefile version:
-
- $ hg update -q -C
- $ echo "l" | hg merge --config ui.interactive=Yes
- foo has been turned into a largefile
- use (l)argefile or keep as (n)ormal file? 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- getting changed largefiles
- 1 largefiles updated, 0 removed
-
- $ hg status
- M foo
-
- $ hg diff --nodates
- diff -r fa129ab6b5a7 .hglf/foo
- --- /dev/null
- +++ b/.hglf/foo
- @@ -0,0 +1,1 @@
- +7f7097b041ccf68cc5561e9600da4655d21c6d18
- diff -r fa129ab6b5a7 foo
- --- a/foo
- +++ /dev/null
- @@ -1,1 +0,0 @@
- -normal
-
- $ cat foo
- large
-
-Largefile in the working copy, keeping the normal version:
-
- $ hg update -q -C -r 1
- $ echo "n" | hg merge --config ui.interactive=Yes
- foo has been turned into a normal file
- keep as (l)argefile or use (n)ormal file? 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- getting changed largefiles
- 0 largefiles updated, 0 removed
-
- $ hg status
- M foo
-
- $ hg diff --nodates
- diff -r ff521236428a .hglf/foo
- --- a/.hglf/foo
- +++ /dev/null
- @@ -1,1 +0,0 @@
- -7f7097b041ccf68cc5561e9600da4655d21c6d18
- diff -r ff521236428a foo
- --- /dev/null
- +++ b/foo
- @@ -0,0 +1,1 @@
- +normal
-
- $ cat foo
- normal
-
-Largefile in the working copy, keeping the largefile version:
-
- $ hg update -q -C -r 1
- $ echo "l" | hg merge --config ui.interactive=Yes
- foo has been turned into a normal file
- keep as (l)argefile or use (n)ormal file? 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- getting changed largefiles
- 1 largefiles updated, 0 removed
-
- $ hg status
-
- $ cat foo
- large
-
- $ cd ..
diff --git a/tests/test-issue522.t b/tests/test-issue522.t
index a21f23b..a81cf95 100644
--- a/tests/test-issue522.t
+++ b/tests/test-issue522.t
@@ -29,8 +29,8 @@ revision.
unmatched files in local:
bar
resolving manifests
- overwrite: False, partial: False
- ancestor: bbd179dfa0a7, local: 71766447bdbb+, remote: 4d9e78aaceee
+ overwrite None partial False
+ ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee
foo: remote is newer -> g
updating: foo 1/1 files (100.00%)
getting foo
@@ -49,8 +49,8 @@ revision.
c6fc755d7e68f49f880599da29f15add41f42f5a 644 foo
$ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 5 ..... 0 2ed2a3912a0b 000000000000 000000000000 (re)
- 1 5 9 ..... 1 6f4310b00b9a 2ed2a3912a0b 000000000000 (re)
- 2 14 5 ..... 2 c6fc755d7e68 6f4310b00b9a 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000
+ 1 5 9 1 1 6f4310b00b9a 2ed2a3912a0b 000000000000
+ 2 14 5 2 2 c6fc755d7e68 6f4310b00b9a 000000000000
diff --git a/tests/test-issue612.t b/tests/test-issue612.t
index 2985abb..67df561 100644
--- a/tests/test-issue612.t
+++ b/tests/test-issue612.t
@@ -7,7 +7,7 @@ http://mercurial.selenic.com/bts/issue612
adding src/a.c
$ hg mv src source
- moving src/a.c to source/a.c (glob)
+ moving src/a.c to source/a.c
$ hg ci -Ammove
@@ -24,11 +24,11 @@ http://mercurial.selenic.com/bts/issue612
$ hg merge
merging src/a.c and source/a.c to source/a.c
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+ 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg status
M source/a.c
R src/a.c
- ? src/a.o
+ ? source/a.o
diff --git a/tests/test-issue619.t b/tests/test-issue619.t
index e53e4df..70c2a72 100644
--- a/tests/test-issue619.t
+++ b/tests/test-issue619.t
@@ -8,7 +8,6 @@ http://mercurial.selenic.com/bts/issue619
$ echo b > b
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Amb
adding b
diff --git a/tests/test-issue660.t b/tests/test-issue660.t
index 850eb3f..516a81d 100644
--- a/tests/test-issue660.t
+++ b/tests/test-issue660.t
@@ -67,9 +67,9 @@ Revert all - should succeed:
$ hg revert --all
undeleting a
- forgetting a/a (glob)
+ forgetting a/a
forgetting b
- undeleting b/b (glob)
+ undeleting b/b
$ hg st
diff --git a/tests/test-issue672.t b/tests/test-issue672.t
index a6e4fcb..c2041d7 100644
--- a/tests/test-issue672.t
+++ b/tests/test-issue672.t
@@ -28,12 +28,12 @@ http://mercurial.selenic.com/bts/issue672
searching for copies back to rev 1
unmatched files in other:
1a
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
1a -> 1
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 81f4b099af3d, local: c64f439569a9+, remote: c12dcd37c90a
+ overwrite None partial False
+ ancestor 81f4b099af3d local c64f439569a9+ remote c12dcd37c90a
1: other deleted -> r
1a: remote created -> g
updating: 1 1/2 files (50.00%)
@@ -59,12 +59,12 @@ http://mercurial.selenic.com/bts/issue672
searching for copies back to rev 1
unmatched files in local:
1a
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
1a -> 1 *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: c64f439569a9, local: e327dca35ac8+, remote: 746e9549ea96
+ overwrite None partial False
+ ancestor c64f439569a9 local e327dca35ac8+ remote 746e9549ea96
1a: local copied/moved to 1 -> m
preserving 1a for resolve of 1a
updating: 1a 1/1 files (100.00%)
@@ -82,12 +82,12 @@ http://mercurial.selenic.com/bts/issue672
searching for copies back to rev 1
unmatched files in other:
1a
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
1a -> 1 *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: c64f439569a9, local: 746e9549ea96+, remote: e327dca35ac8
+ overwrite None partial False
+ ancestor c64f439569a9 local 746e9549ea96+ remote e327dca35ac8
1: remote moved to 1a -> m
preserving 1 for resolve of 1a
removing 1
diff --git a/tests/test-issue842.t b/tests/test-issue842.t
index 6cf9b9d..bf64e61 100644
--- a/tests/test-issue842.t
+++ b/tests/test-issue842.t
@@ -31,7 +31,6 @@ Should not issue new head warning:
$ echo crap > a
$ hg branch testing
marked working directory as branch testing
- (branches are permanent and global, did you want a bookmark?)
Should not issue warning:
diff --git a/tests/test-journal-exists.t b/tests/test-journal-exists.t
index 4cc908f..5867ee0 100644
--- a/tests/test-journal-exists.t
+++ b/tests/test-journal-exists.t
@@ -22,7 +22,6 @@
Check that zero-size journals are correctly aborted:
-#if unix-permissions
$ hg bundle -qa repo.hg
$ chmod -w foo/.hg/store/00changelog.i
@@ -32,5 +31,4 @@ Check that zero-size journals are correctly aborted:
[255]
$ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
-#endif
diff --git a/tests/test-keyword.t b/tests/test-keyword.t
index 56fb4ba..7da72f0 100644
--- a/tests/test-keyword.t
+++ b/tests/test-keyword.t
@@ -9,9 +9,6 @@
> interactive = true
> EOF
-hide outer repo
- $ hg init
-
Run kwdemo before [keyword] files are set up
as it would succeed without uisetup otherwise
@@ -163,31 +160,13 @@ hg cat files and symlink, no expansion
ignore $Id$
a
+Test hook execution
+
$ diff a hooktest
$ cp $HGRCPATH.nohooks $HGRCPATH
$ rm hooktest
-hg status of kw-ignored binary file starting with '\1\n'
-
- >>> open("i", "wb").write("\1\nfoo")
- $ hg -q commit -Am metasep i
- $ hg status
- >>> open("i", "wb").write("\1\nbar")
- $ hg status
- M i
- $ hg -q commit -m "modify metasep" i
- $ hg status --rev 2:3
- M i
- $ touch empty
- $ hg -q commit -A -m "another file"
- $ hg status -A --rev 3:4 i
- C i
-
- $ hg -q strip -n 2
-
-Test hook execution
-
bundle
$ hg bundle --base null ../kw.hg
@@ -229,7 +208,7 @@ Pull from bundle and trigger notify
Message-Id: <hg.a2392c293916*> (glob)
To: Test
- changeset a2392c293916 in $TESTTMP/Test (glob)
+ changeset a2392c293916 in $TESTTMP/Test
details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
description:
addsym
@@ -252,7 +231,7 @@ Pull from bundle and trigger notify
Message-Id: <hg.ef63ca68695b*> (glob)
To: Test
- changeset ef63ca68695b in $TESTTMP/Test (glob)
+ changeset ef63ca68695b in $TESTTMP/Test
details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
description:
absym
@@ -295,20 +274,16 @@ Check whether expansion is filewise and file mode is preserved
$ echo '$Id$' > c
$ echo 'tests for different changenodes' >> c
-#if unix-permissions
$ chmod 600 c
$ ls -l c | cut -b 1-10
-rw-------
-#endif
commit file c
$ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
adding c
-#if unix-permissions
$ ls -l c | cut -b 1-10
-rw-------
-#endif
force expansion
@@ -332,32 +307,30 @@ record
record chunk
- >>> lines = open('a', 'rb').readlines()
- >>> lines.insert(1, 'foo\n')
- >>> lines.append('bar\n')
- >>> open('a', 'wb').writelines(lines)
- $ hg record -d '10 1' -m rectest a<<EOF
+ $ python -c \
+ > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
+ $ hg record -d '1 10' -m rectest a<<EOF
> y
> y
> n
> EOF
diff --git a/a b/a
2 hunks, 2 lines changed
- examine changes to 'a'? [Ynesfdaq?]
+ examine changes to 'a'? [Ynsfdaq?]
@@ -1,3 +1,4 @@
expand $Id$
+foo
do not process $Id:
xxx $
- record change 1/2 to 'a'? [Ynesfdaq?]
+ record change 1/2 to 'a'? [Ynsfdaq?]
@@ -2,2 +3,3 @@
do not process $Id:
xxx $
+bar
- record change 2/2 to 'a'? [Ynesfdaq?]
+ record change 2/2 to 'a'? [Ynsfdaq?]
$ hg identify
- 5f5eb23505c3+ tip
+ d17e03c92c97+ tip
$ hg status
M a
A r
@@ -365,7 +338,7 @@ record chunk
Cat modified file a
$ cat a
- expand $Id: a,v 5f5eb23505c3 1970/01/01 00:00:10 test $
+ expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
foo
do not process $Id:
xxx $
@@ -374,8 +347,8 @@ Cat modified file a
Diff remaining chunk
$ hg diff a
- diff -r 5f5eb23505c3 a
- --- a/a Thu Jan 01 00:00:09 1970 -0000
+ diff -r d17e03c92c97 a
+ --- a/a Wed Dec 31 23:59:51 1969 -0000
+++ b/a * (glob)
@@ -2,3 +2,4 @@
foo
@@ -393,25 +366,25 @@ Record all chunks in file a
- do not use "hg record -m" here!
- $ hg record -l msg -d '11 1' a<<EOF
+ $ hg record -l msg -d '1 11' a<<EOF
> y
> y
> y
> EOF
diff --git a/a b/a
2 hunks, 2 lines changed
- examine changes to 'a'? [Ynesfdaq?]
+ examine changes to 'a'? [Ynsfdaq?]
@@ -1,3 +1,4 @@
expand $Id$
+foo
do not process $Id:
xxx $
- record change 1/2 to 'a'? [Ynesfdaq?]
+ record change 1/2 to 'a'? [Ynsfdaq?]
@@ -2,2 +3,3 @@
do not process $Id:
xxx $
+bar
- record change 2/2 to 'a'? [Ynesfdaq?]
+ record change 2/2 to 'a'? [Ynsfdaq?]
File a should be clean
@@ -421,7 +394,7 @@ File a should be clean
rollback and revert expansion
$ cat a
- expand $Id: a,v 78e0a02d76aa 1970/01/01 00:00:11 test $
+ expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
foo
do not process $Id:
xxx $
@@ -462,14 +435,14 @@ Only z should be overwritten
record added file alone
- $ hg -v record -l msg -d '12 2' r<<EOF
+ $ hg -v record -l msg -d '1 12' r<<EOF
> y
> EOF
diff --git a/r b/r
new file mode 100644
- examine changes to 'r'? [Ynesfdaq?]
+ examine changes to 'r'? [Ynsfdaq?]
r
- committed changeset 3:82a2f715724d
+ committed changeset 3:899491280810
overwriting r expanding keywords
- status call required for dirstate.normallookup() check
$ hg status r
@@ -486,35 +459,20 @@ record added keyword ignored file
$ echo '$Id$' > i
$ hg add i
- $ hg --verbose record -d '13 1' -m recignored<<EOF
+ $ hg --verbose record -d '1 13' -m recignored<<EOF
> y
> EOF
diff --git a/i b/i
new file mode 100644
- examine changes to 'i'? [Ynesfdaq?]
+ examine changes to 'i'? [Ynsfdaq?]
i
- committed changeset 3:9f40ceb5a072
+ committed changeset 3:5f40fe93bbdc
$ cat i
$Id$
$ hg -q rollback
$ hg forget i
$ rm i
-amend
-
- $ echo amend >> a
- $ echo amend >> b
- $ hg -q commit -d '14 1' -m 'prepare amend'
-
- $ hg --debug commit --amend -d '15 1' -m 'amend without changes' | grep keywords
- overwriting a expanding keywords
- $ hg -q id
- 577e60613a88
- $ head -1 a
- expand $Id: a,v 577e60613a88 1970/01/01 00:00:15 test $
-
- $ hg -q strip -n tip
-
Test patch queue repo
$ hg init --mq
@@ -578,7 +536,6 @@ Commit and show expansion in original and copy
$ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
c
c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
- removing unknown node 40a904bbbe4c from 1-phase boundary
overwriting c expanding keywords
committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
$ cat a c
@@ -614,7 +571,6 @@ Copy ignored file to ignored file: no overwriting
cp symlink file; hg cp -A symlink file (part1)
- copied symlink points to kwfile: overwrite
-#if symlink
$ cp sym i
$ ls -l i
-rw-r--r--* (glob)
@@ -627,7 +583,6 @@ cp symlink file; hg cp -A symlink file (part1)
expand $Id$
$ hg forget i
$ rm i
-#endif
Test different options of hg kwfiles
@@ -664,8 +619,6 @@ Status after rollback:
$ hg update --clean
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
-#if symlink
-
cp symlink file; hg cp -A symlink file (part2)
- copied symlink points to kw ignored file: do not overwrite
@@ -687,8 +640,6 @@ cp symlink file; hg cp -A symlink file (part2)
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm i symignored
-#endif
-
Custom keywordmaps as argument to kwdemo
$ hg --quiet kwdemo "Xinfo = {author}: {desc}"
@@ -749,7 +700,6 @@ Commit with multiline message and custom expansion
$ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
a
- removing unknown node 40a904bbbe4c from 1-phase boundary
overwriting a expanding keywords
committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
$ rm log
@@ -847,7 +797,7 @@ Clone to test incoming
> default = ../Test
> EOF
$ hg incoming
- comparing with $TESTTMP/Test (glob)
+ comparing with $TESTTMP/Test
searching for changes
changeset: 2:bb948857c743
tag: tip
@@ -857,9 +807,8 @@ Clone to test incoming
Imported patch should not be rejected
- >>> import re
- >>> text = re.sub(r'(Id.*)', r'\1 rejecttest', open('a').read())
- >>> open('a', 'wb').write(text)
+ $ python -c \
+ > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
$ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
a
overwriting a expanding keywords
@@ -876,7 +825,7 @@ Imported patch should not be rejected
ignore $Id$
$ hg rollback
- repository tip rolled back to revision 2 (undo import)
+ repository tip rolled back to revision 2 (undo commit)
working directory now based on revision 2
$ hg update --clean
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -928,7 +877,6 @@ kwexpand nonexistent
nonexistent:* (glob)
-#if serve
hg serve
- expand with hgweb file
- no expansion with hgweb annotate/changeset/filediff
@@ -936,14 +884,14 @@ hg serve
$ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/a/?style=raw'
+ $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
200 Script output follows
expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
do not process $Id:
xxx $
$Xinfo: User Name <user@example.com>: firstline $
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/a/?style=raw'
+ $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
200 Script output follows
@@ -955,7 +903,7 @@ hg serve
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/tip/?style=raw'
+ $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
200 Script output follows
@@ -975,7 +923,7 @@ hg serve
+xxx $
+$Xinfo$
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/bb948857c743/a?style=raw'
+ $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
200 Script output follows
@@ -992,7 +940,6 @@ hg serve
$ cat errors.log
-#endif
Prepare merge and resolve tests
@@ -1027,7 +974,7 @@ conflict: keyword should stay outside conflict zone
$ hg merge
merging m
warning: conflicts during merge.
- merging m incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging m failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -1053,7 +1000,6 @@ Test restricted mode with transplant -b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch foo
marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
$ mv a a.bak
$ echo foobranch > a
$ cat a.bak >> a
@@ -1135,5 +1081,3 @@ Now disable keyword expansion
$Xinfo$
ignore $Id$
a
-
- $ cd ..
diff --git a/tests/test-known.t b/tests/test-known.t
index 3c19ebe..5706fd7 100644
--- a/tests/test-known.t
+++ b/tests/test-known.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
= Test the known() protocol function =
diff --git a/tests/test-largefiles-cache.t b/tests/test-largefiles-cache.t
deleted file mode 100644
index ae6631c..0000000
--- a/tests/test-largefiles-cache.t
+++ /dev/null
@@ -1,125 +0,0 @@
-Create user cache directory
-
- $ USERCACHE=`pwd`/cache; export USERCACHE
- $ cat <<EOF >> ${HGRCPATH}
- > [extensions]
- > hgext.largefiles=
- > [largefiles]
- > usercache=${USERCACHE}
- > EOF
- $ mkdir -p ${USERCACHE}
-
-Create source repo, and commit adding largefile.
-
- $ hg init src
- $ cd src
- $ echo large > large
- $ hg add --large large
- $ hg commit -m 'add largefile'
- $ cd ..
-
-Discard all cached largefiles in USERCACHE
-
- $ rm -rf ${USERCACHE}
-
-Create mirror repo, and pull from source without largefile:
-"pull" is used instead of "clone" for suppression of (1) updating to
-tip (= cahcing largefile from source repo), and (2) recording source
-repo as "default" path in .hg/hgrc.
-
- $ hg init mirror
- $ cd mirror
- $ hg pull ../src
- pulling from ../src
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- (run 'hg update' to get a working copy)
- caching new largefiles
- 0 largefiles cached
-
-Update working directory to "tip", which requires largefile("large"),
-but there is no cache file for it. So, hg must treat it as
-"missing"(!) file.
-
- $ hg update
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- large: can't get file locally
- (no default or default-push path set in hgrc)
- 0 largefiles updated, 0 removed
- $ hg status
- ! large
-
-Update working directory to null: this cleanup .hg/largefiles/dirstate
-
- $ hg update null
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- getting changed largefiles
- 0 largefiles updated, 0 removed
-
-Update working directory to tip, again.
-
- $ hg update
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- large: can't get file locally
- (no default or default-push path set in hgrc)
- 0 largefiles updated, 0 removed
- $ hg status
- ! large
- $ cd ..
-
-#if unix-permissions
-
-Portable way to print file permissions:
-
- $ cat > ls-l.py <<EOF
- > #!/usr/bin/env python
- > import sys, os
- > path = sys.argv[1]
- > print '%03o' % (os.lstat(path).st_mode & 0777)
- > EOF
- $ chmod +x ls-l.py
-
-Test that files in .hg/largefiles inherit mode from .hg/store, not
-from file in working copy:
-
- $ cd src
- $ chmod 750 .hg/store
- $ chmod 660 large
- $ echo change >> large
- $ hg commit -m change
- $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
- 640
-
-Test permission of with files in .hg/largefiles created by update:
-
- $ cd ../mirror
- $ rm -r "$USERCACHE" .hg/largefiles # avoid links
- $ chmod 750 .hg/store
- $ hg pull ../src --update -q
- $ ../ls-l.py .hg/largefiles/e151b474069de4ca6898f67ce2f2a7263adf8fea
- 640
-
-Test permission of files created by push:
-
- $ hg serve -R ../src -d -p $HGPORT --pid-file hg.pid \
- > --config "web.allow_push=*" --config web.push_ssl=no
- $ cat hg.pid >> $DAEMON_PIDS
-
- $ echo change >> large
- $ hg commit -m change
-
- $ rm -r "$USERCACHE"
-
- $ hg push -q http://localhost:$HGPORT/
-
- $ ../ls-l.py ../src/.hg/largefiles/b734e14a0971e370408ab9bce8d56d8485e368a9
- 640
-
- $ cd ..
-
-#endif
diff --git a/tests/test-largefiles-small-disk.t b/tests/test-largefiles-small-disk.t
deleted file mode 100644
index feb11e3..0000000
--- a/tests/test-largefiles-small-disk.t
+++ /dev/null
@@ -1,67 +0,0 @@
-Test how largefiles abort in case the disk runs full
-
- $ cat > criple.py <<EOF
- > import os, errno, shutil
- > from mercurial import util
- > #
- > # this makes the original largefiles code abort:
- > def copyfileobj(fsrc, fdst, length=16*1024):
- > fdst.write(fsrc.read(4))
- > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
- > shutil.copyfileobj = copyfileobj
- > #
- > # this makes the rewritten code abort:
- > def filechunkiter(f, size=65536, limit=None):
- > yield f.read(4)
- > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC))
- > util.filechunkiter = filechunkiter
- > #
- > def oslink(src, dest):
- > raise OSError("no hardlinks, try copying instead")
- > util.oslink = oslink
- > EOF
-
- $ echo "[extensions]" >> $HGRCPATH
- $ echo "largefiles =" >> $HGRCPATH
-
- $ hg init alice
- $ cd alice
- $ echo "this is a very big file" > big
- $ hg add --large big
- $ hg commit --config extensions.criple=$TESTTMP/criple.py -m big
- abort: No space left on device
- [255]
-
-The largefile is not created in .hg/largefiles:
-
- $ ls .hg/largefiles
- dirstate
-
-The user cache is not even created:
-
- >>> import os; os.path.exists("$HOME/.cache/largefiles/")
- False
-
-Make the commit with space on the device:
-
- $ hg commit -m big
-
-Now make a clone with a full disk, and make sure lfutil.link function
-makes copies instead of hardlinks:
-
- $ cd ..
- $ hg --config extensions.criple=$TESTTMP/criple.py clone --pull alice bob
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- abort: No space left on device
- [255]
-
-The largefile is not created in .hg/largefiles:
-
- $ ls bob/.hg/largefiles
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
deleted file mode 100644
index c64dd73..0000000
--- a/tests/test-largefiles.t
+++ /dev/null
@@ -1,1447 +0,0 @@
- $ USERCACHE="$TESTTMP/cache"; export USERCACHE
- $ mkdir "${USERCACHE}"
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > largefiles=
- > purge=
- > rebase=
- > transplant=
- > [phases]
- > publish=False
- > [largefiles]
- > minsize=2
- > patterns=glob:**.dat
- > usercache=${USERCACHE}
- > [hooks]
- > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
- > EOF
-
-Create the repo with a couple of revisions of both large and normal
-files, testing that status correctly shows largefiles and that summary output
-is correct.
-
- $ hg init a
- $ cd a
- $ mkdir sub
- $ echo normal1 > normal1
- $ echo normal2 > sub/normal2
- $ echo large1 > large1
- $ echo large2 > sub/large2
- $ hg add normal1 sub/normal2
- $ hg add --large large1 sub/large2
- $ hg commit -m "add files"
- Invoking status precommit hook
- A large1
- A normal1
- A sub/large2
- A sub/normal2
- $ echo normal11 > normal1
- $ echo normal22 > sub/normal2
- $ echo large11 > large1
- $ echo large22 > sub/large2
- $ hg commit -m "edit files"
- Invoking status precommit hook
- M large1
- M normal1
- M sub/large2
- M sub/normal2
- $ hg sum --large
- parent: 1:ce8896473775 tip
- edit files
- branch: default
- commit: (clean)
- update: (current)
- largefiles: No remote repo
-
-Commit preserved largefile contents.
-
- $ cat normal1
- normal11
- $ cat large1
- large11
- $ cat sub/normal2
- normal22
- $ cat sub/large2
- large22
-
-Test status, subdir and unknown files
-
- $ echo unknown > sub/unknown
- $ hg st --all
- ? sub/unknown
- C large1
- C normal1
- C sub/large2
- C sub/normal2
- $ hg st --all sub
- ? sub/unknown
- C sub/large2
- C sub/normal2
- $ rm sub/unknown
-
-Remove both largefiles and normal files.
-
- $ hg remove normal1 large1
- $ hg status large1
- R large1
- $ hg commit -m "remove files"
- Invoking status precommit hook
- R large1
- R normal1
- $ ls
- sub
- $ echo "testlargefile" > large1-test
- $ hg add --large large1-test
- $ hg st
- A large1-test
- $ hg rm large1-test
- not removing large1-test: file has been marked for add (use forget to undo)
- $ hg st
- A large1-test
- $ hg forget large1-test
- $ hg st
- ? large1-test
- $ rm large1-test
-
-Copy both largefiles and normal files (testing that status output is correct).
-
- $ hg cp sub/normal2 normal1
- $ hg cp sub/large2 large1
- $ hg commit -m "copy files"
- Invoking status precommit hook
- A large1
- A normal1
- $ cat normal1
- normal22
- $ cat large1
- large22
-
-Test moving largefiles and verify that normal files are also unaffected.
-
- $ hg mv normal1 normal3
- $ hg mv large1 large3
- $ hg mv sub/normal2 sub/normal4
- $ hg mv sub/large2 sub/large4
- $ hg commit -m "move files"
- Invoking status precommit hook
- A large3
- A normal3
- A sub/large4
- A sub/normal4
- R large1
- R normal1
- R sub/large2
- R sub/normal2
- $ cat normal3
- normal22
- $ cat large3
- large22
- $ cat sub/normal4
- normal22
- $ cat sub/large4
- large22
-
-Test copies and moves from a directory other than root (issue3516)
-
- $ cd ..
- $ hg init lf_cpmv
- $ cd lf_cpmv
- $ mkdir dira
- $ mkdir dira/dirb
- $ touch dira/dirb/largefile
- $ hg add --large dira/dirb/largefile
- $ hg commit -m "added"
- Invoking status precommit hook
- A dira/dirb/largefile
- $ cd dira
- $ hg cp dirb/largefile foo/largefile
- $ hg ci -m "deep copy"
- Invoking status precommit hook
- A dira/foo/largefile
- $ find . | sort
- .
- ./dirb
- ./dirb/largefile
- ./foo
- ./foo/largefile
- $ hg mv foo/largefile baz/largefile
- $ hg ci -m "moved"
- Invoking status precommit hook
- A dira/baz/largefile
- R dira/foo/largefile
- $ find . | sort
- .
- ./baz
- ./baz/largefile
- ./dirb
- ./dirb/largefile
- ./foo
- $ cd ../../a
-
-#if hgweb
-Test display of largefiles in hgweb
-
- $ hg serve -d -p $HGPORT --pid-file ../hg.pid
- $ cat ../hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw'
- 200 Script output follows
-
-
- drwxr-xr-x sub
- -rw-r--r-- 41 large3
- -rw-r--r-- 9 normal3
-
-
- $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw'
- 200 Script output follows
-
-
- -rw-r--r-- 41 large4
- -rw-r--r-- 9 normal4
-
-
- $ "$TESTDIR/killdaemons.py"
-#endif
-
-Test archiving the various revisions. These hit corner cases known with
-archiving.
-
- $ hg archive -r 0 ../archive0
- $ hg archive -r 1 ../archive1
- $ hg archive -r 2 ../archive2
- $ hg archive -r 3 ../archive3
- $ hg archive -r 4 ../archive4
- $ cd ../archive0
- $ cat normal1
- normal1
- $ cat large1
- large1
- $ cat sub/normal2
- normal2
- $ cat sub/large2
- large2
- $ cd ../archive1
- $ cat normal1
- normal11
- $ cat large1
- large11
- $ cat sub/normal2
- normal22
- $ cat sub/large2
- large22
- $ cd ../archive2
- $ ls
- sub
- $ cat sub/normal2
- normal22
- $ cat sub/large2
- large22
- $ cd ../archive3
- $ cat normal1
- normal22
- $ cat large1
- large22
- $ cat sub/normal2
- normal22
- $ cat sub/large2
- large22
- $ cd ../archive4
- $ cat normal3
- normal22
- $ cat large3
- large22
- $ cat sub/normal4
- normal22
- $ cat sub/large4
- large22
-
-Commit corner case: specify files to commit.
-
- $ cd ../a
- $ echo normal3 > normal3
- $ echo large3 > large3
- $ echo normal4 > sub/normal4
- $ echo large4 > sub/large4
- $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
- Invoking status precommit hook
- M large3
- M normal3
- M sub/large4
- M sub/normal4
- $ cat normal3
- normal3
- $ cat large3
- large3
- $ cat sub/normal4
- normal4
- $ cat sub/large4
- large4
-
-One more commit corner case: commit from a subdirectory.
-
- $ cd ../a
- $ echo normal33 > normal3
- $ echo large33 > large3
- $ echo normal44 > sub/normal4
- $ echo large44 > sub/large4
- $ cd sub
- $ hg commit -m "edit files yet again"
- Invoking status precommit hook
- M large3
- M normal3
- M sub/large4
- M sub/normal4
- $ cat ../normal3
- normal33
- $ cat ../large3
- large33
- $ cat normal4
- normal44
- $ cat large4
- large44
-
-Committing standins is not allowed.
-
- $ cd ..
- $ echo large3 > large3
- $ hg commit .hglf/large3 -m "try to commit standin"
- abort: file ".hglf/large3" is a largefile standin
- (commit the largefile itself instead)
- [255]
-
-Corner cases for adding largefiles.
-
- $ echo large5 > large5
- $ hg add --large large5
- $ hg add --large large5
- large5 already a largefile
- $ mkdir sub2
- $ echo large6 > sub2/large6
- $ echo large7 > sub2/large7
- $ hg add --large sub2
- adding sub2/large6 as a largefile (glob)
- adding sub2/large7 as a largefile (glob)
- $ hg st
- M large3
- A large5
- A sub2/large6
- A sub2/large7
-
-Test "hg status" with combination of 'file pattern' and 'directory
-pattern' for largefiles:
-
- $ hg status sub2/large6 sub2
- A sub2/large6
- A sub2/large7
-
-Config settings (pattern **.dat, minsize 2 MB) are respected.
-
- $ echo testdata > test.dat
- $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
- $ hg add
- adding reallylarge as a largefile
- adding test.dat as a largefile
-
-Test that minsize and --lfsize handle float values;
-also tests that --lfsize overrides largefiles.minsize.
-(0.250 MB = 256 kB = 262144 B)
-
- $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
- $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
- $ hg --config largefiles.minsize=.25 add
- adding ratherlarge as a largefile
- adding medium
- $ hg forget medium
- $ hg --config largefiles.minsize=.25 add --lfsize=.125
- adding medium as a largefile
- $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
- $ hg --config largefiles.minsize=.25 add --lfsize=.125
- adding notlarge
- $ hg forget notlarge
-
-Test forget on largefiles.
-
- $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
- $ hg commit -m "add/edit more largefiles"
- Invoking status precommit hook
- A sub2/large6
- A sub2/large7
- R large3
- ? large5
- ? medium
- ? notlarge
- ? ratherlarge
- ? reallylarge
- ? test.dat
- $ hg st
- ? large3
- ? large5
- ? medium
- ? notlarge
- ? ratherlarge
- ? reallylarge
- ? test.dat
-
-Purge with largefiles: verify that largefiles are still in the working
-dir after a purge.
-
- $ hg purge --all
- $ cat sub/large4
- large44
- $ cat sub2/large6
- large6
- $ cat sub2/large7
- large7
-
-Test addremove: verify that files that should be added as largfiles are added as
-such and that already-existing largfiles are not added as normal files by
-accident.
-
- $ rm normal3
- $ rm sub/large4
- $ echo "testing addremove with patterns" > testaddremove.dat
- $ echo "normaladdremove" > normaladdremove
- $ hg addremove
- removing sub/large4
- adding testaddremove.dat as a largefile
- removing normal3
- adding normaladdremove
-
-Test addremove with -R
-
- $ hg up -C
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ rm normal3
- $ rm sub/large4
- $ echo "testing addremove with patterns" > testaddremove.dat
- $ echo "normaladdremove" > normaladdremove
- $ cd ..
- $ hg -R a addremove
- removing sub/large4
- adding a/testaddremove.dat as a largefile (glob)
- removing normal3
- adding normaladdremove
- $ cd a
-
-Test 3364
- $ hg clone . ../addrm
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- $ cd ../addrm
- $ cat >> .hg/hgrc <<EOF
- > [hooks]
- > post-commit.stat=sh -c "echo \"Invoking status postcommit hook\"; hg status -A"
- > EOF
- $ touch foo
- $ hg add --large foo
- $ hg ci -m "add foo"
- Invoking status precommit hook
- A foo
- Invoking status postcommit hook
- C foo
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
- $ rm foo
- $ hg st
- ! foo
-hmm.. no precommit invoked, but there is a postcommit??
- $ hg ci -m "will not checkin"
- nothing changed
- Invoking status postcommit hook
- ! foo
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
- [1]
- $ hg addremove
- removing foo
- $ hg st
- R foo
- $ hg ci -m "used to say nothing changed"
- Invoking status precommit hook
- R foo
- Invoking status postcommit hook
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
- $ hg st
-
-Test 3507 (both normal files and largefiles were a problem)
-
- $ touch normal
- $ touch large
- $ hg add normal
- $ hg add --large large
- $ hg ci -m "added"
- Invoking status precommit hook
- A large
- A normal
- Invoking status postcommit hook
- C large
- C normal
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
- $ hg remove normal
- $ hg addremove --traceback
- $ hg ci -m "addremoved normal"
- Invoking status precommit hook
- R normal
- Invoking status postcommit hook
- C large
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
- $ hg up -C '.^'
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 0 largefiles updated, 0 removed
- $ hg remove large
- $ hg addremove --traceback
- $ hg ci -m "removed large"
- Invoking status precommit hook
- R large
- created new head
- Invoking status postcommit hook
- C normal
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
-
-Test that a standin can't be added as a large file
-
- $ touch large
- $ hg add --large large
- $ hg ci -m "add"
- Invoking status precommit hook
- A large
- Invoking status postcommit hook
- C large
- C normal
- C normal3
- C sub/large4
- C sub/normal4
- C sub2/large6
- C sub2/large7
- $ hg remove large
- $ touch large
- $ hg addremove --config largefiles.patterns=**large --traceback
- adding large as a largefile
-
-Test that outgoing --large works (with revsets too)
- $ hg outgoing --rev '.^' --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.
-
- $ hg clone . ../b
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- $ cd ../b
- $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
- 7:daea875e9014 add/edit more largefiles
- 6:4355d653f84f edit files yet again
- 5:9d5af5072dbd edit files again
- 4:74c02385b94c move files
- 3:9e8fbc4bce62 copy files
- 2:51a0ae4d5864 remove files
- 1:ce8896473775 edit files
- 0:30d30fe6a5be add files
- $ cat normal3
- normal33
- $ cat sub/normal4
- normal44
- $ cat sub/large4
- large44
- $ cat sub2/large6
- large6
- $ cat sub2/large7
- large7
- $ cd ..
- $ hg clone a -r 3 c
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 10 changes to 4 files
- updating to branch default
- 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 2 largefiles updated, 0 removed
- $ cd c
- $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
- 3:9e8fbc4bce62 copy files
- 2:51a0ae4d5864 remove files
- 1:ce8896473775 edit files
- 0:30d30fe6a5be add files
- $ cat normal1
- normal22
- $ cat large1
- large22
- $ cat sub/normal2
- normal22
- $ cat sub/large2
- large22
-
-Old revisions of a clone have correct largefiles content (this also
-tests update).
-
- $ hg update -r 1
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ cat large1
- large11
- $ cat sub/large2
- large22
- $ cd ..
-
-Test cloning with --all-largefiles flag
-
- $ rm "${USERCACHE}"/*
- $ hg clone --all-largefiles a a-backup
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- 8 additional largefiles cached
-
- $ hg clone --all-largefiles a ssh://localhost/a
- abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
- [255]
-
-Test pulling with --all-largefiles flag
-
- $ rm -Rf a-backup
- $ hg clone -r 1 a a-backup
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 8 changes to 4 files
- updating to branch default
- 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 2 largefiles updated, 0 removed
- $ rm "${USERCACHE}"/*
- $ cd a-backup
- $ hg pull --all-largefiles
- pulling from $TESTTMP/a (glob)
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 6 changesets with 16 changes to 8 files
- (run 'hg update' to get a working copy)
- caching new largefiles
- 3 largefiles cached
- 3 additional largefiles cached
- $ cd ..
-
-Rebasing between two repositories does not revert largefiles to old
-revisions (this was a very bad bug that took a lot of work to fix).
-
- $ hg clone a d
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- $ cd b
- $ echo large4-modified > sub/large4
- $ echo normal3-modified > normal3
- $ hg commit -m "modify normal file and largefile in repo b"
- Invoking status precommit hook
- M normal3
- M sub/large4
- $ cd ../d
- $ echo large6-modified > sub2/large6
- $ echo normal4-modified > sub/normal4
- $ hg commit -m "modify normal file largefile in repo d"
- Invoking status precommit hook
- M sub/normal4
- M sub2/large6
- $ cd ..
- $ hg clone d e
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- $ cd d
- $ hg pull --rebase ../b
- pulling from ../b
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 2 changes to 2 files (+1 heads)
- Invoking status precommit hook
- M sub/normal4
- M sub2/large6
- saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
- nothing to rebase
- $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
- 9:598410d3eb9a modify normal file largefile in repo d
- 8:a381d2c8c80e modify normal file and largefile in repo b
- 7:daea875e9014 add/edit more largefiles
- 6:4355d653f84f edit files yet again
- 5:9d5af5072dbd edit files again
- 4:74c02385b94c move files
- 3:9e8fbc4bce62 copy files
- 2:51a0ae4d5864 remove files
- 1:ce8896473775 edit files
- 0:30d30fe6a5be add files
- $ cat normal3
- normal3-modified
- $ cat sub/normal4
- normal4-modified
- $ cat sub/large4
- large4-modified
- $ cat sub2/large6
- large6-modified
- $ cat sub2/large7
- large7
- $ cd ../e
- $ hg pull ../b
- pulling from ../b
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 2 changes to 2 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- caching new largefiles
- 0 largefiles cached
- $ hg rebase
- Invoking status precommit hook
- M sub/normal4
- M sub2/large6
- saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
- $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
- 9:598410d3eb9a modify normal file largefile in repo d
- 8:a381d2c8c80e modify normal file and largefile in repo b
- 7:daea875e9014 add/edit more largefiles
- 6:4355d653f84f edit files yet again
- 5:9d5af5072dbd edit files again
- 4:74c02385b94c move files
- 3:9e8fbc4bce62 copy files
- 2:51a0ae4d5864 remove files
- 1:ce8896473775 edit files
- 0:30d30fe6a5be add files
- $ cat normal3
- normal3-modified
- $ cat sub/normal4
- normal4-modified
- $ cat sub/large4
- large4-modified
- $ cat sub2/large6
- large6-modified
- $ cat sub2/large7
- large7
-
-Rollback on largefiles.
-
- $ echo large4-modified-again > sub/large4
- $ hg commit -m "Modify large4 again"
- Invoking status precommit hook
- M sub/large4
- $ hg rollback
- repository tip rolled back to revision 9 (undo commit)
- working directory now based on revision 9
- $ hg st
- M sub/large4
- $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
- 9:598410d3eb9a modify normal file largefile in repo d
- 8:a381d2c8c80e modify normal file and largefile in repo b
- 7:daea875e9014 add/edit more largefiles
- 6:4355d653f84f edit files yet again
- 5:9d5af5072dbd edit files again
- 4:74c02385b94c move files
- 3:9e8fbc4bce62 copy files
- 2:51a0ae4d5864 remove files
- 1:ce8896473775 edit files
- 0:30d30fe6a5be add files
- $ cat sub/large4
- large4-modified-again
-
-"update --check" refuses to update with uncommitted changes.
- $ hg update --check 8
- abort: uncommitted local changes
- [255]
-
-"update --clean" leaves correct largefiles in working copy.
-
- $ hg update --clean
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ cat normal3
- normal3-modified
- $ cat sub/normal4
- normal4-modified
- $ cat sub/large4
- large4-modified
- $ cat sub2/large6
- large6-modified
- $ cat sub2/large7
- large7
-
-Now "update check" is happy.
- $ hg update --check 8
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ hg update --check
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
-
-Test removing empty largefiles directories on update
- $ test -d sub2 && echo "sub2 exists"
- sub2 exists
- $ hg update -q null
- $ test -d sub2 && echo "error: sub2 should not exist anymore"
- [1]
- $ hg update -q
-
-Test hg remove removes empty largefiles directories
- $ test -d sub2 && echo "sub2 exists"
- sub2 exists
- $ hg remove sub2/*
- $ test -d sub2 && echo "error: sub2 should not exist anymore"
- [1]
- $ hg revert sub2/large6 sub2/large7
-
-"revert" works on largefiles (and normal files too).
- $ echo hack3 >> normal3
- $ echo hack4 >> sub/normal4
- $ echo hack4 >> sub/large4
- $ rm sub2/large6
- $ hg revert sub2/large6
- $ hg rm sub2/large6
- $ echo new >> sub2/large8
- $ hg add --large sub2/large8
-# XXX we don't really want to report that we're reverting the standin;
-# that's just an implementation detail. But I don't see an obvious fix. ;-(
- $ hg revert sub
- reverting .hglf/sub/large4 (glob)
- reverting sub/normal4 (glob)
- $ hg status
- M normal3
- A sub2/large8
- R sub2/large6
- ? sub/large4.orig
- ? sub/normal4.orig
- $ cat sub/normal4
- normal4-modified
- $ cat sub/large4
- large4-modified
- $ hg revert -a --no-backup
- undeleting .hglf/sub2/large6 (glob)
- forgetting .hglf/sub2/large8 (glob)
- reverting normal3
- $ hg status
- ? sub/large4.orig
- ? sub/normal4.orig
- ? sub2/large8
- $ cat normal3
- normal3-modified
- $ cat sub2/large6
- large6-modified
- $ rm sub/*.orig sub2/large8
-
-revert some files to an older revision
- $ hg revert --no-backup -r 8 sub2
- reverting .hglf/sub2/large6 (glob)
- $ cat sub2/large6
- large6
- $ hg revert --no-backup -C -r '.^' sub2
- reverting .hglf/sub2/large6 (glob)
- $ hg revert --no-backup sub2
- reverting .hglf/sub2/large6 (glob)
- $ hg status
-
-"verify --large" actually verifies largefiles
-
- $ hg verify --large
- checking changesets
- checking manifests
- crosschecking files in changesets and manifests
- checking files
- 10 files, 10 changesets, 28 total revisions
- searching 1 changesets for largefiles
- verified existence of 3 revisions of 3 largefiles
-
-Merging does not revert to old versions of largefiles and also check
-that merging after having pulled from a non-default remote works
-correctly.
-
- $ cd ..
- $ hg clone -r 7 e temp
- adding changesets
- adding manifests
- adding file changes
- added 8 changesets with 24 changes to 10 files
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- $ hg clone temp f
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
-# Delete the largefiles in the largefiles system cache so that we have an
-# opportunity to test that caching after a pull works.
- $ rm "${USERCACHE}"/*
- $ cd f
- $ echo "large4-merge-test" > sub/large4
- $ hg commit -m "Modify large4 to test merge"
- Invoking status precommit hook
- M sub/large4
- $ hg pull ../e
- pulling from ../e
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 4 changes to 4 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- caching new largefiles
- 2 largefiles cached
- $ hg merge
- merging sub/large4
- largefile sub/large4 has a merge conflict
- keep (l)ocal or take (o)ther? l
- 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ hg commit -m "Merge repos e and f"
- Invoking status precommit hook
- M normal3
- M sub/normal4
- M sub2/large6
- $ cat normal3
- normal3-modified
- $ cat sub/normal4
- normal4-modified
- $ cat sub/large4
- large4-merge-test
- $ cat sub2/large6
- large6-modified
- $ cat sub2/large7
- large7
-
-Test status after merging with a branch that introduces a new largefile:
-
- $ echo large > large
- $ hg add --large large
- $ hg commit -m 'add largefile'
- Invoking status precommit hook
- A large
- $ hg update -q ".^"
- $ echo change >> normal3
- $ hg commit -m 'some change'
- Invoking status precommit hook
- M normal3
- created new head
- $ hg merge
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ hg status
- M large
-
-Test that a normal file and a largefile with the same name and path cannot
-coexist.
-
- $ rm sub2/large7
- $ echo "largeasnormal" > sub2/large7
- $ hg add sub2/large7
- sub2/large7 already a largefile
-
-Test that transplanting a largefile change works correctly.
-
- $ cd ..
- $ hg clone -r 8 d g
- adding changesets
- adding manifests
- adding file changes
- added 9 changesets with 26 changes to 10 files
- updating to branch default
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 3 largefiles updated, 0 removed
- $ cd g
- $ hg transplant -s ../d 598410d3eb9a
- searching for changes
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 2 changes to 2 files
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
- 9:598410d3eb9a modify normal file largefile in repo d
- 8:a381d2c8c80e modify normal file and largefile in repo b
- 7:daea875e9014 add/edit more largefiles
- 6:4355d653f84f edit files yet again
- 5:9d5af5072dbd edit files again
- 4:74c02385b94c move files
- 3:9e8fbc4bce62 copy files
- 2:51a0ae4d5864 remove files
- 1:ce8896473775 edit files
- 0:30d30fe6a5be add files
- $ cat normal3
- normal3-modified
- $ cat sub/normal4
- normal4-modified
- $ cat sub/large4
- large4-modified
- $ cat sub2/large6
- large6-modified
- $ cat sub2/large7
- large7
-
-Cat a largefile
- $ hg cat normal3
- normal3-modified
- $ hg cat sub/large4
- large4-modified
- $ rm "${USERCACHE}"/*
- $ hg cat -r a381d2c8c80e -o cat.out sub/large4
- $ cat cat.out
- large4-modified
- $ rm cat.out
- $ hg cat -r a381d2c8c80e normal3
- normal3-modified
- $ hg cat -r '.^' normal3
- normal3-modified
- $ hg cat -r '.^' sub/large4
- large4-modified
-
-Test that renaming a largefile results in correct output for status
-
- $ hg rename sub/large4 large4-renamed
- $ hg commit -m "test rename output"
- Invoking status precommit hook
- A large4-renamed
- R sub/large4
- $ cat large4-renamed
- large4-modified
- $ cd sub2
- $ hg rename large6 large6-renamed
- $ hg st
- A sub2/large6-renamed
- R sub2/large6
- $ cd ..
-
-Test --normal flag
-
- $ dd if=/dev/zero bs=2k count=11k > new-largefile 2> /dev/null
- $ hg add --normal --large new-largefile
- abort: --normal cannot be used with --large
- [255]
- $ hg add --normal new-largefile
- new-largefile: up to 69 MB of RAM may be required to manage this file
- (use 'hg revert new-largefile' to cancel the pending addition)
- $ cd ..
-
-#if serve
-vanilla clients not locked out from largefiles servers on vanilla repos
- $ mkdir r1
- $ cd r1
- $ hg init
- $ echo c1 > f1
- $ hg add f1
- $ hg commit -m "m1"
- Invoking status precommit hook
- A f1
- $ cd ..
- $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
- $ cat hg.pid >> $DAEMON_PIDS
- $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
-largefiles clients still work with vanilla servers
- $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
- $ cat hg.pid >> $DAEMON_PIDS
- $ hg clone http://localhost:$HGPORT1 r3
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-#endif
-
-
-vanilla clients locked out from largefiles http repos
- $ mkdir r4
- $ cd r4
- $ hg init
- $ echo c1 > f1
- $ hg add --large f1
- $ hg commit -m "m1"
- Invoking status precommit hook
- A f1
- $ cd ..
-
-#if serve
- $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
- $ cat hg.pid >> $DAEMON_PIDS
- $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
- abort: remote error:
-
- This repository uses the largefiles extension.
-
- Please enable it in your Mercurial config file.
- [255]
-
-used all HGPORTs, kill all daemons
- $ "$TESTDIR/killdaemons.py"
-#endif
-
-vanilla clients locked out from largefiles ssh repos
- $ hg --config extensions.largefiles=! clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/r4 r5
- abort: remote error:
-
- This repository uses the largefiles extension.
-
- Please enable it in your Mercurial config file.
- [255]
-
-#if serve
-
-largefiles clients refuse to push largefiles repos to vanilla servers
- $ mkdir r6
- $ cd r6
- $ hg init
- $ echo c1 > f1
- $ hg add f1
- $ hg commit -m "m1"
- Invoking status precommit hook
- A f1
- $ cat >> .hg/hgrc <<!
- > [web]
- > push_ssl = false
- > allow_push = *
- > !
- $ cd ..
- $ hg clone r6 r7
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd r7
- $ echo c2 > f2
- $ hg add --large f2
- $ hg commit -m "m2"
- Invoking status precommit hook
- A f2
- $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
- $ cat ../hg.pid >> $DAEMON_PIDS
- $ hg push http://localhost:$HGPORT
- pushing to http://localhost:$HGPORT/
- searching for changes
- abort: http://localhost:$HGPORT/ does not appear to be a largefile store
- [255]
- $ cd ..
-
-putlfile errors are shown (issue3123)
-Corrupt the cached largefile in r7 and in the usercache (required for testing on vfat)
- $ echo corruption > "$TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8"
- $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8"
- $ hg init empty
- $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \
- > --config 'web.allow_push=*' --config web.push_ssl=False
- $ cat hg.pid >> $DAEMON_PIDS
- $ hg push -R r7 http://localhost:$HGPORT1
- pushing to http://localhost:$HGPORT1/
- searching for changes
- remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash
- abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
- [255]
- $ rm -rf empty
-
-Push a largefiles repository to a served empty repository
- $ hg init r8
- $ echo c3 > r8/f1
- $ hg add --large r8/f1 -R r8
- $ hg commit -m "m1" -R r8
- Invoking status precommit hook
- A f1
- $ hg init empty
- $ hg serve -R empty -d -p $HGPORT2 --pid-file hg.pid \
- > --config 'web.allow_push=*' --config web.push_ssl=False
- $ cat hg.pid >> $DAEMON_PIDS
- $ rm "${USERCACHE}"/*
- $ hg push -R r8 http://localhost:$HGPORT2
- pushing to http://localhost:$HGPORT2/
- searching for changes
- searching for changes
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- $ rm -rf empty
-
-used all HGPORTs, kill all daemons
- $ "$TESTDIR/killdaemons.py"
-
-#endif
-
-
-#if unix-permissions
-
-Clone a local repository owned by another user
-We have to simulate that here by setting $HOME and removing write permissions
- $ ORIGHOME="$HOME"
- $ mkdir alice
- $ HOME="`pwd`/alice"
- $ cd alice
- $ hg init pubrepo
- $ cd pubrepo
- $ dd if=/dev/zero bs=1k count=11k > a-large-file 2> /dev/null
- $ hg add --large a-large-file
- $ hg commit -m "Add a large file"
- Invoking status precommit hook
- A a-large-file
- $ cd ..
- $ chmod -R a-w pubrepo
- $ cd ..
- $ mkdir bob
- $ HOME="`pwd`/bob"
- $ cd bob
- $ hg clone --pull ../alice/pubrepo pubrepo
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ cd ..
- $ chmod -R u+w alice/pubrepo
- $ HOME="$ORIGHOME"
-
-#endif
-
-#if symlink
-
-Symlink to a large largefile should behave the same as a symlink to a normal file
- $ hg init largesymlink
- $ cd largesymlink
- $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
- $ hg add --large largefile
- $ hg commit -m "commit a large file"
- Invoking status precommit hook
- A largefile
- $ ln -s largefile largelink
- $ hg add largelink
- $ hg commit -m "commit a large symlink"
- Invoking status precommit hook
- A largelink
- $ rm -f largelink
- $ hg up >/dev/null
- $ test -f largelink
- [1]
- $ test -L largelink
- [1]
- $ rm -f largelink # make next part of the test independent of the previous
- $ hg up -C >/dev/null
- $ test -f largelink
- $ test -L largelink
- $ cd ..
-
-#endif
-
-test for pattern matching on 'hg status':
-to boost performance, largefiles checks whether specified patterns are
-related to largefiles in working directory (NOT to STANDIN) or not.
-
- $ hg init statusmatch
- $ cd statusmatch
-
- $ mkdir -p a/b/c/d
- $ echo normal > a/b/c/d/e.normal.txt
- $ hg add a/b/c/d/e.normal.txt
- $ echo large > a/b/c/d/e.large.txt
- $ hg add --large a/b/c/d/e.large.txt
- $ mkdir -p a/b/c/x
- $ echo normal > a/b/c/x/y.normal.txt
- $ hg add a/b/c/x/y.normal.txt
- $ hg commit -m 'add files'
- Invoking status precommit hook
- A a/b/c/d/e.large.txt
- A a/b/c/d/e.normal.txt
- A a/b/c/x/y.normal.txt
-
-(1) no pattern: no performance boost
- $ hg status -A
- C a/b/c/d/e.large.txt
- C a/b/c/d/e.normal.txt
- C a/b/c/x/y.normal.txt
-
-(2) pattern not related to largefiles: performance boost
- $ hg status -A a/b/c/x
- C a/b/c/x/y.normal.txt
-
-(3) pattern related to largefiles: no performance boost
- $ hg status -A a/b/c/d
- C a/b/c/d/e.large.txt
- C a/b/c/d/e.normal.txt
-
-(4) pattern related to STANDIN (not to largefiles): performance boost
- $ hg status -A .hglf/a
- C .hglf/a/b/c/d/e.large.txt
-
-(5) mixed case: no performance boost
- $ hg status -A a/b/c/x a/b/c/d
- C a/b/c/d/e.large.txt
- C a/b/c/d/e.normal.txt
- C a/b/c/x/y.normal.txt
-
-verify that largefiles doesn't break filesets
-
- $ hg log --rev . --exclude "set:binary()"
- changeset: 0:41bd42f10efa
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add files
-
-verify that large files in subrepos handled properly
- $ hg init subrepo
- $ echo "subrepo = subrepo" > .hgsub
- $ hg add .hgsub
- $ hg ci -m "add subrepo"
- Invoking status precommit hook
- A .hgsub
- ? .hgsubstate
- $ echo "rev 1" > subrepo/large.txt
- $ hg -R subrepo add --large subrepo/large.txt
- $ hg sum
- parent: 1:8ee150ea2e9c tip
- add subrepo
- branch: default
- commit: 1 subrepos
- update: (current)
- $ hg st
- $ hg st -S
- A subrepo/large.txt
- $ hg ci -S -m "commit top repo"
- committing subrepository subrepo
- Invoking status precommit hook
- A large.txt
- Invoking status precommit hook
- M .hgsubstate
-# No differences
- $ hg st -S
- $ hg sum
- parent: 2:ce4cd0c527a6 tip
- commit top repo
- branch: default
- commit: (clean)
- update: (current)
- $ echo "rev 2" > subrepo/large.txt
- $ hg st -S
- M subrepo/large.txt
- $ hg sum
- parent: 2:ce4cd0c527a6 tip
- commit top repo
- branch: default
- commit: 1 subrepos
- update: (current)
- $ hg ci -m "this commit should fail without -S"
- abort: uncommitted changes in subrepo subrepo
- (use --subrepos for recursive commit)
- [255]
-
-Add a normal file to the subrepo, then test archiving
-
- $ echo 'normal file' > subrepo/normal.txt
- $ hg -R subrepo add subrepo/normal.txt
-
-Lock in subrepo, otherwise the change isn't archived
-
- $ hg ci -S -m "add normal file to top level"
- committing subrepository subrepo
- Invoking status precommit hook
- M large.txt
- A normal.txt
- Invoking status precommit hook
- M .hgsubstate
- $ hg archive -S lf_subrepo_archive
- $ find lf_subrepo_archive | sort
- lf_subrepo_archive
- lf_subrepo_archive/.hg_archival.txt
- lf_subrepo_archive/.hgsub
- lf_subrepo_archive/.hgsubstate
- lf_subrepo_archive/a
- lf_subrepo_archive/a/b
- lf_subrepo_archive/a/b/c
- lf_subrepo_archive/a/b/c/d
- lf_subrepo_archive/a/b/c/d/e.large.txt
- lf_subrepo_archive/a/b/c/d/e.normal.txt
- lf_subrepo_archive/a/b/c/x
- lf_subrepo_archive/a/b/c/x/y.normal.txt
- lf_subrepo_archive/subrepo
- lf_subrepo_archive/subrepo/large.txt
- lf_subrepo_archive/subrepo/normal.txt
-
- $ cd ..
diff --git a/tests/test-lfconvert.t b/tests/test-lfconvert.t
deleted file mode 100644
index 50330eb..0000000
--- a/tests/test-lfconvert.t
+++ /dev/null
@@ -1,272 +0,0 @@
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > largefiles =
- > share =
- > graphlog =
- > mq =
- > [largefiles]
- > minsize = 0.5
- > patterns = **.other
- > **.dat
- > EOF
-
-"lfconvert" works
- $ hg init bigfile-repo
- $ cd bigfile-repo
- $ cat >> .hg/hgrc <<EOF
- > [extensions]
- > largefiles = !
- > EOF
- $ mkdir sub
- $ dd if=/dev/zero bs=1k count=256 > large 2> /dev/null
- $ dd if=/dev/zero bs=1k count=256 > large2 2> /dev/null
- $ echo normal > normal1
- $ echo alsonormal > sub/normal2
- $ dd if=/dev/zero bs=1k count=10 > sub/maybelarge.dat 2> /dev/null
- $ hg addremove
- adding large
- adding large2
- adding normal1
- adding sub/maybelarge.dat
- adding sub/normal2
- $ hg commit -m"add large, normal1" large normal1
- $ hg commit -m"add sub/*" sub
-
-Test tag parsing
- $ cat >> .hgtags <<EOF
- > IncorrectlyFormattedTag!
- > invalidhash sometag
- > 0123456789abcdef anothertag
- > EOF
- $ hg add .hgtags
- $ hg commit -m"add large2" large2 .hgtags
-
-Test link+rename largefile codepath
- $ [ -d .hg/largefiles ] && echo fail || echo pass
- pass
- $ cd ..
- $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
- initializing destination largefiles-repo
- skipping incorrectly formatted tag IncorrectlyFormattedTag!
- skipping incorrectly formatted id invalidhash
- no mapping for id 0123456789abcdef
-#if symlink
- $ hg --cwd bigfile-repo rename large2 large3
- $ ln -sf large bigfile-repo/large3
- $ hg --cwd bigfile-repo commit -m"make large2 a symlink" large2 large3
- $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo-symlink
- initializing destination largefiles-repo-symlink
- skipping incorrectly formatted tag IncorrectlyFormattedTag!
- skipping incorrectly formatted id invalidhash
- no mapping for id 0123456789abcdef
- abort: renamed/copied largefile large3 becomes symlink
- [255]
-#endif
- $ cd bigfile-repo
- $ hg strip --no-backup 2
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ cd ..
- $ rm -rf largefiles-repo largefiles-repo-symlink
-
- $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
- initializing destination largefiles-repo
-
-"lfconvert" converts content correctly
- $ cd largefiles-repo
- $ hg up
- 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 2 largefiles updated, 0 removed
- $ hg locate
- .hglf/large
- .hglf/sub/maybelarge.dat
- normal1
- sub/normal2
- $ cat normal1
- normal
- $ cat sub/normal2
- alsonormal
- $ "$TESTDIR/md5sum.py" large sub/maybelarge.dat
- ec87a838931d4d5d2e94a04644788a55 large
- 1276481102f218c981e0324180bafd9f sub/maybelarge.dat
-
-"lfconvert" adds 'largefiles' to .hg/requires.
- $ cat .hg/requires
- largefiles
- revlogv1
- fncache
- store
- dotencode
-
-"lfconvert" includes a newline at the end of the standin files.
- $ cat .hglf/large .hglf/sub/maybelarge.dat
- 2e000fa7e85759c7f4c254d4d9c33ef481e459a7
- 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
- $ cd ..
-
-add some changesets to rename/remove/merge
- $ cd bigfile-repo
- $ hg mv -q sub stuff
- $ hg commit -m"rename sub/ to stuff/"
- $ hg update -q 1
- $ echo blah >> normal3
- $ echo blah >> sub/normal2
- $ echo blah >> sub/maybelarge.dat
- $ "$TESTDIR/md5sum.py" sub/maybelarge.dat
- 1dd0b99ff80e19cff409702a1d3f5e15 sub/maybelarge.dat
- $ hg commit -A -m"add normal3, modify sub/*"
- adding normal3
- created new head
- $ hg rm large normal3
- $ hg commit -q -m"remove large, normal3"
- $ hg merge
- merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat
- warning: $TESTTMP/bigfile-repo/stuff/maybelarge.dat looks like a binary file. (glob)
- merging stuff/maybelarge.dat incomplete! (edit conflicts, then use 'hg resolve --mark')
- merging sub/normal2 and stuff/normal2 to stuff/normal2
- 0 files updated, 1 files merged, 0 files removed, 1 files unresolved
- use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ hg cat -r . sub/maybelarge.dat > stuff/maybelarge.dat
- $ hg resolve -m stuff/maybelarge.dat
- $ hg commit -m"merge"
- $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
- @ 5:4884f215abda merge
- |\
- | o 4:7285f817b77e remove large, normal3
- | |
- | o 3:67e3892e3534 add normal3, modify sub/*
- | |
- o | 2:c96c8beb5d56 rename sub/ to stuff/
- |/
- o 1:020c65d24e11 add sub/*
- |
- o 0:117b8328f97a add large, normal1
-
- $ cd ..
-
-lfconvert with rename, merge, and remove
- $ rm -rf largefiles-repo
- $ hg lfconvert --size 0.2 bigfile-repo largefiles-repo
- initializing destination largefiles-repo
- $ cd largefiles-repo
- $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
- o 5:8e05f5f2b77e 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
-
- $ hg locate -r 2
- .hglf/large
- .hglf/stuff/maybelarge.dat
- normal1
- stuff/normal2
- $ hg locate -r 3
- .hglf/large
- .hglf/sub/maybelarge.dat
- normal1
- normal3
- sub/normal2
- $ hg locate -r 4
- .hglf/sub/maybelarge.dat
- normal1
- sub/normal2
- $ hg locate -r 5
- .hglf/stuff/maybelarge.dat
- normal1
- stuff/normal2
- $ hg update
- 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
- getting changed largefiles
- 1 largefiles updated, 0 removed
- $ cat stuff/normal2
- alsonormal
- blah
- $ "$TESTDIR/md5sum.py" stuff/maybelarge.dat
- 1dd0b99ff80e19cff409702a1d3f5e15 stuff/maybelarge.dat
- $ cat .hglf/stuff/maybelarge.dat
- 76236b6a2c6102826c61af4297dd738fb3b1de38
- $ cd ..
-
-"lfconvert" error cases
- $ hg lfconvert http://localhost/foo foo
- abort: http://localhost/foo is not a local Mercurial repo
- [255]
- $ hg lfconvert foo ssh://localhost/foo
- abort: ssh://localhost/foo is not a local Mercurial repo
- [255]
- $ hg lfconvert nosuchrepo foo
- abort: repository nosuchrepo not found!
- [255]
- $ hg share -q -U bigfile-repo shared
- $ printf 'bogus' > shared/.hg/sharedpath
- $ hg lfconvert shared foo
- abort: .hg/sharedpath points to nonexistent directory $TESTTMP/bogus! (glob)
- [255]
- $ hg lfconvert bigfile-repo largefiles-repo
- initializing destination largefiles-repo
- abort: repository largefiles-repo already exists!
- [255]
-
-add another largefile to the new largefiles repo
- $ cd largefiles-repo
- $ dd if=/dev/zero bs=1k count=1k > anotherlarge 2> /dev/null
- $ hg add --lfsize=1 anotherlarge
- $ hg commit -m "add anotherlarge (should be a largefile)"
- $ cat .hglf/anotherlarge
- 3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
- $ cd ..
-
-round-trip: converting back to a normal (non-largefiles) repo with
-"lfconvert --to-normal" should give the same as ../bigfile-repo
- $ cd largefiles-repo
- $ hg lfconvert --to-normal . ../normal-repo
- initializing destination ../normal-repo
- $ cd ../normal-repo
- $ cat >> .hg/hgrc <<EOF
- > [extensions]
- > largefiles = !
- > EOF
-
-# Hmmm: the changeset ID for rev 5 is different from the original
-# normal repo (../bigfile-repo), because the changelog filelist
-# differs between the two incarnations of rev 5: this repo includes
-# 'large' in the list, but ../bigfile-repo does not. Since rev 5
-# removes 'large' relative to the first parent in both repos, it seems
-# to me that lfconvert is doing a *better* job than
-# "hg remove" + "hg merge" + "hg commit".
-# $ hg -R ../bigfile-repo debugdata -c 5
-# $ hg debugdata -c 5
- $ hg glog --template "{rev}:{node|short} {desc|firstline}\n"
- o 6:1635824e6f59 add anotherlarge (should be a largefile)
- |
- o 5:7215f8deeaaf merge
- |\
- | o 4:7285f817b77e remove large, normal3
- | |
- | o 3:67e3892e3534 add normal3, modify sub/*
- | |
- o | 2:c96c8beb5d56 rename sub/ to stuff/
- |/
- o 1:020c65d24e11 add sub/*
- |
- o 0:117b8328f97a add large, normal1
-
- $ hg update
- 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg locate
- anotherlarge
- normal1
- stuff/maybelarge.dat
- stuff/normal2
- $ [ -d .hg/largefiles ] && echo fail || echo pass
- pass
-
- $ cd ..
diff --git a/tests/test-locate.t b/tests/test-locate.t
index 9d18a3e..0f5bf87 100644
--- a/tests/test-locate.t
+++ b/tests/test-locate.t
@@ -1,5 +1,5 @@
- $ hg init repo
- $ cd repo
+ $ hg init t
+ $ cd t
$ echo 0 > a
$ echo 0 > b
$ echo 0 > t.h
@@ -88,34 +88,33 @@ Issue294: hg remove --after dir fails when dir.* also exists
$ rm -r t
$ hg locate 't/**'
- t/b (glob)
- t/e.h (glob)
- t/x (glob)
+ t/b
+ t/e.h
+ t/x
$ mkdir otherdir
$ cd otherdir
$ hg locate b
- ../b (glob)
- ../t/b (glob)
+ ../b
+ ../t/b
$ hg locate '*.h'
- ../t.h (glob)
- ../t/e.h (glob)
+ ../t.h
+ ../t/e.h
$ hg locate path:t/x
- ../t/x (glob)
+ ../t/x
$ hg locate 're:.*\.h$'
- ../t.h (glob)
- ../t/e.h (glob)
+ ../t.h
+ ../t/e.h
$ hg locate -r 0 b
- ../b (glob)
- ../t/b (glob)
+ ../b
+ ../t/b
$ hg locate -r 0 '*.h'
- ../t.h (glob)
- ../t/e.h (glob)
+ ../t.h
+ ../t/e.h
$ hg locate -r 0 path:t/x
- ../t/x (glob)
+ ../t/x
$ hg locate -r 0 're:.*\.h$'
- ../t.h (glob)
- ../t/e.h (glob)
+ ../t.h
+ ../t/e.h
- $ cd ../..
diff --git a/tests/test-lock-badness.t b/tests/test-lock-badness.t
index 9c3319c..ea68db7 100644
--- a/tests/test-lock-badness.t
+++ b/tests/test-lock-badness.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" unix-permissions || exit 80
-
$ hg init a
$ echo a > a/a
$ hg -R a ci -A -m a
diff --git a/tests/test-log.t b/tests/test-log.t
index 0a4248e..f85387c 100644
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -1,26 +1,18 @@
-The g is crafted to have 2 filelog topological heads in a linear
-changeset graph
-
$ hg init a
+
$ cd a
$ echo a > a
- $ echo f > f
$ hg ci -Ama -d '1 0'
adding a
- adding f
$ hg cp a b
- $ hg cp f g
$ hg ci -mb -d '2 0'
$ mkdir dir
$ hg mv b dir
- $ echo g >> g
- $ echo f >> f
$ hg ci -mc -d '3 0'
$ hg mv a b
- $ hg cp -f f g
$ echo a > d
$ hg add d
$ hg ci -md -d '4 0'
@@ -29,7 +21,7 @@ changeset graph
$ hg ci -me -d '5 0'
$ hg log a
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: a
@@ -38,34 +30,34 @@ changeset graph
-f, directory
$ hg log -f dir
- abort: cannot follow file not in parent revision: "dir"
+ abort: cannot follow nonexistent file: "dir"
[255]
-f, but no args
$ hg log -f
- changeset: 4:7e4639b4691b
+ changeset: 4:66c1345dc4f9
tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
summary: e
- changeset: 3:2ca5ba701980
+ changeset: 3:7c6c671bb7cc
user: test
date: Thu Jan 01 00:00:04 1970 +0000
summary: d
- changeset: 2:f8954cd4dc1f
+ changeset: 2:41dd4284081e
user: test
date: Thu Jan 01 00:00:03 1970 +0000
summary: c
- changeset: 1:d89b0a12d229
+ changeset: 1:784de7cef101
user: test
date: Thu Jan 01 00:00:02 1970 +0000
summary: b
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: a
@@ -73,12 +65,11 @@ changeset graph
one rename
- $ hg up -q 2
$ hg log -vf a
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
- files: a f
+ files: a
description:
a
@@ -86,9 +77,8 @@ one rename
many renames
- $ hg up -q tip
$ hg log -vf e
- changeset: 4:7e4639b4691b
+ changeset: 4:66c1345dc4f9
tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
@@ -97,26 +87,26 @@ many renames
e
- changeset: 2:f8954cd4dc1f
+ changeset: 2:41dd4284081e
user: test
date: Thu Jan 01 00:00:03 1970 +0000
- files: b dir/b f g
+ files: b dir/b
description:
c
- changeset: 1:d89b0a12d229
+ changeset: 1:784de7cef101
user: test
date: Thu Jan 01 00:00:02 1970 +0000
- files: b g
+ files: b
description:
b
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
- files: a f
+ files: a
description:
a
@@ -125,36 +115,35 @@ many renames
log -pf dir/b
- $ hg up -q 3
$ hg log -pf dir/b
- changeset: 2:f8954cd4dc1f
+ changeset: 2:41dd4284081e
user: test
date: Thu Jan 01 00:00:03 1970 +0000
summary: c
- diff -r d89b0a12d229 -r f8954cd4dc1f dir/b
+ diff -r 784de7cef101 -r 41dd4284081e dir/b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dir/b Thu Jan 01 00:00:03 1970 +0000
@@ -0,0 +1,1 @@
+a
- changeset: 1:d89b0a12d229
+ changeset: 1:784de7cef101
user: test
date: Thu Jan 01 00:00:02 1970 +0000
summary: b
- diff -r 9161b9aeaf16 -r d89b0a12d229 b
+ diff -r 8580ff50825a -r 784de7cef101 b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/b Thu Jan 01 00:00:02 1970 +0000
@@ -0,0 +1,1 @@
+a
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: a
- diff -r 000000000000 -r 9161b9aeaf16 a
+ diff -r 000000000000 -r 8580ff50825a a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/a Thu Jan 01 00:00:01 1970 +0000
@@ -0,0 +1,1 @@
@@ -164,53 +153,39 @@ log -pf dir/b
log -vf dir/b
$ hg log -vf dir/b
- changeset: 2:f8954cd4dc1f
+ changeset: 2:41dd4284081e
user: test
date: Thu Jan 01 00:00:03 1970 +0000
- files: b dir/b f g
+ files: b dir/b
description:
c
- changeset: 1:d89b0a12d229
+ changeset: 1:784de7cef101
user: test
date: Thu Jan 01 00:00:02 1970 +0000
- files: b g
+ files: b
description:
b
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
- files: a f
+ files: a
description:
a
--f and multiple filelog heads
-
- $ hg up -q 2
- $ hg log -f g --template '{rev}\n'
- 2
- 1
- 0
- $ hg up -q tip
- $ hg log -f g --template '{rev}\n'
- 3
- 2
- 0
-
-
log copies with --copies
$ hg log -vC --template '{rev} {file_copies}\n'
4 e (dir/b)
- 3 b (a)g (f)
+ 3 b (a)
2 dir/b (b)
- 1 b (a)g (f)
+ 1 b (a)
0
log copies switch without --copies, with old filecopy template
@@ -226,16 +201,16 @@ log copies switch with --copies
$ hg log -vC --template '{rev} {file_copies_switch}\n'
4 e (dir/b)
- 3 b (a)g (f)
+ 3 b (a)
2 dir/b (b)
- 1 b (a)g (f)
+ 1 b (a)
0
log copies with hardcoded style and with --style=default
$ hg log -vC -r4
- changeset: 4:7e4639b4691b
+ changeset: 4:66c1345dc4f9
tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
@@ -246,7 +221,7 @@ log copies with hardcoded style and with --style=default
$ hg log -vC -r4 --style=default
- changeset: 4:7e4639b4691b
+ changeset: 4:66c1345dc4f9
tag: tip
user: test
date: Thu Jan 01 00:00:05 1970 +0000
@@ -273,26 +248,24 @@ log copies, non-linear manifest
log copies, execute bit set
-#if execbit
$ chmod +x e
$ hg ci -me3 -d '7 0'
$ hg log -v --template '{rev} {file_copies}\n' -r 6
6
-#endif
log -p d
$ hg log -pv d
- changeset: 3:2ca5ba701980
+ changeset: 3:7c6c671bb7cc
user: test
date: Thu Jan 01 00:00:04 1970 +0000
- files: a b d g
+ files: a b d
description:
d
- diff -r f8954cd4dc1f -r 2ca5ba701980 d
+ diff -r 41dd4284081e -r 7c6c671bb7cc d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/d Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,1 @@
@@ -303,18 +276,18 @@ log -p d
log --removed file
$ hg log --removed -v a
- changeset: 3:2ca5ba701980
+ changeset: 3:7c6c671bb7cc
user: test
date: Thu Jan 01 00:00:04 1970 +0000
- files: a b d g
+ files: a b d
description:
d
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
- files: a f
+ files: a
description:
a
@@ -323,20 +296,20 @@ log --removed file
log --removed revrange file
$ hg log --removed -v -r0:2 a
- changeset: 0:9161b9aeaf16
+ changeset: 0:8580ff50825a
user: test
date: Thu Jan 01 00:00:01 1970 +0000
- files: a f
+ files: a
description:
a
- $ cd ..
+
log --follow tests
- $ hg init follow
- $ cd follow
+ $ hg init ../follow
+ $ cd ../follow
$ echo base > base
$ hg ci -Ambase -d '1 0'
@@ -539,6 +512,34 @@ log -k r1
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
+log -d " " (whitespaces only)
+
+ $ hg log -d " "
+ abort: dates cannot consist entirely of whitespace
+ [255]
+
+log -d -1
+
+ $ hg log -d -1
+
+log -d ">"
+
+ $ hg log -d ">"
+ abort: invalid day spec, use '>DATE'
+ [255]
+
+log -d "<"
+
+ $ hg log -d "<"
+ abort: invalid day spec, use '<DATE'
+ [255]
+
+Negative ranges
+ $ hg log -d "--2"
+ abort: -2 must be nonnegative (see 'hg help dates')
+ [255]
+
+
log -p -l2 --color=always
$ hg --config extensions.color= --config color.mode=ansi \
@@ -586,9 +587,6 @@ log -r tip --stat
$ cd ..
-
-User
-
$ hg init usertest
$ cd usertest
@@ -629,7 +627,6 @@ User
adding a
$ hg branch test
marked working directory as branch test
- (branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -A -m "commit on test"
adding b
@@ -873,11 +870,12 @@ log -p -R repo
+a
- $ cd ../..
+ $ cd ..
$ hg init follow2
$ cd follow2
+
# Build the following history:
# tip - o - x - o - x - x
# \ /
@@ -922,7 +920,7 @@ log -p -R repo
$ hg merge 7
merging foo
warning: conflicts during merge.
- merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging foo failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -933,7 +931,7 @@ log -p -R repo
$ hg merge 4
merging foo
warning: conflicts during merge.
- merging foo incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging foo failed!
1 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -941,7 +939,7 @@ log -p -R repo
$ hg resolve -m foo
$ hg ci -m "Last merge, related"
- $ hg log --graph
+ $ hg --config "extensions.graphlog=" glog
@ changeset: 10:4dae8563d2c5
|\ tag: tip
| | parent: 9:7b35701b003e
@@ -1051,7 +1049,6 @@ Also check when maxrev < lastrevfilelog
date: Thu Jan 01 00:00:00 1970 +0000
summary: add foo, related
- $ cd ..
Issue2383: hg log showing _less_ differences than hg diff
@@ -1128,8 +1125,7 @@ Diff here should be the same:
'hg log -r rev fn' when last(filelog(fn)) != rev
- $ hg init simplelog
- $ cd simplelog
+ $ hg init simplelog; cd simplelog
$ echo f > a
$ hg ci -Am'a' -d '0 0'
adding a
@@ -1146,7 +1142,7 @@ Diff here should be the same:
> def reposetup(ui, repo):
> for line in repo.opener('hidden'):
> ctx = repo[line.strip()]
- > repo.hiddenrevs.add(ctx.rev())
+ > repo.changelog.hiddenrevs.add(ctx.rev())
> EOF
$ echo '[extensions]' >> $HGRCPATH
$ echo "hidden=$HGTMP/testhidden.py" >> $HGRCPATH
@@ -1160,56 +1156,3 @@ Diff here should be the same:
$ hg log --template='{rev}:{node}\n' --hidden
1:a765632148dc55d38c35c4f247c618701886cb2f
0:9f758d63dcde62d547ebfb08e1e7ee96535f2b05
-
-clear extensions configuration
- $ echo '[extensions]' >> $HGRCPATH
- $ echo "hidden=!" >> $HGRCPATH
- $ cd ..
-
-test -u/-k for problematic encoding
-# unicode: cp932:
-# u30A2 0x83 0x41(= 'A')
-# u30C2 0x83 0x61(= 'a')
-
- $ hg init problematicencoding
- $ cd problematicencoding
-
- $ python > setup.sh <<EOF
- > print u'''
- > echo a > text
- > hg add text
- > hg --encoding utf-8 commit -u '\u30A2' -m none
- > echo b > text
- > hg --encoding utf-8 commit -u '\u30C2' -m none
- > echo c > text
- > hg --encoding utf-8 commit -u none -m '\u30A2'
- > echo d > text
- > hg --encoding utf-8 commit -u none -m '\u30C2'
- > '''.encode('utf-8')
- > EOF
- $ sh < setup.sh
-
-test in problematic encoding
- $ python > test.sh <<EOF
- > print u'''
- > hg --encoding cp932 log --template '{rev}\\n' -u '\u30A2'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -u '\u30C2'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -k '\u30A2'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -k '\u30C2'
- > '''.encode('cp932')
- > EOF
- $ sh < test.sh
- 0
- ====
- 1
- ====
- 2
- 0
- ====
- 3
- 1
-
- $ cd ..
diff --git a/tests/test-mactext.t b/tests/test-mactext.t
index efbd4d2..3df5db5 100644
--- a/tests/test-mactext.t
+++ b/tests/test-mactext.t
@@ -19,14 +19,16 @@
[hooks]
pretxncommit.cr = python:hgext.win32text.forbidcr
pretxnchangegroup.cr = python:hgext.win32text.forbidcr
-
+ $ echo
+
$ echo hello > f
$ hg add f
$ hg ci -m 1
-
+ $ echo
+
$ python unix2mac.py f
$ hg ci -m 2
- attempt to commit or push text file(s) using CR line endings
+ Attempt to commit or push text file(s) using CR line endings
in dea860dc51ec: f
transaction abort!
rollback completed
diff --git a/tests/test-manifest-merging.t b/tests/test-manifest-merging.t
index aa91cf0..9531838 100644
--- a/tests/test-manifest-merging.t
+++ b/tests/test-manifest-merging.t
@@ -34,4 +34,3 @@ Update --clean to revision 1 to simulate a failed merge:
$ hg update --clean 1
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ..
diff --git a/tests/test-merge-closedheads.t b/tests/test-merge-closedheads.t
index ad78c1e..259f09f 100644
--- a/tests/test-merge-closedheads.t
+++ b/tests/test-merge-closedheads.t
@@ -68,7 +68,6 @@ hg update -C 8
hg branch some-branch
$ hg branch some-branch
marked working directory as branch some-branch
- (branches are permanent and global, did you want a bookmark?)
hg commit
$ hgcommit -m 'started some-branch'
hg commit --close-branch
@@ -84,4 +83,3 @@ hg merge some-branch
hg commit (no reopening of some-branch)
$ hgcommit -m 'merge with closed branch'
- $ cd ..
diff --git a/tests/test-merge-commit.t b/tests/test-merge-commit.t
index 23a6e16..bbd3986 100644
--- a/tests/test-merge-commit.t
+++ b/tests/test-merge-commit.t
@@ -35,17 +35,17 @@ Test with the merge on 3 having the rename on the local parent
$ hg ci -m '3: merge with local rename'
$ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re)
- 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 77 0 2 d35118874825 000000000000 000000000000
+ 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825
$ hg debugrename bar
bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2
$ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re)
- 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 7 0 0 690b295714ae 000000000000 000000000000
+ 1 7 13 1 1 9e25c27b8757 690b295714ae 000000000000
Revert the content change from rev 2:
@@ -69,8 +69,8 @@ This should use bar@rev2 as the ancestor:
$ hg --debug merge 3
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 0555950ead28
+ overwrite None partial False
+ ancestor 0f2ff26688b9 local 2263c1be0967+ remote 0555950ead28
bar: versions differ -> m
preserving bar for resolve of bar
updating: bar 1/1 files (100.00%)
@@ -88,11 +88,11 @@ This should use bar@rev2 as the ancestor:
$ hg ci -m '5: merge'
$ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re)
- 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re)
- 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re)
- 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 77 0 2 d35118874825 000000000000 000000000000
+ 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825
+ 2 153 7 2 4 ff4b45017382 d35118874825 000000000000
+ 3 160 13 3 5 3701b4893544 ff4b45017382 5345f5ab8abd
Same thing, but with the merge on 3 having the rename
@@ -122,17 +122,17 @@ on the remote parent:
$ hg ci -m '3: merge with remote rename'
$ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re)
- 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 77 0 2 d35118874825 000000000000 000000000000
+ 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825
$ hg debugrename bar
bar renamed from foo:9e25c27b87571a1edee5ae4dddee5687746cc8e2
$ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 7 ..... 0 690b295714ae 000000000000 000000000000 (re)
- 1 7 13 ..... 1 9e25c27b8757 690b295714ae 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 7 0 0 690b295714ae 000000000000 000000000000
+ 1 7 13 1 1 9e25c27b8757 690b295714ae 000000000000
Revert the content change from rev 2:
@@ -156,8 +156,8 @@ This should use bar@rev2 as the ancestor:
$ hg --debug merge 3
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 0f2ff26688b9, local: 2263c1be0967+, remote: 3ffa6b9e35f0
+ overwrite None partial False
+ ancestor 0f2ff26688b9 local 2263c1be0967+ remote 3ffa6b9e35f0
bar: versions differ -> m
preserving bar for resolve of bar
updating: bar 1/1 files (100.00%)
@@ -175,10 +175,9 @@ This should use bar@rev2 as the ancestor:
$ hg ci -m '5: merge'
$ hg debugindex bar
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 77 ..... 2 d35118874825 000000000000 000000000000 (re)
- 1 77 76 ..... 3 5345f5ab8abd 000000000000 d35118874825 (re)
- 2 153 7 ..... 4 ff4b45017382 d35118874825 000000000000 (re)
- 3 160 13 ..... 5 3701b4893544 ff4b45017382 5345f5ab8abd (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 77 0 2 d35118874825 000000000000 000000000000
+ 1 77 76 0 3 5345f5ab8abd 000000000000 d35118874825
+ 2 153 7 2 4 ff4b45017382 d35118874825 000000000000
+ 3 160 13 3 5 3701b4893544 ff4b45017382 5345f5ab8abd
- $ cd ..
diff --git a/tests/test-merge-default.t b/tests/test-merge-default.t
index 64f64d3..dac2b4a 100644
--- a/tests/test-merge-default.t
+++ b/tests/test-merge-default.t
@@ -66,7 +66,7 @@ Should succeed - 2 heads:
Should fail because at tip:
$ hg merge
- abort: nothing to merge
+ abort: there is nothing to merge
[255]
$ hg up 0
@@ -75,8 +75,7 @@ Should fail because at tip:
Should fail because there is only one head:
$ hg merge
- abort: nothing to merge
- (use 'hg update' instead)
+ abort: there is nothing to merge - use "hg update" instead
[255]
$ hg up 3
@@ -85,7 +84,6 @@ Should fail because there is only one head:
$ echo f >> a
$ hg branch foobranch
marked working directory as branch foobranch
- (branches are permanent and global, did you want a bookmark?)
$ hg commit -mf
Should fail because merge with other branch:
diff --git a/tests/test-merge-force.t b/tests/test-merge-force.t
index 7a13f66..748ed59 100644
--- a/tests/test-merge-force.t
+++ b/tests/test-merge-force.t
@@ -19,8 +19,7 @@ Local deleted a file, remote removed
Should fail, since there are deleted files:
$ hg merge
- abort: outstanding uncommitted changes
- (use 'hg status' to list changes)
+ abort: outstanding uncommitted changes (use 'hg status' to list changes)
[255]
Should succeed with --force:
diff --git a/tests/test-merge-local.t b/tests/test-merge-local.t
index 8e1e5b1..63fd54e 100644
--- a/tests/test-merge-local.t
+++ b/tests/test-merge-local.t
@@ -63,7 +63,7 @@ Local merge with bad merge tool:
merging zzz1_merge_ok
merging zzz2_merge_bad
warning: conflicts during merge.
- merging zzz2_merge_bad incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging zzz2_merge_bad failed!
2 files updated, 1 files merged, 3 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges
[1]
@@ -88,7 +88,7 @@ Local merge with conflicts:
merging zzz1_merge_ok
merging zzz2_merge_bad
warning: conflicts during merge.
- merging zzz2_merge_bad incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging zzz2_merge_bad failed!
3 files updated, 1 files merged, 2 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges
[1]
@@ -97,7 +97,7 @@ Local merge with conflicts:
merging zzz1_merge_ok
merging zzz2_merge_bad
warning: conflicts during merge.
- merging zzz2_merge_bad incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging zzz2_merge_bad failed!
2 files updated, 1 files merged, 3 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges
[1]
diff --git a/tests/test-merge-prompt.t b/tests/test-merge-prompt.t
index 43f39c2..58d0f99 100644
--- a/tests/test-merge-prompt.t
+++ b/tests/test-merge-prompt.t
@@ -77,7 +77,7 @@ Interactive merge:
$ status
--- status ---
- file2: * (glob)
+ file2: No such file or directory
C file1
--- file1 ---
1
@@ -133,7 +133,7 @@ Interactive merge with not enough input:
$ status
--- status ---
- file2: * (glob)
+ file2: No such file or directory
C file1
--- file1 ---
1
diff --git a/tests/test-merge-revert2.t b/tests/test-merge-revert2.t
index 4025e56..9f2fc3a 100644
--- a/tests/test-merge-revert2.t
+++ b/tests/test-merge-revert2.t
@@ -45,7 +45,7 @@
$ hg update
merging file1
warning: conflicts during merge.
- merging file1 incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging file1 failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges
[1]
diff --git a/tests/test-merge-symlinks.t b/tests/test-merge-symlinks.t
index 9d50146..2219dbc 100644
--- a/tests/test-merge-symlinks.t
+++ b/tests/test-merge-symlinks.t
@@ -1,3 +1,4 @@
+
$ cat > echo.py <<EOF
> #!/usr/bin/env python
> import os, sys
@@ -59,5 +60,3 @@ merge working directory
HG_OTHER_ISLINK 0
HG_BASE_ISLINK 0
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
-
- $ cd ..
diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t
index cee56cd..b143be4 100644
--- a/tests/test-merge-tools.t
+++ b/tests/test-merge-tools.t
@@ -31,7 +31,8 @@ revision 3 - simple to merge
$ hg commit -Am "revision 3"
created new head
$ echo "[merge-tools]" > .hg/hgrc
-
+ $ echo
+
$ beforemerge() {
> cat .hg/hgrc
> echo "# hg update -C 1"
@@ -43,10 +44,22 @@ revision 3 - simple to merge
> echo "# hg stat"
> hg stat
> rm -f f.orig
+ > echo
+ > }
+ $ domerge() {
+ > beforemerge
+ > echo "# hg merge $*"
+ > hg merge $*
+ > aftermerge
> }
+ $ echo
+
Tool selection
+ $ echo
+
+
default is internal merge:
$ beforemerge
@@ -60,7 +73,7 @@ running from a devel copy, not a temp installation
$ PATH="$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
merging f
warning: conflicts during merge.
- merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -75,167 +88,137 @@ running from a devel copy, not a temp installation
# hg stat
M f
? f.orig
+
simplest hgrc using false for merge:
$ echo "false.whatever=" >> .hg/hgrc
- $ beforemerge
+ $ domerge -r 2
[merge-tools]
false.whatever=
# hg update -C 1
- $ hg merge -r 2
+ # hg merge -r 2
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
-
-unexecutable file in $PATH shouldn't be found:
-
- $ touch false
- $ hg up -qC 1
- $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
- merging f
- warning: conflicts during merge.
- merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
- 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
- use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ rm false
-
-executable directory in $PATH shouldn't be found:
-
- $ mkdir false
- $ hg up -qC 1
- $ PATH="`pwd`:$BINDIR" $PYTHON "$BINDIR"/hg merge -r 2
- merging f
- warning: conflicts during merge.
- merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
- 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
- use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ rmdir false
+
true with higher .priority gets precedence:
$ echo "true.priority=1" >> .hg/hgrc
- $ beforemerge
+ $ domerge -r 2
[merge-tools]
false.whatever=
true.priority=1
# hg update -C 1
- $ hg merge -r 2
+ # hg merge -r 2
merging f
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
+
unless lowered on command line:
- $ beforemerge
+ $ domerge -r 2 --config merge-tools.true.priority=-7
[merge-tools]
false.whatever=
true.priority=1
# hg update -C 1
- $ hg merge -r 2 --config merge-tools.true.priority=-7
+ # hg merge -r 2 --config merge-tools.true.priority=-7
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
or false set higher on command line:
- $ beforemerge
+ $ domerge -r 2 --config merge-tools.false.priority=117
[merge-tools]
false.whatever=
true.priority=1
# hg update -C 1
- $ hg merge -r 2 --config merge-tools.false.priority=117
+ # hg merge -r 2 --config merge-tools.false.priority=117
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
or true.executable not found in PATH:
- $ beforemerge
+ $ domerge -r 2 --config merge-tools.true.executable=nonexistingmergetool
[merge-tools]
false.whatever=
true.priority=1
# hg update -C 1
- $ hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool
+ # hg merge -r 2 --config merge-tools.true.executable=nonexistingmergetool
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
or true.executable with bogus path:
- $ beforemerge
+ $ domerge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
[merge-tools]
false.whatever=
true.priority=1
# hg update -C 1
- $ hg merge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
+ # hg merge -r 2 --config merge-tools.true.executable=/nonexisting/mergetool
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
but true.executable set to cat found in PATH works:
$ echo "true.executable=cat" >> .hg/hgrc
- $ beforemerge
+ $ domerge -r 2
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2
+ # hg merge -r 2
merging f
revision 1
space
@@ -245,22 +228,22 @@ but true.executable set to cat found in PATH works:
space
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
+
and true.executable set to cat with path works:
- $ beforemerge
+ $ domerge -r 2 --config merge-tools.true.executable=cat
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config merge-tools.true.executable=cat
+ # hg merge -r 2 --config merge-tools.true.executable=cat
merging f
revision 1
space
@@ -270,223 +253,199 @@ and true.executable set to cat with path works:
space
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
-
-#if unix-permissions
-
-environment variables in true.executable are handled:
-
- $ echo 'echo "custom merge tool"' > "$HGTMP/merge.sh"
- $ beforemerge
- [merge-tools]
- false.whatever=
- true.priority=1
- true.executable=cat
- # hg update -C 1
- $ hg --config merge-tools.true.executable='sh' \
- > --config merge-tools.true.args="$HGTMP/merge.sh" \
- > merge -r 2
- merging f
- custom merge tool
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ aftermerge
- # cat f
- revision 1
- space
- # hg stat
- M f
-
-#endif
+
+ $ echo
+
Tool selection and merge-patterns
+ $ echo
+
+
merge-patterns specifies new tool false:
- $ beforemerge
+ $ domerge -r 2 --config merge-patterns.f=false
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config merge-patterns.f=false
+ # hg merge -r 2 --config merge-patterns.f=false
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
merge-patterns specifies executable not found in PATH and gets warning:
- $ beforemerge
+ $ domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
+ # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=nonexistingmergetool
couldn't find merge tool true specified for f
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
merge-patterns specifies executable with bogus path and gets warning:
- $ beforemerge
+ $ domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
+ # hg merge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/nonexisting/mergetool
couldn't find merge tool true specified for f
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
+ $ echo
+
ui.merge overrules priority
+ $ echo
+
+
ui.merge specifies false:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=false
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=false
+ # hg merge -r 2 --config ui.merge=false
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
ui.merge specifies internal:fail:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:fail
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:fail
+ # hg merge -r 2 --config ui.merge=internal:fail
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
+
ui.merge specifies internal:local:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:local
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:local
+ # hg merge -r 2 --config ui.merge=internal:local
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
+
ui.merge specifies internal:other:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:other
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:other
+ # hg merge -r 2 --config ui.merge=internal:other
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 2
space
# hg stat
M f
+
ui.merge specifies internal:prompt:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:prompt
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:prompt
+ # hg merge -r 2 --config ui.merge=internal:prompt
no tool found to merge f
keep (l)ocal or take (o)ther? l
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
+
ui.merge specifies internal:dump:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:dump
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:dump
+ # hg merge -r 2 --config ui.merge=internal:dump
merging f
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
@@ -496,6 +455,7 @@ ui.merge specifies internal:dump:
? f.local
? f.orig
? f.other
+
f.base:
@@ -515,127 +475,129 @@ f.other:
revision 2
space
$ rm f.base f.local f.other
+ $ echo
+
ui.merge specifies internal:other but is overruled by pattern for false:
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
+ # hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
+ $ echo
+
Premerge
+ $ echo
+
+
ui.merge specifies internal:other but is overruled by --tool=false
- $ beforemerge
+ $ domerge -r 2 --config ui.merge=internal:other --tool=false
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --config ui.merge=internal:other --tool=false
+ # hg merge -r 2 --config ui.merge=internal:other --tool=false
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
-
+
HGMERGE specifies internal:other but is overruled by --tool=false
$ HGMERGE=internal:other ; export HGMERGE
- $ beforemerge
+ $ domerge -r 2 --tool=false
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 2 --tool=false
+ # hg merge -r 2 --tool=false
merging f
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
-
+
$ unset HGMERGE # make sure HGMERGE doesn't interfere with remaining tests
Default is silent simplemerge:
- $ beforemerge
+ $ domerge -r 3
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 3
+ # hg merge -r 3
merging f
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
revision 3
# hg stat
M f
+
.premerge=True is same:
- $ beforemerge
+ $ domerge -r 3 --config merge-tools.true.premerge=True
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 3 --config merge-tools.true.premerge=True
+ # hg merge -r 3 --config merge-tools.true.premerge=True
merging f
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
revision 3
# hg stat
M f
+
.premerge=False executes merge-tool:
- $ beforemerge
+ $ domerge -r 3 --config merge-tools.true.premerge=False
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -r 3 --config merge-tools.true.premerge=False
+ # hg merge -r 3 --config merge-tools.true.premerge=False
merging f
revision 1
space
@@ -646,17 +608,21 @@ Default is silent simplemerge:
revision 3
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
+
+ $ echo
+
Tool execution
-set tools.args explicit to include $base $local $other $output:
-
+ $ echo
+
+ $ echo '# set tools.args explicit to include $base $local $other $output:' # default '$local $base $other'
+ # set tools.args explicit to include $base $local $other $output:
$ beforemerge
[merge-tools]
false.whatever=
@@ -689,9 +655,9 @@ set tools.args explicit to include $base $local $other $output:
space
# hg stat
M f
-
-Merge with "echo mergeresult > $local":
-
+
+ $ echo '# Merge with "echo mergeresult > $local":'
+ # Merge with "echo mergeresult > $local":
$ beforemerge
[merge-tools]
false.whatever=
@@ -707,9 +673,9 @@ Merge with "echo mergeresult > $local":
mergeresult
# hg stat
M f
-
-- and $local is the file f:
-
+
+ $ echo '# - and $local is the file f:'
+ # - and $local is the file f:
$ beforemerge
[merge-tools]
false.whatever=
@@ -725,9 +691,9 @@ Merge with "echo mergeresult > $local":
mergeresult
# hg stat
M f
-
-Merge with "echo mergeresult > $output" - the variable is a bit magic:
-
+
+ $ echo '# Merge with "echo mergeresult > $output" - the variable is a bit magic:'
+ # Merge with "echo mergeresult > $output" - the variable is a bit magic:
$ beforemerge
[merge-tools]
false.whatever=
@@ -743,6 +709,7 @@ Merge with "echo mergeresult > $output" - the variable is a bit magic:
mergeresult
# hg stat
M f
+
Merge using tool with a path that must be quoted:
@@ -753,11 +720,11 @@ Merge using tool with a path that must be quoted:
true.executable=cat
# hg update -C 1
$ cat <<EOF > 'my merge tool'
+ > #!/bin/sh
> cat "\$1" "\$2" "\$3" > "\$4"
> EOF
- $ hg --config merge-tools.true.executable='sh' \
- > --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \
- > merge -r 2
+ $ chmod +x 'my merge tool'
+ $ hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output'
merging f
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
@@ -772,18 +739,24 @@ Merge using tool with a path that must be quoted:
space
# hg stat
M f
+
+ $ echo
+
Merge post-processing
+ $ echo
+
+
cat is a bad merge-tool and doesn't change:
- $ beforemerge
+ $ domerge -y -r 2 --config merge-tools.true.checkchanged=1
[merge-tools]
false.whatever=
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg merge -y -r 2 --config merge-tools.true.checkchanged=1
+ # hg merge -y -r 2 --config merge-tools.true.checkchanged=1
merging f
revision 1
space
@@ -796,11 +769,10 @@ cat is a bad merge-tool and doesn't change:
merging f failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
- [1]
- $ aftermerge
# cat f
revision 1
space
# hg stat
M f
? f.orig
+
diff --git a/tests/test-merge-types.t b/tests/test-merge-types.t
index c51a029..e328399 100644
--- a/tests/test-merge-types.t
+++ b/tests/test-merge-types.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" symlink execbit || exit 80
-
$ hg init
$ echo a > a
@@ -19,8 +17,8 @@
$ hg merge --debug
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c
+ overwrite None partial False
+ ancestor c334dc3be0da local 521a1e40188f+ remote 3574f3e69b1c
conflicting flags for a
(n)one, e(x)ec or sym(l)ink? n
a: update permissions -> e
@@ -47,8 +45,8 @@ Symlink is local parent, executable is other:
$ hg merge --debug
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: c334dc3be0da, local: 3574f3e69b1c+, remote: 521a1e40188f
+ overwrite None partial False
+ ancestor c334dc3be0da local 3574f3e69b1c+ remote 521a1e40188f
conflicting flags for a
(n)one, e(x)ec or sym(l)ink? n
a: remote is newer -> g
@@ -70,41 +68,3 @@ Symlink is other parent, executable is local:
> fi
a has no flags (default for conflicts)
-Update to link without local change should get us a symlink (issue3316):
-
- $ hg up -C 0
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg up
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg st
-
-Update to link with local change should cause a merge prompt (issue3200):
-
- $ hg up -C 0
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo data > a
- $ HGMERGE= hg up -y --debug
- searching for copies back to rev 2
- resolving manifests
- overwrite: False, partial: False
- ancestor: c334dc3be0da, local: c334dc3be0da+, remote: 521a1e40188f
- a: versions differ -> m
- preserving a for resolve of a
- updating: a 1/1 files (100.00%)
- (couldn't find merge tool hgmerge|tool hgmerge can't handle symlinks) (re)
- picked tool 'internal:prompt' for a (binary False symlink True)
- no tool found to merge a
- keep (l)ocal or take (o)ther? l
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
- $ hg diff --git
- diff --git a/a b/a
- old mode 120000
- new mode 100644
- --- a/a
- +++ b/a
- @@ -1,1 +1,1 @@
- -symlink
- \ No newline at end of file
- +data
-
-
diff --git a/tests/test-merge1.t b/tests/test-merge1.t
index e0303c9..dfebd5b 100644
--- a/tests/test-merge1.t
+++ b/tests/test-merge1.t
@@ -66,8 +66,7 @@ no merges expected
$ echo This is file b2 > b
merge should fail
$ hg merge 1
- b: untracked file differs
- abort: untracked files in working directory differ from files in requested revision
+ abort: untracked file in working directory differs from file in requested revision: 'b'
[255]
merge of b expected
$ hg merge -f 1
@@ -109,10 +108,10 @@ Contents of b should be "this is file b1"
$ echo This is file b22 > b
merge fails
$ hg merge 2
- abort: outstanding uncommitted changes
- (use 'hg status' to list changes)
+ abort: outstanding uncommitted changes (use 'hg status' to list changes)
[255]
-merge expected!
+ $ echo %% merge expected!
+ %% merge expected!
$ hg merge -f 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
@@ -146,8 +145,7 @@ merge expected!
$ echo This is file b33 > b
merge of b should fail
$ hg merge 2
- abort: outstanding uncommitted changes
- (use 'hg status' to list changes)
+ abort: outstanding uncommitted changes (use 'hg status' to list changes)
[255]
merge of b expected
$ hg merge -f 2
@@ -172,5 +170,3 @@ Test for issue2364
$ hg ci -md
$ hg revert -r -2 b
$ hg up -q -- -2
-
- $ cd ..
diff --git a/tests/test-merge10.t b/tests/test-merge10.t
index 0ac57f4..96bd416 100644
--- a/tests/test-merge10.t
+++ b/tests/test-merge10.t
@@ -49,5 +49,3 @@ but then local changes are added in the same directory)
@@ -1,1 +1,1 @@
-a
+alpha
-
- $ cd ..
diff --git a/tests/test-merge2.t b/tests/test-merge2.t
index 4b6d566..b1a9e5a 100644
--- a/tests/test-merge2.t
+++ b/tests/test-merge2.t
@@ -49,5 +49,3 @@
$ hg commit -A -m "commit #2"
adding b
created new head
-
- $ cd ..
diff --git a/tests/test-merge4.t b/tests/test-merge4.t
index d0c27d1..3e6436c 100644
--- a/tests/test-merge4.t
+++ b/tests/test-merge4.t
@@ -16,10 +16,5 @@
(branch merge, don't forget to commit)
$ rm b
$ echo This is file c22 > c
-
-Test hg behaves when committing with a missing file added by a merge
-
$ hg commit -m "commit #3"
- abort: cannot commit merge with missing files
- [255]
diff --git a/tests/test-merge6.t b/tests/test-merge6.t
index 8aee05e..d05dda9 100644
--- a/tests/test-merge6.t
+++ b/tests/test-merge6.t
@@ -66,5 +66,3 @@ bar should remain deleted.
bar should remain deleted.
$ hg manifest --debug
f9b0e817f6a48de3564c6b2957687c5e7297c5a0 644 foo
-
- $ cd ..
diff --git a/tests/test-merge7.t b/tests/test-merge7.t
index 10eed9a..9ae816b 100644
--- a/tests/test-merge7.t
+++ b/tests/test-merge7.t
@@ -45,7 +45,7 @@ now pull and merge from test-a
$ hg merge
merging test.txt
warning: conflicts during merge.
- merging test.txt incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging test.txt failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -81,8 +81,8 @@ pull and merge from test-a again
$ hg merge --debug
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 96b70246a118, local: 50c3a7e29886+, remote: 40d11a4173a8
+ overwrite None partial False
+ ancestor 96b70246a118 local 50c3a7e29886+ remote 40d11a4173a8
test.txt: versions differ -> m
preserving test.txt for resolve of test.txt
updating: test.txt 1/1 files (100.00%)
@@ -90,7 +90,7 @@ pull and merge from test-a again
merging test.txt
my test.txt@50c3a7e29886+ other test.txt@40d11a4173a8 ancestor test.txt@96b70246a118
warning: conflicts during merge.
- merging test.txt incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging test.txt failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -105,12 +105,12 @@ pull and merge from test-a again
three
$ hg debugindex test.txt
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 7 ..... 0 01365c4cca56 000000000000 000000000000 (re)
- 1 7 9 ..... 1 7b013192566a 01365c4cca56 000000000000 (re)
- 2 16 15 ..... 2 8fe46a3eb557 01365c4cca56 000000000000 (re)
- 3 31 2. ..... 3 fc3148072371 7b013192566a 8fe46a3eb557 (re)
- 4 5. 25 ..... 4 d40249267ae3 8fe46a3eb557 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 7 0 0 01365c4cca56 000000000000 000000000000
+ 1 7 9 1 1 7b013192566a 01365c4cca56 000000000000
+ 2 16 15 2 2 8fe46a3eb557 01365c4cca56 000000000000
+ 3 31 27 2 3 fc3148072371 7b013192566a 8fe46a3eb557
+ 4 58 25 4 4 d40249267ae3 8fe46a3eb557 000000000000
$ hg log
changeset: 4:40d11a4173a8
@@ -143,5 +143,3 @@ pull and merge from test-a again
date: Thu Jan 01 00:00:00 1970 +0000
summary: Initial
-
- $ cd ..
diff --git a/tests/test-merge8.t b/tests/test-merge8.t
index 9a3a2cd..39054d2 100644
--- a/tests/test-merge8.t
+++ b/tests/test-merge8.t
@@ -25,5 +25,3 @@ Test for changeset ba7c74081861
(run 'hg update' to get a working copy)
$ hg update
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-
- $ cd ..
diff --git a/tests/test-merge9.t b/tests/test-merge9.t
index 85e06f0..7d8b0e6 100644
--- a/tests/test-merge9.t
+++ b/tests/test-merge9.t
@@ -83,12 +83,10 @@ resolve all
$ hg resolve -a
merging bar
warning: conflicts during merge.
- merging bar incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging bar failed!
[1]
after
$ hg resolve -l
U bar
R baz
-
- $ cd ..
diff --git a/tests/test-minirst.py b/tests/test-minirst.py
index df5fbb6..52475c1 100644
--- a/tests/test-minirst.py
+++ b/tests/test-minirst.py
@@ -1,30 +1,19 @@
from pprint import pprint
from mercurial import minirst
-def debugformat(text, form, **kwargs):
- if form == 'html':
- print "html format:"
- out = minirst.format(text, style=form, **kwargs)
- else:
- print "%d column format:" % form
- out = minirst.format(text, width=form, **kwargs)
-
+def debugformat(title, text, width, **kwargs):
+ print "%s formatted to fit within %d characters:" % (title, width)
print "-" * 70
- if type(out) == tuple:
- print out[0][:-1]
+ formatted = minirst.format(text, width, **kwargs)
+ if type(formatted) == tuple:
+ print formatted[0]
print "-" * 70
- pprint(out[1])
+ pprint(formatted[1])
else:
- print out[:-1]
+ print formatted
print "-" * 70
print
-def debugformats(title, text, **kwargs):
- print "== %s ==" % title
- debugformat(text, 60, **kwargs)
- debugformat(text, 30, **kwargs)
- debugformat(text, 'html', **kwargs)
-
paragraphs = """
This is some text in the first paragraph.
@@ -34,7 +23,9 @@ This is some text in the first paragraph.
\n \n \nThe third and final paragraph.
"""
-debugformats('paragraphs', paragraphs)
+debugformat('paragraphs', paragraphs, 60)
+debugformat('paragraphs', paragraphs, 30)
+
definitions = """
A Term
@@ -49,7 +40,9 @@ Another Term
Definition.
"""
-debugformats('definitions', definitions)
+debugformat('definitions', definitions, 60)
+debugformat('definitions', definitions, 30)
+
literals = r"""
The fully minimized form is the most
@@ -73,7 +66,9 @@ simply ends with space-double-colon. ::
with '::' disappears in the final output.
"""
-debugformats('literals', literals)
+debugformat('literals', literals, 60)
+debugformat('literals', literals, 30)
+
lists = """
- This is the first list item.
@@ -117,7 +112,9 @@ Line blocks are also a form of list:
| This is the second line.
"""
-debugformats('lists', lists)
+debugformat('lists', lists, 60)
+debugformat('lists', lists, 30)
+
options = """
There is support for simple option lists,
@@ -143,7 +140,9 @@ marker after the option. It is treated as a normal paragraph:
--foo bar baz
"""
-debugformats('options', options)
+debugformat('options', options, 60)
+debugformat('options', options, 30)
+
fields = """
:a: First item.
@@ -156,7 +155,8 @@ Next list:
:much too large: This key is big enough to get its own line.
"""
-debugformats('fields', fields)
+debugformat('fields', fields, 60)
+debugformat('fields', fields, 30)
containers = """
Normal output.
@@ -174,14 +174,14 @@ Normal output.
Debug output.
"""
-debugformats('containers (normal)', containers)
-debugformats('containers (verbose)', containers, keep=['verbose'])
-debugformats('containers (debug)', containers, keep=['debug'])
-debugformats('containers (verbose debug)', containers,
+debugformat('containers (normal)', containers, 60)
+debugformat('containers (verbose)', containers, 60, keep=['verbose'])
+debugformat('containers (debug)', containers, 60, keep=['debug'])
+debugformat('containers (verbose debug)', containers, 60,
keep=['verbose', 'debug'])
roles = """Please see :hg:`add`."""
-debugformats('roles', roles)
+debugformat('roles', roles, 60)
sections = """
@@ -197,7 +197,7 @@ Subsection
Markup: ``foo`` and :hg:`help`
------------------------------
"""
-debugformats('sections', sections)
+debugformat('sections', sections, 20)
admonitions = """
@@ -214,7 +214,7 @@ admonitions = """
This is danger
"""
-debugformats('admonitions', admonitions)
+debugformat('admonitions', admonitions, 30)
comments = """
Some text.
@@ -230,16 +230,4 @@ Some text.
Empty comment above
"""
-debugformats('comments', comments)
-
-
-data = [['a', 'b', 'c'],
- ['1', '2', '3'],
- ['foo', 'bar', 'baz this list is very very very long man']]
-
-rst = minirst.maketable(data, 2, True)
-table = ''.join(rst)
-
-print table
-
-debugformats('table', table)
+debugformat('comments', comments, 30)
diff --git a/tests/test-minirst.py.out b/tests/test-minirst.py.out
index c2562ac..77e9537 100644
--- a/tests/test-minirst.py.out
+++ b/tests/test-minirst.py.out
@@ -1,5 +1,4 @@
-== paragraphs ==
-60 column format:
+paragraphs formatted to fit within 60 characters:
----------------------------------------------------------------------
This is some text in the first paragraph.
@@ -9,7 +8,7 @@ This is some text in the first paragraph.
The third and final paragraph.
----------------------------------------------------------------------
-30 column format:
+paragraphs formatted to fit within 30 characters:
----------------------------------------------------------------------
This is some text in the first
paragraph.
@@ -22,23 +21,7 @@ paragraph.
The third and final paragraph.
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-This is some text in the first paragraph.
-</p>
-<p>
-A small indented paragraph.
-It is followed by some lines
-containing random whitespace.
-</p>
-<p>
-The third and final paragraph.
-</p>
-----------------------------------------------------------------------
-
-== definitions ==
-60 column format:
+definitions formatted to fit within 60 characters:
----------------------------------------------------------------------
A Term
Definition. The indented lines make up the definition.
@@ -52,7 +35,7 @@ Another Term
Definition.
----------------------------------------------------------------------
-30 column format:
+definitions formatted to fit within 30 characters:
----------------------------------------------------------------------
A Term
Definition. The indented
@@ -71,20 +54,7 @@ Another Term
Definition.
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<dl>
- <dt>A Term
- <dd>Definition. The indented lines make up the definition.
- <dt>Another Term
- <dd>Another definition. The final line in the definition determines the indentation, so this will be indented with four spaces.
- <dt>A Nested/Indented Term
- <dd>Definition.
-</dl>
-----------------------------------------------------------------------
-
-== literals ==
-60 column format:
+literals formatted to fit within 60 characters:
----------------------------------------------------------------------
The fully minimized form is the most convenient form:
@@ -104,7 +74,7 @@ space-double-colon.
with '::' disappears in the final output.
----------------------------------------------------------------------
-30 column format:
+literals formatted to fit within 30 characters:
----------------------------------------------------------------------
The fully minimized form is
the most convenient form:
@@ -126,35 +96,7 @@ with space-double-colon.
with '::' disappears in the final output.
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-The fully minimized form is the most
-convenient form:
-</p>
-<pre>
-Hello
- literal
- world
-</pre>
-<p>
-In the partially minimized form a paragraph
-simply ends with space-double-colon.
-</p>
-<pre>
-////////////////////////////////////////
-long un-wrapped line in a literal block
-\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-</pre>
-<pre>
-This literal block is started with '::',
- the so-called expanded form. The paragraph
- with '::' disappears in the final output.
-</pre>
-----------------------------------------------------------------------
-
-== lists ==
-60 column format:
+lists formatted to fit within 60 characters:
----------------------------------------------------------------------
- This is the first list item.
@@ -189,7 +131,7 @@ This is the first line. The line continues here.
This is the second line.
----------------------------------------------------------------------
-30 column format:
+lists formatted to fit within 30 characters:
----------------------------------------------------------------------
- This is the first list item.
@@ -233,53 +175,7 @@ line continues here.
This is the second line.
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<ul>
- <li> This is the first list item.
-<p>
-Second paragraph in the first list item.
-</p>
- <li> List items need not be separated by a blank line.
- <li> And will be rendered without one in any case.
-</ul>
-<p>
-We can have indented lists:
-</p>
-<ul>
- <li> This is an indented list item
- <li> Another indented list item:
-<pre>
-- A literal block in the middle
- of an indented list.
-</pre>
-<pre>
-(The above is not a list item since we are in the literal block.)
-</pre>
-</ul>
-<pre>
-Literal block with no indentation (apart from
-the two spaces added to all literal blocks).
-</pre>
-<ol>
- <li> This is an enumerated list (first item).
- <li> Continuing with the second item.
- <li> foo
- <li> bar
- <li> Another
- <li> List
-</ol>
-<p>
-Line blocks are also a form of list:
-</p>
-<ol>
- <li> This is the first line. The line continues here.
- <li> This is the second line.
-</ol>
-----------------------------------------------------------------------
-
-== options ==
-60 column format:
+options formatted to fit within 60 characters:
----------------------------------------------------------------------
There is support for simple option lists, but only with long
options:
@@ -306,7 +202,7 @@ paragraph:
--foo bar baz
----------------------------------------------------------------------
-30 column format:
+options formatted to fit within 30 characters:
----------------------------------------------------------------------
There is support for simple
option lists, but only with
@@ -378,123 +274,45 @@ normal paragraph:
--foo bar baz
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-There is support for simple option lists,
-but only with long options:
-</p>
-<dl>
- <dt>-X --exclude filter
- <dd>an option with a short and long option with an argument
- <dt>-I --include
- <dd>an option with both a short option and a long option
- <dt> --all
- <dd>Output all.
- <dt> --both
- <dd>Output both (this description is quite long).
- <dt> --long
- <dd>Output all day long.
- <dt> --par
- <dd>This option has two paragraphs in its description. This is the first.
-<p>
-This is the second. Blank lines may be omitted between
-options (as above) or left in (as here).
-</p>
-</dl>
-<p>
-The next paragraph looks like an option list, but lacks the two-space
-marker after the option. It is treated as a normal paragraph:
-</p>
-<p>
---foo bar baz
-</p>
+fields formatted to fit within 60 characters:
----------------------------------------------------------------------
-
-== fields ==
-60 column format:
-----------------------------------------------------------------------
-a First item.
-ab Second item. Indentation and wrapping is
- handled automatically.
+a First item.
+ab Second item. Indentation and wrapping is handled
+ automatically.
Next list:
-small The larger key below triggers full indentation
- here.
+small The larger key below triggers full indentation
+ here.
much too large
- This key is big enough to get its own line.
+ This key is big enough to get its own line.
----------------------------------------------------------------------
-30 column format:
+fields formatted to fit within 30 characters:
----------------------------------------------------------------------
-a First item.
-ab Second item.
- Indentation and
- wrapping is
- handled
- automatically.
+a First item.
+ab Second item. Indentation
+ and wrapping is handled
+ automatically.
Next list:
-small The larger key
- below triggers
- full indentation
- here.
+small The larger key
+ below triggers
+ full indentation
+ here.
much too large
- This key is big
- enough to get
- its own line.
-----------------------------------------------------------------------
-
-html format:
-----------------------------------------------------------------------
-<dl>
- <dt>a
- <dd>First item.
- <dt>ab
- <dd>Second item. Indentation and wrapping is handled automatically.
-</dl>
-<p>
-Next list:
-</p>
-<dl>
- <dt>small
- <dd>The larger key below triggers full indentation here.
- <dt>much too large
- <dd>This key is big enough to get its own line.
-</dl>
-----------------------------------------------------------------------
-
-== containers (normal) ==
-60 column format:
-----------------------------------------------------------------------
-Normal output.
-----------------------------------------------------------------------
-
-30 column format:
-----------------------------------------------------------------------
-Normal output.
-----------------------------------------------------------------------
-
-html format:
-----------------------------------------------------------------------
-<p>
-Normal output.
-</p>
+ This key is big
+ enough to get its
+ own line.
----------------------------------------------------------------------
-== containers (verbose) ==
-60 column format:
+containers (normal) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.
-
-Verbose output.
-----------------------------------------------------------------------
-['debug', 'debug']
----------------------------------------------------------------------
-30 column format:
+containers (verbose) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.
@@ -503,64 +321,16 @@ Verbose output.
['debug', 'debug']
----------------------------------------------------------------------
-html format:
+containers (debug) formatted to fit within 60 characters:
----------------------------------------------------------------------
-<p>
Normal output.
-</p>
-<p>
-Verbose output.
-</p>
-----------------------------------------------------------------------
-['debug', 'debug']
-----------------------------------------------------------------------
-
-== containers (debug) ==
-60 column format:
-----------------------------------------------------------------------
-Normal output.
-
-Initial debug output.
-----------------------------------------------------------------------
-['verbose']
-----------------------------------------------------------------------
-
-30 column format:
-----------------------------------------------------------------------
-Normal output.
-
-Initial debug output.
-----------------------------------------------------------------------
-['verbose']
-----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-Normal output.
-</p>
-<p>
Initial debug output.
-</p>
----------------------------------------------------------------------
['verbose']
----------------------------------------------------------------------
-== containers (verbose debug) ==
-60 column format:
-----------------------------------------------------------------------
-Normal output.
-
-Initial debug output.
-
-Verbose output.
-
-Debug output.
-----------------------------------------------------------------------
-[]
-----------------------------------------------------------------------
-
-30 column format:
+containers (verbose debug) formatted to fit within 60 characters:
----------------------------------------------------------------------
Normal output.
@@ -573,59 +343,12 @@ Debug output.
[]
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-Normal output.
-</p>
-<p>
-Initial debug output.
-</p>
-<p>
-Verbose output.
-</p>
-<p>
-Debug output.
-</p>
-----------------------------------------------------------------------
-[]
-----------------------------------------------------------------------
-
-== roles ==
-60 column format:
-----------------------------------------------------------------------
-Please see "hg add".
-----------------------------------------------------------------------
-
-30 column format:
+roles formatted to fit within 60 characters:
----------------------------------------------------------------------
Please see "hg add".
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-Please see "hg add".
-</p>
-----------------------------------------------------------------------
-
-== sections ==
-60 column format:
-----------------------------------------------------------------------
-Title
-=====
-
-Section
--------
-
-Subsection
-''''''''''
-
-Markup: "foo" and "hg help"
----------------------------
-----------------------------------------------------------------------
-
-30 column format:
+sections formatted to fit within 20 characters:
----------------------------------------------------------------------
Title
=====
@@ -640,31 +363,7 @@ Markup: "foo" and "hg help"
---------------------------
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<h1>Title</h1>
-<h2>Section</h2>
-<h3>Subsection</h3>
-<h2>Markup: "foo" and "hg help"</h2>
-----------------------------------------------------------------------
-
-== admonitions ==
-60 column format:
-----------------------------------------------------------------------
-Note:
- This is a note
-
- - Bullet 1
- - Bullet 2
-
- Warning!
- This is a warning Second input line of warning
-
-!Danger!
- This is danger
-----------------------------------------------------------------------
-
-30 column format:
+admonitions formatted to fit within 30 characters:
----------------------------------------------------------------------
Note:
This is a note
@@ -680,25 +379,7 @@ Note:
This is danger
----------------------------------------------------------------------
-html format:
-----------------------------------------------------------------------
-<p>
-<b>Note:</b> This is a note
-</p>
-<ul>
- <li> Bullet 1
- <li> Bullet 2
-</ul>
-<p>
-<b>Warning!</b> This is a warning Second input line of warning
-</p>
-<p>
-<b>!Danger!</b> This is danger
-</p>
-----------------------------------------------------------------------
-
-== comments ==
-60 column format:
+comments formatted to fit within 30 characters:
----------------------------------------------------------------------
Some text.
@@ -707,60 +388,3 @@ Some text.
Empty comment above
----------------------------------------------------------------------
-30 column format:
-----------------------------------------------------------------------
-Some text.
-
- Some indented text.
-
-Empty comment above
-----------------------------------------------------------------------
-
-html format:
-----------------------------------------------------------------------
-<p>
-Some text.
-</p>
-<p>
-Some indented text.
-</p>
-<p>
-Empty comment above
-</p>
-----------------------------------------------------------------------
-
- === === ========================================
- a b c
- === === ========================================
- 1 2 3
- foo bar baz this list is very very very long man
- === === ========================================
-
-== table ==
-60 column format:
-----------------------------------------------------------------------
- a b c
- ------------------------------------------------
- 1 2 3
- foo bar baz this list is very very very long man
-----------------------------------------------------------------------
-
-30 column format:
-----------------------------------------------------------------------
- a b c
- ------------------------------
- 1 2 3
- foo bar baz this list is
- very very very long
- man
-----------------------------------------------------------------------
-
-html format:
-----------------------------------------------------------------------
-<table>
- <tr><th>a</th><th>b</th><th>c</th></tr>
- <tr><td>1</td><td>2</td><td>3</td></tr>
- <tr><td>foo</td><td>bar</td><td>baz this list is very very very long man</td></tr>
-</table>
-----------------------------------------------------------------------
-
diff --git a/tests/test-mq-caches.t b/tests/test-mq-caches.t
index f74a528..5791aa0 100644
--- a/tests/test-mq-caches.t
+++ b/tests/test-mq-caches.t
@@ -26,7 +26,7 @@
mq patch on an empty repo
- $ hg qnew -d '0 0' p1
+ $ hg qnew p1
$ show_branch_cache
tip: 0
No branch cache
@@ -36,8 +36,7 @@ mq patch on an empty repo
$ hg qrefresh -m 'patch 1'
$ show_branch_cache
tip: 0
- d986d5caac23a7d44a46efc0ddaf5eb9665844cf 0
- d986d5caac23a7d44a46efc0ddaf5eb9665844cf default
+ No branch cache
some regular revisions
@@ -70,14 +69,14 @@ add some mq patches
c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
- $ hg qnew -d '0 0' p2
+ $ hg qnew p2
$ echo foo > .hg/branch
$ echo foo2 >> foo
$ hg qrefresh -m 'patch 2'
$ show_branch_cache 1
tip: 3
- 982611f6955f9c48d3365decea203217c945ef0d 2
- 982611f6955f9c48d3365decea203217c945ef0d bar
+ c229711f16da3d7591f89b1b8d963b79bda22714 1
+ c229711f16da3d7591f89b1b8d963b79bda22714 bar
dc25e3827021582e979f600811852e36cbe57341 foo
branch foo: 3
branch bar: 2
@@ -123,4 +122,3 @@ detect an invalid cache
dc25e3827021582e979f600811852e36cbe57341 0
dc25e3827021582e979f600811852e36cbe57341 foo
- $ cd ..
diff --git a/tests/test-mq-guards.t b/tests/test-mq-guards.t
index 4ab4ac9..b02c698 100644
--- a/tests/test-mq-guards.t
+++ b/tests/test-mq-guards.t
@@ -107,9 +107,6 @@ should skip c.patch
applying b.patch
skipping c.patch - guarded by '-a'
now at: b.patch
- $ hg qnext
- all patches applied
- [1]
should display b.patch
@@ -172,8 +169,6 @@ should push b.patch
$ hg qpush -a
applying c.patch
now at: c.patch
- $ hg qprev
- b.patch
Used to be an issue with holes in the patch sequence
So, put one hole on the base and ask for topmost patch.
@@ -439,71 +434,3 @@ hg qseries -m with color
$ hg --config extensions.color= --config color.mode=ansi qseries -m --color=always
\x1b[0;31;1mb.patch\x1b[0m (esc)
-
-
-excercise cornercases in "qselect --reapply"
-
- $ hg qpop -a
- popping c.patch
- popping new.patch
- patch queue now empty
- $ hg qguard -- new.patch -not-new
- $ hg qguard -- c.patch -not-c
- $ hg qguard -- d.patch -not-d
- $ hg qpush -a
- applying new.patch
- applying c.patch
- applying d.patch
- patch d.patch is empty
- now at: d.patch
- $ hg qguard -l
- new.patch: -not-new
- c.patch: -not-c
- d.patch: -not-d
- $ hg qselect --reapply not-d
- popping guarded patches
- popping d.patch
- now at: c.patch
- reapplying unguarded patches
- cannot push 'd.patch' - guarded by '-not-d'
- $ hg qser -v
- 0 A new.patch
- 1 A c.patch
- 2 G d.patch
- $ hg qselect --reapply -n
- guards deactivated
- $ hg qpush
- applying d.patch
- patch d.patch is empty
- now at: d.patch
- $ hg qser -v
- 0 A new.patch
- 1 A c.patch
- 2 A d.patch
- $ hg qselect --reapply not-c
- popping guarded patches
- popping d.patch
- popping c.patch
- now at: new.patch
- reapplying unguarded patches
- applying d.patch
- patch d.patch is empty
- now at: d.patch
- $ hg qser -v
- 0 A new.patch
- 1 G c.patch
- 2 A d.patch
- $ hg qselect --reapply not-new
- popping guarded patches
- popping d.patch
- popping new.patch
- patch queue now empty
- reapplying unguarded patches
- applying c.patch
- applying d.patch
- patch d.patch is empty
- now at: d.patch
- $ hg qser -v
- 0 G new.patch
- 1 A c.patch
- 2 A d.patch
diff --git a/tests/test-mq-header-from.t b/tests/test-mq-header-from.t
index 64668ec..b297f13 100644
--- a/tests/test-mq-header-from.t
+++ b/tests/test-mq-header-from.t
@@ -967,5 +967,3 @@
2: Three (again) - maria
1: imported patch 2.patch - jane
0: imported patch 1.patch - mary
-
- $ cd ..
diff --git a/tests/test-mq-merge.t b/tests/test-mq-merge.t
index 955134a..f1640d2 100644
--- a/tests/test-mq-merge.t
+++ b/tests/test-mq-merge.t
@@ -56,7 +56,7 @@ Create a patch removing a:
Save the patch queue so we can merge it later:
$ hg qsave -c -e
- copy $TESTTMP/t/.hg/patches to $TESTTMP/t/.hg/patches.1 (glob)
+ copy $TESTTMP/t/.hg/patches to $TESTTMP/t/.hg/patches.1
$ checkundo
Update b and commit in an "update" changeset:
@@ -76,7 +76,7 @@ Update b and commit in an "update" changeset:
b
$ hg qpush -a -m
- merging with queue at: $TESTTMP/t/.hg/patches.1 (glob)
+ merging with queue at: $TESTTMP/t/.hg/patches.1
applying rm_a
now at: rm_a
@@ -115,20 +115,22 @@ Classic MQ merge sequence *with an explicit named queue*:
Create the reference queue:
$ hg qsave -c -e -n refqueue
- copy $TESTTMP/t2/.hg/patches to $TESTTMP/t2/.hg/refqueue (glob)
+ copy $TESTTMP/t2/.hg/patches to $TESTTMP/t2/.hg/refqueue
$ hg up -C 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
Merge:
$ HGMERGE=internal:other hg qpush -a -m -n refqueue
- merging with queue at: $TESTTMP/t2/.hg/refqueue (glob)
+ merging with queue at: $TESTTMP/t2/.hg/refqueue
applying patcha
patching file a
- Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
- fuzz found when applying patch, stopping
+ Hunk #1 FAILED at 0
+ 1 out of 1 hunks FAILED -- saving rejects to file a.rej
+ patch failed, unable to continue (try -v)
+ patch failed, rejects left in working dir
patch didn't work out, merging patcha
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0 files updated, 2 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
applying patcha2
@@ -147,11 +149,13 @@ Check patcha is still a git patch:
-b
+a
+c
- diff --git a/aa b/aa
- new file mode 100644
- --- /dev/null
+ diff --git a/a b/aa
+ copy from a
+ copy to aa
+ --- a/a
+++ b/aa
- @@ -0,0 +1,1 @@
+ @@ -1,1 +1,1 @@
+ -b
+a
Check patcha2 is still a regular patch:
diff --git a/tests/test-mq-missingfiles.t b/tests/test-mq-missingfiles.t
index 6897ff0..9217abd 100644
--- a/tests/test-mq-missingfiles.t
+++ b/tests/test-mq-missingfiles.t
@@ -73,53 +73,6 @@ Display rejections:
+c
+c
-Test missing renamed file
-
- $ hg qpop
- popping changeb
- patch queue now empty
- $ hg up -qC 0
- $ echo a > a
- $ hg mv b bb
- $ python ../writelines.py bb 2 'b\n' 10 'a\n' 2 'c\n'
- $ echo c > c
- $ hg add a c
- $ hg qnew changebb
- $ hg qpop
- popping changebb
- patch queue now empty
- $ hg up -qC 1
- $ hg qpush
- applying changebb
- patching file bb
- Hunk #1 FAILED at 0
- Hunk #2 FAILED at 7
- 2 out of 2 hunks FAILED -- saving rejects to file bb.rej
- b not tracked!
- patch failed, unable to continue (try -v)
- patch failed, rejects left in working dir
- errors during apply, please fix and refresh changebb
- [2]
- $ cat a
- a
- $ cat c
- c
- $ cat bb.rej
- --- bb
- +++ bb
- @@ -1,3 +1,5 @@
- +b
- +b
- a
- a
- a
- @@ -8,3 +10,5 @@
- a
- a
- a
- +c
- +c
-
$ cd ..
diff --git a/tests/test-mq-qclone-http.t b/tests/test-mq-qclone-http.t
index 4c92f4a..7170118 100644
--- a/tests/test-mq-qclone-http.t
+++ b/tests/test-mq-qclone-http.t
@@ -1,7 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
-hide outer repo
- $ hg init
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
@@ -34,7 +30,7 @@ test with recursive collection
$ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
> -A access-paths.log -E error-paths-1.log
$ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
200 Script output follows
@@ -73,7 +69,7 @@ test with normal collection
$ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \
> -A access-paths.log -E error-paths-1.log
$ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
200 Script output follows
@@ -112,7 +108,7 @@ test with old-style collection
$ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \
> -A access-paths.log -E error-paths-1.log
$ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
200 Script output follows
diff --git a/tests/test-mq-qdelete.t b/tests/test-mq-qdelete.t
index 2729a4d..a5fc08f 100644
--- a/tests/test-mq-qdelete.t
+++ b/tests/test-mq-qdelete.t
@@ -188,10 +188,7 @@ more complex state 'both known and unknown patches
$ echo > .hg/patches/series # remove 4.diff and 5.diff from series to confuse mq
$ echo hup >> base
$ hg qnew -f -d '1 0' -m 6 6.diff
- $ echo pup > base
$ hg qfinish -a
- warning: uncommitted changes in the working directory
revision 2b1c98802260 refers to unknown patches: 5.diff
revision 33a6861311c0 refers to unknown patches: 4.diff
- $ cd ..
diff --git a/tests/test-mq-qdiff.t b/tests/test-mq-qdiff.t
index 905a970..27db5a9 100644
--- a/tests/test-mq-qdiff.t
+++ b/tests/test-mq-qdiff.t
@@ -98,7 +98,7 @@ qdiff filename:
diff -r b0c220e1cf43 lines
--- a/lines
+++ b/lines
- @@ -4,4 +4,4 @@
+ @@ -4,4 +6,4 @@
4
-hello world
-goodbye world
@@ -173,5 +173,3 @@ qdiff when file deleted (but not removed) in working dir:
$ hg qrefresh
$ rm newfile
$ hg qdiff
-
- $ cd ..
diff --git a/tests/test-mq-qgoto.t b/tests/test-mq-qgoto.t
index 891b3dd..ae2073d 100644
--- a/tests/test-mq-qgoto.t
+++ b/tests/test-mq-qgoto.t
@@ -75,4 +75,3 @@ Detect ambiguous non-index:
abort: patch 14 not in series
[255]
- $ cd ..
diff --git a/tests/test-mq-qimport-fail-cleanup.t b/tests/test-mq-qimport-fail-cleanup.t
index a4ae565..7186989 100644
--- a/tests/test-mq-qimport-fail-cleanup.t
+++ b/tests/test-mq-qimport-fail-cleanup.t
@@ -16,10 +16,14 @@ imported patches in series file.
> a
> +b
> EOF
+ $ echo
+
empty series
$ hg qseries
+ $ echo
+
qimport valid patch followed by invalid patch
@@ -27,16 +31,10 @@ qimport valid patch followed by invalid patch
adding b.patch to series file
abort: unable to read file fakepatch
[255]
+ $ echo
+
valid patches before fail added to series
$ hg qseries
b.patch
-
- $ hg pull -q -r 0 . # update phase
- $ hg qimport -r 0
- abort: revision 0 is not mutable
- (see "hg help phases" for details)
- [255]
-
- $ cd ..
diff --git a/tests/test-mq-qimport.t b/tests/test-mq-qimport.t
index 52b3568..c2248ca 100644
--- a/tests/test-mq-qimport.t
+++ b/tests/test-mq-qimport.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ cat > writelines.py <<EOF
> import sys
@@ -22,26 +21,12 @@
$ hg init repo
$ cd repo
-qimport without file or revision
-
- $ hg qimport
- abort: no files or revisions specified
- [255]
-
qimport non-existing-file
$ hg qimport non-existing-file
abort: unable to read file non-existing-file
[255]
-qimport null revision
-
- $ hg qimport -r null
- abort: revision -1 is not mutable
- (see "hg help phases" for details)
- [255]
- $ hg qseries
-
import email
$ hg qimport --push -n email - <<EOF
@@ -167,41 +152,21 @@ qimport CRLF diff
try to import --push
- $ cat > appendfoo.diff <<EOF
- > append foo
- >
- > diff -r 07f494440405 -r 261500830e46 baz
- > --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- > +++ b/baz Thu Jan 01 00:00:00 1970 +0000
- > @@ -0,0 +1,1 @@
- > +foo
- > EOF
-
- $ cat > appendbar.diff <<EOF
- > append bar
- >
- > diff -r 07f494440405 -r 261500830e46 baz
- > --- a/baz Thu Jan 01 00:00:00 1970 +0000
- > +++ b/baz Thu Jan 01 00:00:00 1970 +0000
- > @@ -1,1 +1,2 @@
- > foo
- > +bar
- > EOF
-
- $ hg qimport --push appendfoo.diff appendbar.diff
- adding appendfoo.diff to series file
- adding appendbar.diff to series file
- applying appendfoo.diff
- applying appendbar.diff
- now at: appendbar.diff
+ $ echo another >> b
+ $ hg diff > another.diff
+ $ hg up -C
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg qimport --push another.diff
+ adding another.diff to series file
+ applying another.diff
+ now at: another.diff
$ hg qfin -a
patch b.diff finalized without changeset message
- $ hg qimport -r 'p1(.)::' -P
+ patch another.diff finalized without changeset message
+ $ hg qimport -rtip -P
$ hg qpop -a
- popping 3.diff
popping 2.diff
patch queue now empty
- $ hg qdel 3.diff
$ hg qdel -k 2.diff
qimport -e
@@ -260,21 +225,3 @@ set up hgweb
$ cd ../repo
$ hg qimport http://localhost:$HGPORT/raw-rev/0///
adding 0 to series file
-
-check qimport phase:
-
- $ hg -q qpush
- now at: 0
- $ hg phase qparent
- 1: draft
- $ hg qimport -r qparent
- $ hg phase qbase
- 1: draft
- $ hg qfinish qbase
- $ echo '[mq]' >> $HGRCPATH
- $ echo 'secret=true' >> $HGRCPATH
- $ hg qimport -r qparent
- $ hg phase qbase
- 1: secret
-
- $ cd ..
diff --git a/tests/test-mq-qnew.t b/tests/test-mq-qnew.t
index 7400cad..d8ff633 100644
--- a/tests/test-mq-qnew.t
+++ b/tests/test-mq-qnew.t
@@ -111,7 +111,7 @@ plain headers
abort: "#" cannot be used in the name of a patch
abort: ":" cannot be used in the name of a patch
% qnew with name containing slash
- abort: path ends in directory separator: foo/ (glob)
+ abort: path ends in directory separator: foo/
abort: "foo" already exists as a directory
foo/bar.patch
popping foo/bar.patch
@@ -123,7 +123,7 @@ plain headers
A series
A uncommitted.patch
% qnew missing
- abort: missing: * (glob)
+ abort: missing: No such file or directory
% qnew -m
foo bar
@@ -155,7 +155,7 @@ plain headers
created new head
merging a
warning: conflicts during merge.
- merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
abort: cannot manage merge changesets
@@ -178,7 +178,7 @@ hg headers
abort: "#" cannot be used in the name of a patch
abort: ":" cannot be used in the name of a patch
% qnew with name containing slash
- abort: path ends in directory separator: foo/ (glob)
+ abort: path ends in directory separator: foo/
abort: "foo" already exists as a directory
foo/bar.patch
popping foo/bar.patch
@@ -190,7 +190,7 @@ hg headers
A series
A uncommitted.patch
% qnew missing
- abort: missing: * (glob)
+ abort: missing: No such file or directory
% qnew -m
# HG changeset patch
# Parent
@@ -228,7 +228,7 @@ hg headers
created new head
merging a
warning: conflicts during merge.
- merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging a failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
abort: cannot manage merge changesets
diff --git a/tests/test-mq-qpush-exact.t b/tests/test-mq-qpush-exact.t
index 99fb74e..db5f55b 100644
--- a/tests/test-mq-qpush-exact.t
+++ b/tests/test-mq-qpush-exact.t
@@ -286,4 +286,3 @@ qpush --exact a patch without a parent recorded
abort: p0 does not have a parent recorded
[255]
- $ cd ..
diff --git a/tests/test-mq-qpush-fail.t b/tests/test-mq-qpush-fail.t
index 44379cd..0521381 100644
--- a/tests/test-mq-qpush-fail.t
+++ b/tests/test-mq-qpush-fail.t
@@ -150,277 +150,3 @@ and now we try it one more time with a unguarded, while we're not at the top of
abort: cannot push to a previous patch: a
[255]
-test qpop --force and backup files
-
- $ hg qpop -a
- popping b
- patch queue now empty
- $ hg qq --create force
- $ echo a > a
- $ echo b > b
- $ echo c > c
- $ hg ci -Am add a b c
- $ echo a >> a
- $ hg rm b
- $ hg rm c
- $ hg qnew p1
- $ echo a >> a
- $ echo bb > b
- $ hg add b
- $ echo cc > c
- $ hg add c
- $ hg qpop --force --verbose
- saving current version of a as a.orig
- saving current version of b as b.orig
- saving current version of c as c.orig
- popping p1
- patch queue now empty
- $ hg st
- ? a.orig
- ? b.orig
- ? c.orig
- ? untracked-file
- $ cat a.orig
- a
- a
- a
- $ cat b.orig
- bb
- $ cat c.orig
- cc
-
-test qpop --force --no-backup
-
- $ hg qpush
- applying p1
- now at: p1
- $ rm a.orig
- $ echo a >> a
- $ hg qpop --force --no-backup --verbose
- popping p1
- patch queue now empty
- $ test -f a.orig && echo 'error: backup with --no-backup'
- [1]
-
-test qpop --keep-changes
-
- $ hg qpush
- applying p1
- now at: p1
- $ hg qpop --keep-changes --force
- abort: cannot use both --force and --keep-changes
- [255]
- $ echo a >> a
- $ hg qpop --keep-changes
- abort: local changes found, refresh first
- [255]
- $ hg revert -qa a
- $ rm a
- $ hg qpop --keep-changes
- abort: local changes found, refresh first
- [255]
- $ hg rm -A a
- $ hg qpop --keep-changes
- abort: local changes found, refresh first
- [255]
- $ hg revert -qa a
- $ echo b > b
- $ hg add b
- $ hg qpop --keep-changes
- abort: local changes found, refresh first
- [255]
- $ hg forget b
- $ echo d > d
- $ hg add d
- $ hg qpop --keep-changes
- popping p1
- patch queue now empty
- $ hg forget d
- $ rm d
-
-test qpush --force and backup files
-
- $ echo a >> a
- $ hg qnew p2
- $ echo b >> b
- $ echo d > d
- $ echo e > e
- $ hg add d e
- $ hg rm c
- $ hg qnew p3
- $ hg qpop -a
- popping p3
- popping p2
- patch queue now empty
- $ echo a >> a
- $ echo b1 >> b
- $ echo d1 > d
- $ hg add d
- $ echo e1 > e
- $ hg qpush -a --force --verbose
- applying p2
- saving current version of a as a.orig
- patching file a
- a
- applying p3
- saving current version of b as b.orig
- saving current version of d as d.orig
- patching file b
- patching file c
- patching file d
- file d already exists
- 1 out of 1 hunks FAILED -- saving rejects to file d.rej
- patching file e
- file e already exists
- 1 out of 1 hunks FAILED -- saving rejects to file e.rej
- patch failed to apply
- b
- patch failed, rejects left in working dir
- errors during apply, please fix and refresh p3
- [2]
- $ cat a.orig
- a
- a
- $ cat b.orig
- b
- b1
- $ cat d.orig
- d1
-
-test qpush --force --no-backup
-
- $ hg revert -qa
- $ hg qpop -a
- popping p3
- popping p2
- patch queue now empty
- $ echo a >> a
- $ rm a.orig
- $ hg qpush --force --no-backup --verbose
- applying p2
- patching file a
- a
- now at: p2
- $ test -f a.orig && echo 'error: backup with --no-backup'
- [1]
-
-test qgoto --force --no-backup
-
- $ hg qpop
- popping p2
- patch queue now empty
- $ echo a >> a
- $ hg qgoto --force --no-backup p2 --verbose
- applying p2
- patching file a
- a
- now at: p2
- $ test -f a.orig && echo 'error: backup with --no-backup'
- [1]
-
-test qpush --keep-changes
-
- $ hg qpush --keep-changes --force
- abort: cannot use both --force and --keep-changes
- [255]
- $ hg qpush --keep-changes --exact
- abort: cannot use --exact and --keep-changes together
- [255]
- $ echo b >> b
- $ hg qpush --keep-changes
- applying p3
- errors during apply, please fix and refresh p2
- [2]
- $ rm b
- $ hg qpush --keep-changes
- applying p3
- errors during apply, please fix and refresh p2
- [2]
- $ hg rm -A b
- $ hg qpush --keep-changes
- applying p3
- errors during apply, please fix and refresh p2
- [2]
- $ hg revert -aq b
- $ echo d > d
- $ hg add d
- $ hg qpush --keep-changes
- applying p3
- errors during apply, please fix and refresh p2
- [2]
- $ hg forget d
- $ rm d
- $ hg qpop
- popping p2
- patch queue now empty
- $ echo b >> b
- $ hg qpush -a --keep-changes
- applying p2
- applying p3
- errors during apply, please fix and refresh p2
- [2]
- $ hg qtop
- p2
- $ hg parents --template "{rev} {desc}\n"
- 2 imported patch p2
- $ hg st b
- M b
- $ cat b
- b
- b
-
-test qgoto --keep-changes
-
- $ hg revert -aq b
- $ rm e
- $ hg qgoto --keep-changes --force p3
- abort: cannot use both --force and --keep-changes
- [255]
- $ echo a >> a
- $ hg qgoto --keep-changes p3
- applying p3
- now at: p3
- $ hg st a
- M a
- $ hg qgoto --keep-changes p2
- popping p3
- now at: p2
- $ hg st a
- M a
-
-test mq.keepchanges setting
-
- $ hg --config mq.keepchanges=1 qpush
- applying p3
- now at: p3
- $ hg st a
- M a
- $ hg --config mq.keepchanges=1 qpop
- popping p3
- now at: p2
- $ hg st a
- M a
- $ hg --config mq.keepchanges=1 qgoto p3
- applying p3
- now at: p3
- $ hg st a
- M a
- $ echo b >> b
- $ hg --config mq.keepchanges=1 qpop --force
- popping p3
- now at: p2
- $ hg st b
- $ hg --config mq.keepchanges=1 qpush --exact
- abort: local changes found, refresh first
- [255]
- $ hg revert -qa a
- $ hg qpop
- popping p2
- patch queue now empty
- $ echo a >> a
- $ hg --config mq.keepchanges=1 qpush --force
- applying p2
- now at: p2
- $ hg st a
-
- $ cd ..
diff --git a/tests/test-mq-qrefresh-interactive.t b/tests/test-mq-qrefresh-interactive.t
index 41c27ce..626ca2f 100644
--- a/tests/test-mq-qrefresh-interactive.t
+++ b/tests/test-mq-qrefresh-interactive.t
@@ -31,22 +31,22 @@ help qrefresh (no record)
options:
- -e --edit edit commit message
- -g --git use git extended diff format
- -s --short refresh only files already in the patch and
- specified files
- -U --currentuser add/update author field in patch with current user
- -u --user USER add/update author field in patch with given user
- -D --currentdate add/update date field in patch with current date
- -d --date DATE add/update date field in patch with given date
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -m --message TEXT use text as commit message
- -l --logfile FILE read commit message from file
+ -e --edit edit commit message
+ -g --git use git extended diff format
+ -s --short refresh only files already in the patch and
+ specified files
+ -U --currentuser add/update author field in patch with current user
+ -u --user USER add/update author field in patch with given user
+ -D --currentdate add/update date field in patch with current date
+ -d --date DATE add/update date field in patch with given date
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -m --message TEXT use text as commit message
+ -l --logfile FILE read commit message from file
[+] marked option can be specified multiple times
- use "hg -v help qrefresh" to show more info
+ use "hg -v help qrefresh" to show global options
help qrefresh (record)
@@ -75,23 +75,23 @@ help qrefresh (record)
options:
- -e --edit edit commit message
- -g --git use git extended diff format
- -s --short refresh only files already in the patch and
- specified files
- -U --currentuser add/update author field in patch with current user
- -u --user USER add/update author field in patch with given user
- -D --currentdate add/update date field in patch with current date
- -d --date DATE add/update date field in patch with given date
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -m --message TEXT use text as commit message
- -l --logfile FILE read commit message from file
- -i --interactive interactively select changes to refresh
+ -e --edit edit commit message
+ -g --git use git extended diff format
+ -s --short refresh only files already in the patch and
+ specified files
+ -U --currentuser add/update author field in patch with current user
+ -u --user USER add/update author field in patch with given user
+ -D --currentdate add/update date field in patch with current date
+ -d --date DATE add/update date field in patch with given date
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -m --message TEXT use text as commit message
+ -l --logfile FILE read commit message from file
+ -i --interactive interactively select changes to refresh
[+] marked option can be specified multiple times
- use "hg -v help qrefresh" to show more info
+ use "hg -v help qrefresh" to show global options
$ hg init a
$ cd a
@@ -185,22 +185,22 @@ partial qrefresh
> EOF
diff --git a/1.txt b/1.txt
2 hunks, 2 lines changed
- examine changes to '1.txt'? [Ynesfdaq?]
+ examine changes to '1.txt'? [Ynsfdaq?]
@@ -1,3 +1,3 @@
1
-2
+2 2
3
- record change 1/4 to '1.txt'? [Ynesfdaq?]
+ record change 1/4 to '1.txt'? [Ynsfdaq?]
@@ -3,3 +3,3 @@
3
-4
+4 4
5
- record change 2/4 to '1.txt'? [Ynesfdaq?]
+ record change 2/4 to '1.txt'? [Ynsfdaq?]
diff --git a/2.txt b/2.txt
1 hunks, 1 lines changed
- examine changes to '2.txt'? [Ynesfdaq?]
+ examine changes to '2.txt'? [Ynsfdaq?]
@@ -1,5 +1,5 @@
a
-b
@@ -208,10 +208,10 @@ partial qrefresh
c
d
e
- record change 3/4 to '2.txt'? [Ynesfdaq?]
+ record change 3/4 to '2.txt'? [Ynsfdaq?]
diff --git a/dir/a.txt b/dir/a.txt
1 hunks, 1 lines changed
- examine changes to 'dir/a.txt'? [Ynesfdaq?]
+ examine changes to 'dir/a.txt'? [Ynsfdaq?]
After partial qrefresh 'tip'
@@ -279,7 +279,7 @@ qrefresh interactively everything else
> EOF
diff --git a/1.txt b/1.txt
1 hunks, 1 lines changed
- examine changes to '1.txt'? [Ynesfdaq?]
+ examine changes to '1.txt'? [Ynsfdaq?]
@@ -1,5 +1,5 @@
1
2 2
@@ -287,17 +287,17 @@ qrefresh interactively everything else
-4
+4 4
5
- record change 1/2 to '1.txt'? [Ynesfdaq?]
+ record change 1/2 to '1.txt'? [Ynsfdaq?]
diff --git a/dir/a.txt b/dir/a.txt
1 hunks, 1 lines changed
- examine changes to 'dir/a.txt'? [Ynesfdaq?]
+ examine changes to 'dir/a.txt'? [Ynsfdaq?]
@@ -1,4 +1,4 @@
-hello world
+hello world!
someone
up
- record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
+ record change 2/2 to 'dir/a.txt'? [Ynsfdaq?]
After final qrefresh 'tip'
@@ -346,5 +346,3 @@ After final qrefresh 'tip'
After qrefresh 'diff'
$ hg diff --nodates
-
- $ cd ..
diff --git a/tests/test-mq-qrefresh.t b/tests/test-mq-qrefresh.t
index 700380e..396b5f4 100644
--- a/tests/test-mq-qrefresh.t
+++ b/tests/test-mq-qrefresh.t
@@ -523,24 +523,3 @@ but only after writing the bad name into the patch.
diff --git a/a b/a
new file mode 100644
$ cd ..
-
-Refresh with phase data:
-
-
-
- $ cd repo
- $ echo 'babar' >> a
- $ hg qnew -m 'update a' p2.diff
- $ hg phase p2.diff
- 2: draft
- $ echo 'beber' >> a
- $ hg qref
- $ hg phase p2.diff
- 2: draft
- $ hg phase --force --secret p2.diff
- $ echo 'bibir' >> a
- $ hg qref
- $ hg phase p2.diff
- 2: secret
-
- $ cd ..
diff --git a/tests/test-mq-qrename.t b/tests/test-mq-qrename.t
index 6baf88c..621507b 100644
--- a/tests/test-mq-qrename.t
+++ b/tests/test-mq-qrename.t
@@ -76,8 +76,8 @@ Test overlapping renames (issue2388)
$ hg qrename patchb patchc
$ hg qrename patcha patchb
$ hg st --mq
+ M patchb
M series
- A patchb
A patchc
R patcha
$ cd ..
@@ -94,32 +94,3 @@ Test renames with mq repo (issue2097)
nothing changed
[1]
$ cd ..
-
-Test renaming to a folded patch (issue3058)
-
- $ hg init issue3058
- $ cd issue3058
- $ hg init --mq
- $ echo a > a
- $ hg add a
- $ hg qnew adda
- $ echo b >> a
- $ hg qnew addb
- $ hg qpop
- popping addb
- now at: adda
- $ hg ci --mq -m "save mq"
- $ hg qfold addb
- $ hg qmv addb
- $ cat .hg/patches/addb
- # HG changeset patch
- # Parent 0000000000000000000000000000000000000000
-
- diff -r 000000000000 a
- --- /dev/null * (glob)
- +++ b/a * (glob)
- @@ -0,0 +1,2 @@
- +a
- +b
- $ cd ..
-
diff --git a/tests/test-mq-safety.t b/tests/test-mq-safety.t
index d6fe35d..d184d8e 100644
--- a/tests/test-mq-safety.t
+++ b/tests/test-mq-safety.t
@@ -1,6 +1,5 @@
$ echo '[extensions]' >> $HGRCPATH
- $ echo 'hgext.mq =' >> $HGRCPATH
- $ echo 'hgext.graphlog =' >> $HGRCPATH
+ $ echo 'mq =' >> $HGRCPATH
$ hg init repo
$ cd repo
@@ -18,35 +17,6 @@
$ echo bar >> foo
$ hg qrefresh -m 'append bar'
-Try to operate on public mq changeset
-
- $ hg qpop
- popping bar
- now at: foo
- $ hg phase --public qbase
- $ echo babar >> foo
- $ hg qref
- abort: cannot refresh immutable revision
- (see "hg help phases" for details)
- [255]
- $ hg revert -a
- reverting foo
- $ hg qpop
- abort: popping would remove an immutable revision
- (see "hg help phases" for details)
- [255]
- $ hg qfold bar
- abort: cannot refresh immutable revision
- (see "hg help phases" for details)
- [255]
- $ hg revert -a
- reverting foo
-
-restore state for remaining test
-
- $ hg qpush
- applying bar
- now at: bar
try to commit on top of a patch
@@ -69,7 +39,7 @@ qpop/qrefresh on the wrong revision
abort: popping would remove a revision not managed by this patch queue
[255]
$ hg qpop -n patches
- using patch queue: $TESTTMP/repo/.hg/patches (glob)
+ using patch queue: $TESTTMP/repo/.hg/patches
abort: popping would remove a revision not managed by this patch queue
[255]
$ hg qrefresh
@@ -106,7 +76,6 @@ qpush warning branchheads
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo c > c
$ hg ci -Amc
adding c
@@ -156,7 +125,6 @@ Testing applied patches, push and --force
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branch
marked working directory as branch branch
- (branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg ci -Am addb
adding b
@@ -174,7 +142,7 @@ Testing applied patches, push and --force
Pushing applied patch with --rev without --force
- $ hg push -r . ../forcepush2
+ $ hg push -r default ../forcepush2
pushing to ../forcepush2
abort: source has mq patches applied
[255]
@@ -188,7 +156,7 @@ Pushing applied patch with branchhash, without --force
Pushing revs excluding applied patch
- $ hg push --new-branch -r 'branch(branch)' -r 2 ../forcepush2
+ $ hg push --new-branch -r branch -r 2 ../forcepush2
pushing to ../forcepush2
searching for changes
adding changesets
@@ -198,13 +166,6 @@ Pushing revs excluding applied patch
Pushing applied patch with --force
- $ hg phase --force --secret 'mq()'
- $ hg push --force -r default ../forcepush2
- pushing to ../forcepush2
- searching for changes
- no changes found (ignored 1 secret changesets)
- [1]
- $ hg phase --draft 'mq()'
$ hg push --force -r default ../forcepush2
pushing to ../forcepush2
searching for changes
@@ -212,5 +173,3 @@ Pushing applied patch with --force
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
-
- $ cd ..
diff --git a/tests/test-mq-strip.t b/tests/test-mq-strip.t
index 70fffb1..a854e31 100644
--- a/tests/test-mq-strip.t
+++ b/tests/test-mq-strip.t
@@ -311,6 +311,7 @@ after strip of merge parent
$ hg strip 2 4
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
+ saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
$ hg glog
@ changeset: 2:65bd5f99a4a3
| tag: tip
@@ -420,49 +421,3 @@ Verify strip protects against stripping wc parent when there are uncommited mods
$ hg status
M bar
? b
- $ cd ..
-
-stripping many nodes on a complex graph (issue3299)
-
- $ hg init issue3299
- $ cd issue3299
- $ hg debugbuilddag '@a.:a@b.:b.:x<a@a.:a<b@b.:b<a@a.:a'
- $ hg strip 'not ancestors(x)'
- saved backup bundle to $TESTTMP/issue3299/.hg/strip-backup/*-backup.hg (glob)
-
-test hg strip -B bookmark
-
- $ cd ..
- $ hg init bookmarks
- $ cd bookmarks
- $ hg debugbuilddag '..<2.*1/2:m<2+3:c<m+3:a<2.:b'
- $ hg bookmark -r 'a' 'todelete'
- $ hg bookmark -r 'b' 'B'
- $ hg bookmark -r 'b' 'nostrip'
- $ hg bookmark -r 'c' 'delete'
- $ hg up -C todelete
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg strip -B nostrip
- bookmark 'nostrip' deleted
- abort: empty revision set
- [255]
- $ hg strip -B todelete
- bookmark 'todelete' deleted
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
- $ hg id -ir dcbb326fdec2
- abort: unknown revision 'dcbb326fdec2'!
- [255]
- $ hg id -ir d62d843c9a01
- d62d843c9a01
- $ hg bookmarks
- B 9:ff43616e5d0f
- delete 6:2702dd0c91e7
- $ hg strip -B delete
- bookmark 'delete' deleted
- saved backup bundle to $TESTTMP/bookmarks/.hg/strip-backup/*-backup.hg (glob)
- $ hg id -ir 6:2702dd0c91e7
- abort: unknown revision '2702dd0c91e7'!
- [255]
-
- $ cd ..
diff --git a/tests/test-mq-subrepo-svn.t b/tests/test-mq-subrepo-svn.t
index 39e5c0b..9ed9121 100644
--- a/tests/test-mq-subrepo-svn.t
+++ b/tests/test-mq-subrepo-svn.t
@@ -1,4 +1,4 @@
- $ "$TESTDIR/hghave" svn13 || exit 80
+ $ "$TESTDIR/hghave" svn || exit 80
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
@@ -16,29 +16,28 @@ fn to create new repository, and cd into it
handle svn subrepos safely
$ svnadmin create svn-repo-2499
-
- $ SVNREPOPATH=`pwd`/svn-repo-2499/project
-#if windows
- $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#else
- $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#endif
-
+ $ curpath=`pwd | tr '\\\\' /`
+ $ expr "$svnpath" : "\/" > /dev/null
+ > if [ $? -ne 0 ]; then
+ > curpath="/$curpath"
+ > fi
+ $ svnurl="file://$curpath/svn-repo-2499/project"
$ mkdir -p svn-project-2499/trunk
- $ svn import -m 'init project' svn-project-2499 "$SVNREPOURL"
- Adding svn-project-2499/trunk (glob)
+ $ svn import -m 'init project' svn-project-2499 "$svnurl"
+ Adding svn-project-2499/trunk
Committed revision 1.
qnew on repo w/svn subrepo
$ mkrepo repo-2499-svn-subrepo
- $ svn co "$SVNREPOURL"/trunk sub
+ $ svn co "$svnurl"/trunk sub
Checked out revision 1.
$ echo 'sub = [svn]sub' >> .hgsub
$ hg add .hgsub
$ hg status -S -X '**/format'
A .hgsub
$ hg qnew -m0 0.diff
+ committing subrepository sub
$ cd sub
$ echo a > a
$ svn add a
@@ -50,5 +49,3 @@ qnew on repo w/svn subrepo
$ hg qnew -m1 1.diff
abort: uncommitted changes in subrepository sub
[255]
-
- $ cd ..
diff --git a/tests/test-mq-subrepo.t b/tests/test-mq-subrepo.t
index 948006a..ffd880c 100644
--- a/tests/test-mq-subrepo.t
+++ b/tests/test-mq-subrepo.t
@@ -1,5 +1,3 @@
- $ echo "[ui]" >> $HGRCPATH
- $ echo "commitsubrepos = Yes" >> $HGRCPATH
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
$ echo "record=" >> $HGRCPATH
@@ -105,6 +103,7 @@ handle subrepos safely on qnew
% update substate when adding .hgsub w/clean updated subrepo
A .hgsub
% qnew -m0 0.diff
+ committing subrepository sub
path sub
source sub
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
@@ -120,6 +119,7 @@ handle subrepos safely on qnew
% update substate when modifying .hgsub w/clean updated subrepo
M .hgsub
% qnew -m1 1.diff
+ committing subrepository sub2
path sub
source sub
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
@@ -164,6 +164,7 @@ handle subrepos safely on qrefresh
% update substate when adding .hgsub w/clean updated subrepo
A .hgsub
% qrefresh
+ committing subrepository sub
path sub
source sub
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
@@ -180,6 +181,7 @@ handle subrepos safely on qrefresh
% update substate when modifying .hgsub w/clean updated subrepo
M .hgsub
% qrefresh
+ committing subrepository sub2
path sub
source sub
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
@@ -221,6 +223,7 @@ handle subrepos safely on qpush/qpop
$ echo sub = sub > .hgsub
$ hg add .hgsub
$ hg qnew -m0 0.diff
+ committing subrepository sub
$ hg debugsub
path sub
source sub
@@ -263,7 +266,7 @@ handle subrepos safely on qrecord
% qrecord --config ui.interactive=1 -m0 0.diff
diff --git a/.hgsub b/.hgsub
new file mode 100644
- examine changes to '.hgsub'? [Ynesfdaq?]
+ examine changes to '.hgsub'? [Ynsfdaq?]
abort: uncommitted changes in subrepository sub
[255]
% update substate when adding .hgsub w/clean updated subrepo
@@ -271,7 +274,8 @@ handle subrepos safely on qrecord
% qrecord --config ui.interactive=1 -m0 0.diff
diff --git a/.hgsub b/.hgsub
new file mode 100644
- examine changes to '.hgsub'? [Ynesfdaq?]
+ examine changes to '.hgsub'? [Ynsfdaq?]
+ committing subrepository sub
path sub
source sub
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
@@ -287,11 +291,11 @@ handle subrepos safely on qrecord
% qrecord --config ui.interactive=1 -m1 1.diff
diff --git a/.hgsub b/.hgsub
1 hunks, 1 lines changed
- examine changes to '.hgsub'? [Ynesfdaq?]
+ examine changes to '.hgsub'? [Ynsfdaq?]
@@ -1,1 +1,2 @@
sub = sub
+sub2 = sub2
- record this change to '.hgsub'? [Ynesfdaq?]
+ record this change to '.hgsub'? [Ynsfdaq?]
abort: uncommitted changes in subrepository sub2
[255]
% update substate when modifying .hgsub w/clean updated subrepo
@@ -299,11 +303,12 @@ handle subrepos safely on qrecord
% qrecord --config ui.interactive=1 -m1 1.diff
diff --git a/.hgsub b/.hgsub
1 hunks, 1 lines changed
- examine changes to '.hgsub'? [Ynesfdaq?]
+ examine changes to '.hgsub'? [Ynsfdaq?]
@@ -1,1 +1,2 @@
sub = sub
+sub2 = sub2
- record this change to '.hgsub'? [Ynesfdaq?]
+ record this change to '.hgsub'? [Ynsfdaq?]
+ committing subrepository sub2
path sub
source sub
revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
@@ -324,7 +329,7 @@ handle subrepos safely on qrecord
% qrecord --config ui.interactive=1 -m2 2.diff
diff --git a/.hgsub b/.hgsub
deleted file mode 100644
- examine changes to '.hgsub'? [Ynesfdaq?]
+ examine changes to '.hgsub'? [Ynsfdaq?]
% debugsub should be empty
$ hg qpop -qa
@@ -339,7 +344,7 @@ handle subrepos safely on qrecord
% qrecord --config ui.interactive=1 -m3 3.diff
diff --git a/.hgsub b/.hgsub
deleted file mode 100644
- examine changes to '.hgsub'? [Ynesfdaq?]
+ examine changes to '.hgsub'? [Ynsfdaq?]
% debugsub should be empty
$ cd ..
@@ -353,162 +358,4 @@ correctly handle subrepos with patch queues
$ echo sub = sub >> .hgsub
$ hg add .hgsub
$ hg qnew 0.diff
-
- $ cd ..
-
-check whether MQ operations can import updated .hgsubstate correctly
-both into 'revision' and 'patch file under .hg/patches':
-
- $ hg init importing-hgsubstate
- $ cd importing-hgsubstate
-
- $ echo a > a
- $ hg commit -u test -d '0 0' -Am '#0 in parent'
- adding a
- $ hg init sub
- $ echo sa > sub/sa
- $ hg -R sub commit -u test -d '0 0' -Am '#0 in sub'
- adding sa
- $ echo 'sub = sub' > .hgsub
- $ touch .hgsubstate
- $ hg add .hgsub .hgsubstate
-
- $ hg qnew -u test -d '0 0' import-at-qnew
- $ hg -R sub parents --template '{node} sub\n'
- b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- $ cat .hgsubstate
- b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- $ hg diff -c tip
- diff -r f499373e340c -r b20ffac88564 .hgsub
- --- /dev/null
- +++ b/.hgsub
- @@ -0,0 +1,1 @@
- +sub = sub
- diff -r f499373e340c -r b20ffac88564 .hgsubstate
- --- /dev/null
- +++ b/.hgsubstate
- @@ -0,0 +1,1 @@
- +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- $ cat .hg/patches/import-at-qnew
- # HG changeset patch
- # Parent f499373e340cdca5d01dee904aeb42dd2a325e71
- # User test
- # Date 0 0
-
- diff -r f499373e340c -r b20ffac88564 .hgsub
- --- /dev/null
- +++ b/.hgsub
- @@ -0,0 +1,1 @@
- +sub = sub
- diff -r f499373e340c -r b20ffac88564 .hgsubstate
- --- /dev/null
- +++ b/.hgsubstate
- @@ -0,0 +1,1 @@
- +b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- $ hg qpop
- popping import-at-qnew
- patch queue now empty
- $ hg qpush
- applying import-at-qnew
- now at: import-at-qnew
-
- $ hg qnew import-at-qrefresh
- $ echo sb > sub/sb
- $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub'
- adding sb
- $ hg qrefresh -u test -d '0 0'
- $ hg -R sub parents --template '{node} sub\n'
- 88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ cat .hgsubstate
- 88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ hg diff -c tip
- diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate
- --- a/.hgsubstate
- +++ b/.hgsubstate
- @@ -1,1 +1,1 @@
- -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- +88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ cat .hg/patches/import-at-qrefresh
- # HG changeset patch
- # Date 0 0
- # User test
- # Parent 44f846335325209be6be35dc2c9a4be107278c09
-
- diff -r 44f846335325 .hgsubstate
- --- a/.hgsubstate
- +++ b/.hgsubstate
- @@ -1,1 +1,1 @@
- -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- +88ac1bef5ed43b689d1d200b59886b675dec474b sub
-
- $ hg qrefresh -u test -d '0 0'
- $ cat .hgsubstate
- 88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ hg diff -c tip
- diff -r 44f846335325 -r b3e8c5fa3aaa .hgsubstate
- --- a/.hgsubstate
- +++ b/.hgsubstate
- @@ -1,1 +1,1 @@
- -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- +88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ cat .hg/patches/import-at-qrefresh
- # HG changeset patch
- # Date 0 0
- # User test
- # Parent 44f846335325209be6be35dc2c9a4be107278c09
-
- diff -r 44f846335325 .hgsubstate
- --- a/.hgsubstate
- +++ b/.hgsubstate
- @@ -1,1 +1,1 @@
- -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- +88ac1bef5ed43b689d1d200b59886b675dec474b sub
-
- $ hg update -C tip
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg qpop -a
- popping import-at-qrefresh
- popping import-at-qnew
- patch queue now empty
-
- $ hg -R sub update -C 0
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ echo 'sub = sub' > .hgsub
- $ hg commit -Am '#1 in parent'
- adding .hgsub
- $ hg -R sub update -C 1
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg commit -Am '#2 in parent (but be rollbacked soon)'
- $ hg rollback
- repository tip rolled back to revision 1 (undo commit)
- working directory now based on revision 1
- $ hg status
- M .hgsubstate
- $ hg qnew -u test -d '0 0' checkstate-at-qnew
- $ hg -R sub parents --template '{node} sub\n'
- 88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ cat .hgsubstate
- 88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ hg diff -c tip
- diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
- --- a/.hgsubstate
- +++ b/.hgsubstate
- @@ -1,1 +1,1 @@
- -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- +88ac1bef5ed43b689d1d200b59886b675dec474b sub
- $ cat .hg/patches/checkstate-at-qnew
- # HG changeset patch
- # Parent 4d91eb2fa1d1b22ec513347b9cd06f6b49d470fa
- # User test
- # Date 0 0
-
- diff -r 4d91eb2fa1d1 -r 1259c112d884 .hgsubstate
- --- a/.hgsubstate
- +++ b/.hgsubstate
- @@ -1,1 +1,1 @@
- -b6f6e9c41f3dfd374a6d2ed4535c87951cf979cf sub
- +88ac1bef5ed43b689d1d200b59886b675dec474b sub
-
- $ cd ..
-
- $ cd ..
+ committing subrepository sub
diff --git a/tests/test-mq-symlinks.t b/tests/test-mq-symlinks.t
index ffbc790..fd3db67 100644
--- a/tests/test-mq-symlinks.t
+++ b/tests/test-mq-symlinks.t
@@ -11,7 +11,7 @@
$ echo ccc > c
$ hg add a b c
$ hg qrefresh
- $ "$TESTDIR/readlink.py" a
+ $ $TESTDIR/readlink.py a
a -> a not a symlink
@@ -21,7 +21,7 @@ test replacing a file with a symlink
$ rm a
$ ln -s b a
$ hg qrefresh --git
- $ "$TESTDIR/readlink.py" a
+ $ $TESTDIR/readlink.py a
a -> b
$ hg qpop
@@ -30,7 +30,7 @@ test replacing a file with a symlink
$ hg qpush
applying symlink.patch
now at: symlink.patch
- $ "$TESTDIR/readlink.py" a
+ $ $TESTDIR/readlink.py a
a -> b
@@ -39,7 +39,7 @@ test updating a symlink
$ rm a
$ ln -s c a
$ hg qnew --git -f updatelink
- $ "$TESTDIR/readlink.py" a
+ $ $TESTDIR/readlink.py a
a -> c
$ hg qpop
popping updatelink
@@ -49,7 +49,7 @@ test updating a symlink
patching file a
a
now at: updatelink
- $ "$TESTDIR/readlink.py" a
+ $ $TESTDIR/readlink.py a
a -> c
$ hg st
@@ -104,5 +104,5 @@ replace broken symlink with another broken symlink
$ hg qpush
applying movelink
now at: movelink
- $ "$TESTDIR/readlink.py" linkb
+ $ $TESTDIR/readlink.py linkb
linkb -> linkb
diff --git a/tests/test-mq.t b/tests/test-mq.t
index 7e31845..04dc1ce 100644
--- a/tests/test-mq.t
+++ b/tests/test-mq.t
@@ -48,50 +48,34 @@ help
will override the [diff] section and always generate git or regular patches,
possibly losing data in the second case.
- It may be desirable for mq changesets to be kept in the secret phase (see "hg
- help phases"), which can be enabled with the following setting:
-
- [mq]
- secret = True
-
You will by default be managing a patch queue named "patches". You can create
other, independent patch queues with the "hg qqueue" command.
- If the working directory contains uncommitted files, qpush, qpop and qgoto
- abort immediately. If -f/--force is used, the changes are discarded. Setting:
-
- [mq]
- keepchanges = True
-
- make them behave as if --keep-changes were passed, and non-conflicting local
- changes will be tolerated and preserved. If incompatible options such as
- -f/--force or --exact are passed, this setting is ignored.
-
list of commands:
- qapplied print the patches already applied
- qclone clone main and patch repository at same time
- qdelete remove patches from queue
- qdiff diff of the current patch and subsequent modifications
- qfinish move applied patches into repository history
- qfold fold the named patches into the current patch
- qgoto push or pop patches until named patch is at top of stack
- qguard set or print guards for a patch
- qheader print the header of the topmost or specified patch
- qimport import a patch or existing changeset
- qnew create a new patch
- qnext print the name of the next pushable patch
- qpop pop the current patch off the stack
- qprev print the name of the preceding applied patch
- qpush push the next patch onto the stack
- qqueue manage multiple patch queues
- qrefresh update the current patch
- qrename rename a patch
- qselect set or print guarded patches to push
- qseries print the entire series file
- qtop print the name of the current patch
- qunapplied print the patches not yet applied
- strip strip changesets and all their descendants from the repository
+ qapplied print the patches already applied
+ qclone clone main and patch repository at same time
+ qdelete remove patches from queue
+ qdiff diff of the current patch and subsequent modifications
+ qfinish move applied patches into repository history
+ qfold fold the named patches into the current patch
+ qgoto push or pop patches until named patch is at top of stack
+ qguard set or print guards for a patch
+ qheader print the header of the topmost or specified patch
+ qimport import a patch
+ qnew create a new patch
+ qnext print the name of the next patch
+ qpop pop the current patch off the stack
+ qprev print the name of the previous patch
+ qpush push the next patch onto the stack
+ qqueue manage multiple patch queues
+ qrefresh update the current patch
+ qrename rename a patch
+ qselect set or print guarded patches to push
+ qseries print the entire series file
+ qtop print the name of the current patch
+ qunapplied print the patches not yet applied
+ strip strip changesets and all their descendants from the repository
use "hg -v help mq" to show builtin aliases and global options
@@ -151,7 +135,7 @@ qinit -c should create both files if they don't exist
guards
$ cat .hg/patches/series
$ hg qinit -c
- abort: repository $TESTTMP/d/.hg/patches already exists! (glob)
+ abort: repository $TESTTMP/d/.hg/patches already exists!
[255]
$ cd ..
@@ -162,20 +146,16 @@ qinit -c should create both files if they don't exist
$ hg qnew A
$ checkundo qnew
$ echo foo > foo
- $ hg phase -r qbase
- 0: draft
$ hg add foo
$ hg qrefresh
- $ hg phase -r qbase
- 0: draft
$ hg qnew B
$ echo >> foo
$ hg qrefresh
$ echo status >> .hg/patches/.hgignore
$ echo bleh >> .hg/patches/.hgignore
$ hg qinit -c
- adding .hg/patches/A (glob)
- adding .hg/patches/B (glob)
+ adding .hg/patches/A
+ adding .hg/patches/B
$ hg -R .hg/patches status
A .hgignore
A A
@@ -207,12 +187,10 @@ status --mq with color (issue2096)
try the --mq option on a command provided by an extension
$ hg purge --mq --verbose --config extensions.purge=
- removing file flaf
+ Removing file flaf
$ cd ..
-#if no-outer-repo
-
init --mq without repo
$ mkdir f
@@ -222,8 +200,6 @@ init --mq without repo
[255]
$ cd ..
-#endif
-
init --mq with repo path
$ hg init g
@@ -319,8 +295,6 @@ Dump the tag cache to ensure that it has exactly one head after qpush.
$ hg qpush
applying test.patch
now at: test.patch
- $ hg phase -r qbase
- 2: draft
$ hg tags > /dev/null
.hg/cache/tags (post qpush):
@@ -411,7 +385,7 @@ commit should fail
abort: cannot commit over an applied mq patch
[255]
-push should fail if draft
+push should fail
$ hg push ../../k
pushing to ../../k
@@ -531,18 +505,7 @@ cleaning up
$ hg qpush --move test.patch # already applied
abort: cannot push to a previous patch: test.patch
[255]
- $ sed '2i\
- > # make qtip index different in series and fullseries
- > ' `hg root`/.hg/patches/series > $TESTTMP/sedtmp
- $ cp $TESTTMP/sedtmp `hg root`/.hg/patches/series
- $ cat `hg root`/.hg/patches/series
- # comment
- # make qtip index different in series and fullseries
-
- test.patch
- test1b.patch
- test2.patch
- $ hg qpush --move test2.patch
+ $ hg qpush
applying test2.patch
now at: test2.patch
@@ -550,12 +513,11 @@ cleaning up
series after move
$ cat `hg root`/.hg/patches/series
- # comment
- # make qtip index different in series and fullseries
-
test.patch
test1b.patch
test2.patch
+ # comment
+
pop, qapplied, qunapplied
@@ -799,7 +761,6 @@ strip with local changes, should complain
$ hg strip -f tip
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
- $ cd ..
cd b; hg qrefresh
@@ -910,27 +871,20 @@ bad node in status
no patches applied
[1]
- $ cd ..
-
-
-git patches
-
$ cat >>$HGRCPATH <<EOF
> [diff]
> git = True
> EOF
+ $ cd ..
$ hg init git
$ cd git
$ hg qinit
$ hg qnew -m'new file' new
$ echo foo > new
-#if execbit
$ chmod +x new
-#endif
$ hg add new
$ hg qrefresh
-#if execbit
$ cat .hg/patches/new
new file
@@ -940,17 +894,6 @@ git patches
+++ b/new
@@ -0,0 +1,1 @@
+foo
-#else
- $ cat .hg/patches/new
- new file
-
- diff --git a/new b/new
- new file mode 100644
- --- /dev/null
- +++ b/new
- @@ -0,0 +1,1 @@
- +foo
-#endif
$ hg qnew -m'copy file' copy
$ hg cp new copy
@@ -1202,7 +1145,7 @@ strip again
$ hg strip 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/strip/.hg/strip-backup/*-backup.hg (glob)
+ saved backup bundle to $TESTTMP/b/strip/.hg/strip-backup/*-backup.hg (glob)
$ checkundo strip
$ hg log
changeset: 1:20cbbe65cff7
@@ -1248,7 +1191,7 @@ repo with unversioned patch dir
$ cd qclonesource
$ hg qinit -c
- adding .hg/patches/patch1 (glob)
+ adding .hg/patches/patch1
$ hg qci -m checkpoint
$ qlog
main repo:
@@ -1387,15 +1330,11 @@ qpush should fail, local changes
apply force, should discard changes in hello, but not bye
- $ hg qpush -f --verbose
+ $ hg qpush -f
applying empty
- saving current version of hello.txt as hello.txt.orig
- patching file hello.txt
- hello.txt
now at: empty
$ hg st
M bye.txt
- ? hello.txt.orig
$ hg diff --config diff.nodates=True
diff -r ba252371dbc1 bye.txt
--- a/bye.txt
@@ -1453,100 +1392,3 @@ test popping must remove files added in subdirectories first
patch queue now empty
$ cd ..
-
-test case preservation through patch pushing especially on case
-insensitive filesystem
-
- $ hg init casepreserve
- $ cd casepreserve
-
- $ hg qnew add-file1
- $ echo a > TeXtFiLe.TxT
- $ hg add TeXtFiLe.TxT
- $ hg qrefresh
-
- $ hg qnew add-file2
- $ echo b > AnOtHeRFiLe.TxT
- $ hg add AnOtHeRFiLe.TxT
- $ hg qrefresh
-
- $ hg qnew modify-file
- $ echo c >> AnOtHeRFiLe.TxT
- $ hg qrefresh
-
- $ hg qapplied
- add-file1
- add-file2
- modify-file
- $ hg qpop -a
- popping modify-file
- popping add-file2
- popping add-file1
- patch queue now empty
-
-this qpush causes problems below, if case preservation on case
-insensitive filesystem is not enough:
-(1) unexpected "adding ..." messages are shown
-(2) patching fails in modification of (1) files
-
- $ hg qpush -a
- applying add-file1
- applying add-file2
- applying modify-file
- now at: modify-file
-
-Proper phase default with mq:
-
-1. mq.secret=false
-
- $ rm .hg/store/phaseroots
- $ hg phase 'qparent::'
- 0: draft
- 1: draft
- 2: draft
- $ echo '[mq]' >> $HGRCPATH
- $ echo 'secret=true' >> $HGRCPATH
- $ rm -f .hg/store/phaseroots
- $ hg phase 'qparent::'
- 0: secret
- 1: secret
- 2: secret
-
-Test that qfinish change phase when mq.secret=true
-
- $ hg qfinish qbase
- patch add-file1 finalized without changeset message
- $ hg phase 'all()'
- 0: draft
- 1: secret
- 2: secret
-
-Test that qfinish respect phases.new-commit setting
-
- $ echo '[phases]' >> $HGRCPATH
- $ echo 'new-commit=secret' >> $HGRCPATH
- $ hg qfinish qbase
- patch add-file2 finalized without changeset message
- $ hg phase 'all()'
- 0: draft
- 1: secret
- 2: secret
-
-(restore env for next test)
-
- $ sed -e 's/new-commit=secret//' $HGRCPATH > $TESTTMP/sedtmp
- $ cp $TESTTMP/sedtmp $HGRCPATH
- $ hg qimport -r 1 --name add-file2
-
-Test that qfinish preserve phase when mq.secret=false
-
- $ sed -e 's/secret=true/secret=false/' $HGRCPATH > $TESTTMP/sedtmp
- $ cp $TESTTMP/sedtmp $HGRCPATH
- $ hg qfinish qbase
- patch add-file2 finalized without changeset message
- $ hg phase 'all()'
- 0: draft
- 1: secret
- 2: secret
-
- $ cd ..
diff --git a/tests/test-mv-cp-st-diff.t b/tests/test-mv-cp-st-diff.t
index 5342fea..025e62f 100644
--- a/tests/test-mv-cp-st-diff.t
+++ b/tests/test-mv-cp-st-diff.t
@@ -560,7 +560,6 @@ $4 - test description
- parent to root: --rev . --rev 0
M a
- b
R b
diff --git a/a b/a
@@ -612,7 +611,6 @@ $4 - test description
- parent to branch: --rev . --rev 2
M a
- b
A x/y
R b
@@ -908,7 +906,6 @@ $4 - test description
- parent to root: --rev . --rev 0
M a
- b
R b
R c
@@ -978,7 +975,6 @@ $4 - test description
- parent to branch: --rev . --rev 2
M a
- b
A x/y
R b
R c
@@ -1142,7 +1138,7 @@ $4 - test description
updating to branch default
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
created new head
- moving x/x to y/x (glob)
+ moving x/x to y/x
** directory move **
** hg mv x y / add y/x x1 / add y/x x2
- working to parent:
diff --git a/tests/test-nested-repo.t b/tests/test-nested-repo.t
index ddea413..1ac7352 100644
--- a/tests/test-nested-repo.t
+++ b/tests/test-nested-repo.t
@@ -11,16 +11,16 @@ Should print nothing:
Should fail:
$ hg st b/x
- abort: path 'b/x' is inside nested repo 'b' (glob)
+ abort: path 'b/x' is inside nested repo 'b'
[255]
$ hg add b/x
- abort: path 'b/x' is inside nested repo 'b' (glob)
+ abort: path 'b/x' is inside nested repo 'b'
[255]
Should fail:
$ hg add b b/x
- abort: path 'b/x' is inside nested repo 'b' (glob)
+ abort: path 'b/x' is inside nested repo 'b'
[255]
$ hg st
@@ -34,8 +34,7 @@ Should arguably print nothing:
Should fail:
$ hg mv a b
- abort: path 'b/a' is inside nested repo 'b' (glob)
+ abort: path 'b/a' is inside nested repo 'b'
[255]
$ hg st
- $ cd ..
diff --git a/tests/test-newbranch.t b/tests/test-newbranch.t
index f1099b8..89ecadf 100644
--- a/tests/test-newbranch.t
+++ b/tests/test-newbranch.t
@@ -9,13 +9,11 @@
$ hg ci -m "initial"
$ hg branch foo
marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
$ hg branch
foo
$ hg ci -m "add branch name"
$ hg branch bar
marked working directory as branch bar
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m "change branch name"
Branch shadowing:
@@ -27,7 +25,6 @@ Branch shadowing:
$ hg branch -f default
marked working directory as branch default
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m "clear branch name"
created new head
@@ -130,7 +127,6 @@ Test for invalid branch cache:
changeset: 4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6
branch: foo
tag: tip
- phase: draft
parent: 1:6c0e42da283a56b5edc5b4fadb491365ec7f5fa8
parent: -1:0000000000000000000000000000000000000000
manifest: 1:8c342a37dfba0b3d3ce073562a00d8a813c54ffe
@@ -190,7 +186,6 @@ Update with no arguments: tipmost revision of the current branch:
$ hg branch foobar
marked working directory as branch foobar
- (branches are permanent and global, did you want a bookmark?)
$ hg up
abort: branch foobar not found
@@ -200,7 +195,6 @@ Fastforward merge:
$ hg branch ff
marked working directory as branch ff
- (branches are permanent and global, did you want a bookmark?)
$ echo ff > ff
$ hg ci -Am'fast forward'
@@ -262,7 +256,6 @@ Test merging, add 3 default heads and one test head:
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch test
marked working directory as branch test
- (branches are permanent and global, did you want a bookmark?)
$ echo e >> e
$ hg ci -Ame
adding e
@@ -327,4 +320,3 @@ Implicit merge with default branch as parent:
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
- $ cd ..
diff --git a/tests/test-newcgi.t b/tests/test-newcgi.t
index fb4f541..8795e78 100644
--- a/tests/test-newcgi.t
+++ b/tests/test-newcgi.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
-
This tests if CGI files from after d0db3462d568 but
before d74fc8dec2b4 still work.
diff --git a/tests/test-newercgi.t b/tests/test-newercgi.t
index b6771fc..ca40d74 100644
--- a/tests/test-newercgi.t
+++ b/tests/test-newercgi.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
-
This is a rudimentary test of the CGI files as of d74fc8dec2b4.
$ hg init test
diff --git a/tests/test-notify-changegroup.t b/tests/test-notify-changegroup.t
index d317adb..c872d02 100644
--- a/tests/test-notify-changegroup.t
+++ b/tests/test-notify-changegroup.t
@@ -56,11 +56,11 @@ push
Message-Id: <*> (glob)
To: baz, foo@bar
- changeset cb9a9f314b8b in $TESTTMP/a (glob)
+ changeset cb9a9f314b8b in $TESTTMP/a
details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
summary: a
- changeset ba677d0156c1 in $TESTTMP/a (glob)
+ changeset ba677d0156c1 in $TESTTMP/a
details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
summary: b
@@ -72,143 +72,4 @@ push
@@ -0,0 +1,2 @@
+a
+a
- $ hg --cwd a rollback
- repository tip rolled back to revision -1 (undo push)
-
-unbundle with unrelated source
-
- $ hg --cwd b bundle ../test.hg ../a
- searching for changes
- 2 changesets found
- $ hg --cwd a unbundle ../test.hg
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 1 files
- (run 'hg update' to get a working copy)
- $ hg --cwd a rollback
- repository tip rolled back to revision -1 (undo unbundle)
-
-unbundle with correct source
-
- $ hg --config notify.sources=unbundle --cwd a unbundle ../test.hg 2>&1 |
- > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 1 files
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Date: * (glob)
- Subject: * (glob)
- From: test
- X-Hg-Notification: changeset cb9a9f314b8b
- Message-Id: <*> (glob)
- To: baz, foo@bar
-
- changeset cb9a9f314b8b in $TESTTMP/a (glob)
- details: $TESTTMP/a?cmd=changeset;node=cb9a9f314b8b
- summary: a
-
- changeset ba677d0156c1 in $TESTTMP/a (glob)
- details: $TESTTMP/a?cmd=changeset;node=ba677d0156c1
- summary: b
-
- diffs (6 lines):
-
- diff -r 000000000000 -r ba677d0156c1 a
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/a Thu Jan 01 00:00:00 1970 +0000
- @@ -0,0 +1,2 @@
- +a
- +a
- (run 'hg update' to get a working copy)
-
-Check that using the first committer as the author of a changeset works:
-Check that the config option works.
-Check that the first committer is indeed used for "From:".
-Check that the merge user is NOT used for "From:"
-
-Create new file
-
- $ echo a > b/b
- $ echo b >> b/b
- $ echo c >> b/b
- $ hg --traceback --cwd b commit -Amnewfile -u committer_1
- adding b
-
-commit as one user
-
- $ echo x > b/b
- $ echo b >> b/b
- $ echo c >> b/b
- $ hg --traceback --cwd b commit -Amx -u committer_2
-
-commit as other user, change file so we can do an (automatic) merge
-
- $ hg --cwd b up 2
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo a > b/b
- $ echo b >> b/b
- $ echo y >> b/b
- $ hg --traceback --cwd b commit -Amy -u committer_3
- created new head
-
-merge as a different user
-
- $ hg --cwd b merge --config notify.fromauthor=True
- merging b
- 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
-
- $ hg --traceback --cwd b commit -Am "merged"
-
-push
-
- $ hg --traceback --cwd b --config notify.fromauthor=True push ../a 2>&1 |
- > python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
- pushing to ../a
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 4 changes to 1 files
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Date: * (glob)
- Subject: * (glob)
- From: committer_1
- X-Hg-Notification: changeset 84e487dddc58
- Message-Id: <*> (glob)
- To: baz, foo@bar
-
- changeset 84e487dddc58 in $TESTTMP/a (glob)
- details: $TESTTMP/a?cmd=changeset;node=84e487dddc58
- summary: newfile
-
- changeset b29c7a2b6b0c in $TESTTMP/a (glob)
- details: $TESTTMP/a?cmd=changeset;node=b29c7a2b6b0c
- summary: x
-
- changeset 0957c7d64886 in $TESTTMP/a (glob)
- details: $TESTTMP/a?cmd=changeset;node=0957c7d64886
- summary: y
-
- changeset 485b4e6b0249 in $TESTTMP/a (glob)
- details: $TESTTMP/a?cmd=changeset;node=485b4e6b0249
- summary: merged
-
- diffs (7 lines):
-
- diff -r ba677d0156c1 -r 485b4e6b0249 b
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/b Thu Jan 01 00:00:00 1970 +0000
- @@ -0,0 +1,3 @@
- +x
- +b
- +y
- $ hg --cwd a rollback
- repository tip rolled back to revision 1 (undo push)
diff --git a/tests/test-notify.t b/tests/test-notify.t
index 543ceba..06554ce 100644
--- a/tests/test-notify.t
+++ b/tests/test-notify.t
@@ -17,125 +17,67 @@
> * = baz
> EOF
$ hg help notify
- notify extension - hooks for sending email push notifications
+ notify extension - hooks for sending email notifications at commit/push time
- This extension implements hooks to send email notifications when changesets
- are sent from or received by the local repository.
+ Subscriptions can be managed through a hgrc file. Default mode is to print
+ messages to stdout, for testing and configuring.
- First, enable the extension as explained in "hg help extensions", and register
- the hook you want to run. "incoming" and "changegroup" hooks are run when
- changesets are received, while "outgoing" hooks are for changesets sent to
- another repository:
+ To use, configure the notify extension and enable it in hgrc like this:
+
+ [extensions]
+ notify =
[hooks]
# one email for each incoming changeset
incoming.notify = python:hgext.notify.hook
- # one email for all incoming changesets
+ # batch emails when many changesets incoming at one time
changegroup.notify = python:hgext.notify.hook
-
- # one email for all outgoing changesets
+ # batch emails when many changesets outgoing at one time (client side)
outgoing.notify = python:hgext.notify.hook
- This registers the hooks. To enable notification, subscribers must be assigned
- to repositories. The "[usersubs]" section maps multiple repositories to a
- given recipient. The "[reposubs]" section maps multiple recipients to a single
- repository:
+ [notify]
+ # config items go here
+
+ Required configuration items:
+
+ config = /path/to/file # file containing subscriptions
+
+ Optional configuration items:
+
+ test = True # print messages to stdout for testing
+ strip = 3 # number of slashes to strip for url paths
+ domain = example.com # domain to use if committer missing domain
+ style = ... # style file to use when formatting email
+ template = ... # template to use when formatting email
+ incoming = ... # template to use when run as incoming hook
+ outgoing = ... # template to use when run as outgoing hook
+ changegroup = ... # template to use when run as changegroup hook
+ maxdiff = 300 # max lines of diffs to include (0=none, -1=all)
+ maxsubject = 67 # truncate subject line longer than this
+ diffstat = True # add a diffstat before the diff content
+ sources = serve # notify if source of incoming changes in this list
+ # (serve == ssh or http, push, pull, bundle)
+ merge = False # send notification for merges (default True)
+ [email]
+ from = user@host.com # email address to send as if none given
+ [web]
+ baseurl = http://hgserver/... # root of hg web site for browsing commits
+
+ The notify config file has same format as a regular hgrc file. It has two
+ sections so you can express subscriptions in whatever way is handier for you.
[usersubs]
- # key is subscriber email, value is a comma-separated list of repo glob
- # patterns
+ # key is subscriber email, value is ","-separated list of glob patterns
user@host = pattern
[reposubs]
- # key is glob pattern, value is a comma-separated list of subscriber
- # emails
+ # key is glob pattern, value is ","-separated list of subscriber emails
pattern = user@host
- Glob patterns are matched against absolute path to repository root.
-
- In order to place them under direct user management, "[usersubs]" and
- "[reposubs]" sections may be placed in a separate "hgrc" file and incorporated
- by reference:
-
- [notify]
- config = /path/to/subscriptionsfile
-
- Notifications will not be sent until the "notify.test" value is set to
- "False"; see below.
-
- Notifications content can be tweaked with the following configuration entries:
-
- notify.test
- If "True", print messages to stdout instead of sending them. Default: True.
-
- notify.sources
- Space-separated list of change sources. Notifications are activated only
- when a changeset's source is in this list. Sources may be:
-
- "serve" changesets received via http or ssh
- "pull" changesets received via "hg pull"
- "unbundle" changesets received via "hg unbundle"
- "push" changesets sent or received via "hg push"
- "bundle" changesets sent via "hg unbundle"
-
- Default: serve.
-
- notify.strip
- Number of leading slashes to strip from url paths. By default, notifications
- reference repositories with their absolute path. "notify.strip" lets you
- turn them into relative paths. For example, "notify.strip=3" will change
- "/long/path/repository" into "repository". Default: 0.
-
- notify.domain
- Default email domain for sender or recipients with no explicit domain.
-
- notify.style
- Style file to use when formatting emails.
+ Glob patterns are matched against path to repository root.
- notify.template
- Template to use when formatting emails.
-
- notify.incoming
- Template to use when run as an incoming hook, overriding "notify.template".
-
- notify.outgoing
- Template to use when run as an outgoing hook, overriding "notify.template".
-
- notify.changegroup
- Template to use when running as a changegroup hook, overriding
- "notify.template".
-
- notify.maxdiff
- Maximum number of diff lines to include in notification email. Set to 0 to
- disable the diff, or -1 to include all of it. Default: 300.
-
- notify.maxsubject
- Maximum number of characters in email's subject line. Default: 67.
-
- notify.diffstat
- Set to True to include a diffstat before diff content. Default: True.
-
- notify.merge
- If True, send notifications for merge changesets. Default: True.
-
- notify.mbox
- If set, append mails to this mbox file instead of sending. Default: None.
-
- notify.fromauthor
- If set, use the committer of the first changeset in a changegroup for the
- "From" field of the notification mail. If not set, take the user from the
- pushing repo. Default: False.
-
- If set, the following entries will also be used to customize the
- notifications:
-
- email.from
- Email "From" address to use if none can be found in the generated email
- content.
-
- web.baseurl
- Root repository URL to combine with repository paths when making references.
- See also "notify.strip".
+ If you like, you can put notify config file in repository that users can push
+ changes to, they can manage their own subscriptions.
no commands defined
$ hg init a
@@ -187,7 +129,7 @@ pull (minimal config)
Message-Id: <*> (glob)
To: baz, foo@bar
- changeset 0647d048b600 in $TESTTMP/b (glob)
+ changeset 0647d048b600 in $TESTTMP/b
details: $TESTTMP/b?cmd=changeset;node=0647d048b600
description: b
@@ -214,6 +156,7 @@ fail for config file is missing
$ hg --cwd b rollback
repository tip rolled back to revision 0 (undo pull)
+ working directory now based on revision 0
$ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed
pull failed
$ touch ".notify.conf"
@@ -222,6 +165,7 @@ pull
$ hg --cwd b rollback
repository tip rolled back to revision 0 (undo pull)
+ working directory now based on revision 0
$ hg --traceback --cwd b pull ../a | \
> python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
pulling from ../a
@@ -266,6 +210,7 @@ pull
$ hg --cwd b rollback
repository tip rolled back to revision 0 (undo pull)
+ working directory now based on revision 0
$ hg --traceback --cwd b pull ../a | \
> python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
pulling from ../a
@@ -364,7 +309,7 @@ test merge
description: merge
(run 'hg update' to get a working copy)
-non-ascii content and truncation of multi-byte subject
+truncate multi-byte subject
$ cat <<EOF >> $HGRCPATH
> [notify]
@@ -409,67 +354,3 @@ non-ascii content and truncation of multi-byte subject
a
+a
(run 'hg update' to get a working copy)
-
-long lines
-
- $ cat <<EOF >> $HGRCPATH
- > [notify]
- > maxsubject = 67
- > test = False
- > mbox = mbox
- > EOF
- $ python -c 'file("a/a", "ab").write("no" * 500 + "\n")'
- $ hg --cwd a commit -A -m "long line"
- $ hg --traceback --cwd b pull ../a
- pulling from ../a
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- notify: sending 2 subscribers 1 changes
- (run 'hg update' to get a working copy)
- $ python -c 'import sys,re; print re.sub("\n\t", " ", file("b/mbox").read()),'
- From test@test.com ... ... .. ..:..:.. .... (re)
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: quoted-printable
- X-Test: foo
- Date: * (glob)
- Subject: long line
- From: test@test.com
- X-Hg-Notification: changeset e0be44cf638b
- Message-Id: <hg.e0be44cf638b.*.*@*> (glob)
- To: baz@test.com, foo@bar
-
- changeset e0be44cf638b in b
- description: long line
- diffstat:
-
- a | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
-
- diffs (8 lines):
-
- diff -r 7ea05ad269dc -r e0be44cf638b a
- --- a/a Thu Jan 01 00:00:00 1970 +0000
- +++ b/a Thu Jan 01 00:00:00 1970 +0000
- @@ -1,3 +1,4 @@
- a
- a
- a
- +nonononononononononononononononononononononononononononononononononononono=
- nononononononononononononononononononononononononononononononononononononon=
- ononononononononononononononononononononononononononononononononononononono=
- nononononononononononononononononononononononononononononononononononononon=
- ononononononononononononononononononononononononononononononononononononono=
- nononononononononononononononononononononononononononononononononononononon=
- ononononononononononononononononononononononononononononononononononononono=
- nononononononononononononononononononononononononononononononononononononon=
- ononononononononononononononononononononononononononononononononononononono=
- nononononononononononononononononononononononononononononononononononononon=
- ononononononononononononononononononononononononononononononononononononono=
- nononononononononononononononononononononononononononononononononononononon=
- ononononononononononononononononononononononononononononononononononononono=
- nonononononononononononono
-
diff --git a/tests/test-obsolete-changeset-exchange.t b/tests/test-obsolete-changeset-exchange.t
deleted file mode 100644
index 861556e..0000000
--- a/tests/test-obsolete-changeset-exchange.t
+++ /dev/null
@@ -1,55 +0,0 @@
-Test changesets filtering during exchanges (some tests are still in
-test-obsolete.t)
-
- $ cat > obs.py << EOF
- > import mercurial.obsolete
- > mercurial.obsolete._enabled = True
- > EOF
- $ echo '[extensions]' >> $HGRCPATH
- $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
-
-Push does not corrupt remote
-----------------------------
-
-Create a DAG where a changeset reuses a revision from a file first used in an
-extinct changeset.
-
- $ hg init local
- $ cd local
- $ echo 'base' > base
- $ hg commit -Am base
- adding base
- $ echo 'A' > A
- $ hg commit -Am A
- adding A
- $ hg up 0
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg revert -ar 1
- adding A
- $ hg commit -Am "A'"
- created new head
- $ hg log -G --template='{desc} {node}'
- @ A' f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
- |
- | o A 9d73aac1b2ed7d53835eaeec212ed41ea47da53a
- |/
- o base d20a80d4def38df63a4b330b7fb688f3d4cae1e3
-
- $ hg debugobsolete 9d73aac1b2ed7d53835eaeec212ed41ea47da53a f89bcc95eba5174b1ccc3e33a82e84c96e8338ee
-
-Push it. The bundle should not refer to the extinct changeset.
-
- $ hg init ../other
- $ hg push ../other
- pushing to ../other
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- $ hg -R ../other verify
- checking changesets
- checking manifests
- crosschecking files in changesets and manifests
- checking files
- 2 files, 2 changesets, 2 total revisions
diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t
deleted file mode 100644
index 40abaca..0000000
--- a/tests/test-obsolete.t
+++ /dev/null
@@ -1,508 +0,0 @@
- $ cat >> $HGRCPATH << EOF
- > [extensions]
- > graphlog=
- > [phases]
- > # public changeset are not obsolete
- > publish=false
- > EOF
- $ mkcommit() {
- > echo "$1" > "$1"
- > hg add "$1"
- > hg ci -m "add $1"
- > }
- $ getid() {
- > hg id --debug -ir "desc('$1')"
- > }
-
- $ cat > debugkeys.py <<EOF
- > def reposetup(ui, repo):
- > class debugkeysrepo(repo.__class__):
- > def listkeys(self, namespace):
- > ui.write('listkeys %s\n' % (namespace,))
- > return super(debugkeysrepo, self).listkeys(namespace)
- >
- > if repo.local():
- > repo.__class__ = debugkeysrepo
- > EOF
-
- $ hg init tmpa
- $ cd tmpa
- $ mkcommit kill_me
-
-Checking that the feature is properly disabled
-
- $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
- abort: obsolete feature is not enabled on this repo
- [255]
-
-Enabling it
-
- $ cat > ../obs.py << EOF
- > import mercurial.obsolete
- > mercurial.obsolete._enabled = True
- > EOF
- $ echo '[extensions]' >> $HGRCPATH
- $ echo "obs=${TESTTMP}/obs.py" >> $HGRCPATH
-
-Killing a single changeset without replacement
-
- $ hg debugobsolete 0
- abort: changeset references must be full hexadecimal node identifiers
- [255]
- $ hg debugobsolete '00'
- abort: changeset references must be full hexadecimal node identifiers
- [255]
- $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
- $ hg debugobsolete
- 97b7c2d76b1845ed3eb988cd612611e72406cef0 0 {'date': '0 0', 'user': 'babar'}
- $ cd ..
-
-Killing a single changeset with replacement
-
- $ hg init tmpb
- $ cd tmpb
- $ mkcommit a
- $ mkcommit b
- $ mkcommit original_c
- $ hg up "desc('b')"
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ mkcommit new_c
- created new head
- $ hg debugobsolete `getid original_c` `getid new_c` -d '56 12'
- $ hg debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
-
-do it again (it read the obsstore before adding new changeset)
-
- $ hg up '.^'
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ mkcommit new_2_c
- created new head
- $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`
- $ hg debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
-
-Register two markers with a missing node
-
- $ hg up '.^'
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ mkcommit new_3_c
- created new head
- $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
- $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`
- $ hg debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
-
-Check that graphlog detect that a changeset is obsolete:
-
- $ hg glog
- @ changeset: 5:5601fb93a350
- | tag: tip
- | parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_3_c
- |
- o changeset: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add b
- |
- o changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
-
-Check that public changeset are not accounted as obsolete:
-
- $ hg phase --public 2
- $ hg --config 'extensions.graphlog=' glog
- @ changeset: 5:5601fb93a350
- | tag: tip
- | parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_3_c
- |
- | o changeset: 2:245bde4270cd
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_c
- |
- o changeset: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add b
- |
- o changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
-
- $ cd ..
-
-Exchange Test
-============================
-
-Destination repo does not have any data
----------------------------------------
-
-Try to pull markers
-(extinct changeset are excluded but marker are pushed)
-
- $ hg init tmpc
- $ cd tmpc
- $ hg pull ../tmpb
- pulling from ../tmpb
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 4 changes to 4 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hg debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
-
-Rollback//Transaction support
-
- $ hg debugobsolete -d '1340 0' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
- $ hg debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 {'date': '1340 0', 'user': 'test'}
- $ hg rollback -n
- repository tip rolled back to revision 3 (undo debugobsolete)
- $ hg rollback
- repository tip rolled back to revision 3 (undo debugobsolete)
- $ hg debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
-
- $ cd ..
-
-Try to pull markers
-
- $ hg init tmpd
- $ hg -R tmpb push tmpd
- pushing to tmpd
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 4 changes to 4 files (+1 heads)
- $ hg -R tmpd debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
-
-Check obsolete keys are exchanged only if source has an obsolete store
-
- $ hg init empty
- $ hg --config extensions.debugkeys=debugkeys.py -R empty push tmpd
- pushing to tmpd
- no changes found
- listkeys phases
- listkeys bookmarks
- [1]
-
-clone support
-(markers are copied and extinct changesets are included to allow hardlinks)
-
- $ hg clone tmpb clone-dest
- updating to branch default
- 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg -R clone-dest log -G --hidden
- @ changeset: 5:5601fb93a350
- | tag: tip
- | parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_3_c
- |
- | x changeset: 4:ca819180edb9
- |/ parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_2_c
- |
- | x changeset: 3:cdbce2fbb163
- |/ parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_c
- |
- | o changeset: 2:245bde4270cd
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_c
- |
- o changeset: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add b
- |
- o changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
- $ hg -R clone-dest debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
-
-
-Destination repo have existing data
----------------------------------------
-
-On pull
-
- $ hg init tmpe
- $ cd tmpe
- $ hg debugobsolete -d '1339 0' 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339
- $ hg pull ../tmpb
- pulling from ../tmpb
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 4 changes to 4 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hg debugobsolete
- 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
-
-
-On push
-
- $ hg push ../tmpc
- pushing to ../tmpc
- searching for changes
- no changes found
- [1]
- $ hg -R ../tmpc debugobsolete
- 245bde4270cd1072a27757984f9cda8ba26f08ca cdbce2fbb16313928851e97e0d85413f3f7eb77f 0 {'date': '56 12', 'user': 'test'}
- cdbce2fbb16313928851e97e0d85413f3f7eb77f ca819180edb99ed25ceafb3e9584ac287e240b00 0 {'date': '1337 0', 'user': 'test'}
- ca819180edb99ed25ceafb3e9584ac287e240b00 1337133713371337133713371337133713371337 0 {'date': '1338 0', 'user': 'test'}
- 1337133713371337133713371337133713371337 5601fb93a350734d935195fee37f4054c529ff39 0 {'date': '1339 0', 'user': 'test'}
- 2448244824482448244824482448244824482448 1339133913391339133913391339133913391339 0 {'date': '1339 0', 'user': 'test'}
-
-detect outgoing obsolete and unstable
----------------------------------------
-
-
- $ hg glog
- o changeset: 3:5601fb93a350
- | tag: tip
- | parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_3_c
- |
- | o changeset: 2:245bde4270cd
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_c
- |
- o changeset: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add b
- |
- o changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
- $ hg up 'desc("new_3_c")'
- 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ mkcommit original_d
- $ mkcommit original_e
- $ hg debugobsolete `getid original_d` -d '0 0'
- $ hg log -r 'obsolete()'
- changeset: 4:7c694bff0650
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add original_d
-
- $ hg glog -r '::unstable()'
- @ changeset: 5:6e572121998e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_e
- |
- x changeset: 4:7c694bff0650
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_d
- |
- o changeset: 3:5601fb93a350
- | parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_3_c
- |
- o changeset: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add b
- |
- o changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
-
-refuse to push obsolete changeset
-
- $ hg push ../tmpc/ -r 'desc("original_d")'
- pushing to ../tmpc/
- searching for changes
- abort: push includes an obsolete changeset: 7c694bff0650!
- [255]
-
-refuse to push unstable changeset
-
- $ hg push ../tmpc/
- pushing to ../tmpc/
- searching for changes
- abort: push includes an unstable changeset: 6e572121998e!
- [255]
-
-Test that extinct changeset are properly detected
-
- $ hg log -r 'extinct()'
-
-Don't try to push extinct changeset
-
- $ hg init ../tmpf
- $ hg out ../tmpf
- comparing with ../tmpf
- searching for changes
- changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
- changeset: 1:7c3bad9141dc
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add b
-
- changeset: 2:245bde4270cd
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add original_c
-
- changeset: 3:5601fb93a350
- parent: 1:7c3bad9141dc
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add new_3_c
-
- changeset: 4:7c694bff0650
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add original_d
-
- changeset: 5:6e572121998e
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add original_e
-
- $ hg push ../tmpf -f # -f because be push unstable too
- pushing to ../tmpf
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 6 changesets with 6 changes to 6 files (+1 heads)
-
-no warning displayed
-
- $ hg push ../tmpf
- pushing to ../tmpf
- searching for changes
- no changes found
- [1]
-
-Do not warn about new head when the new head is a successors of a remote one
-
- $ hg glog
- @ changeset: 5:6e572121998e
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_e
- |
- x changeset: 4:7c694bff0650
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_d
- |
- o changeset: 3:5601fb93a350
- | parent: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add new_3_c
- |
- | o changeset: 2:245bde4270cd
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add original_c
- |
- o changeset: 1:7c3bad9141dc
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: add b
- |
- o changeset: 0:1f0dee641bb7
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
-
- $ hg up -q 'desc(new_3_c)'
- $ mkcommit obsolete_e
- created new head
- $ hg debugobsolete `getid 'original_e'` `getid 'obsolete_e'`
- $ hg push ../tmpf
- pushing to ../tmpf
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
-
-Checking _enable=False warning if obsolete marker exists
-
- $ echo '[extensions]' >> $HGRCPATH
- $ echo "obs=!" >> $HGRCPATH
- $ hg log -r tip
- obsolete feature not enabled but 7 markers found!
- changeset: 6:d6a026544050
- tag: tip
- parent: 3:5601fb93a350
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: add obsolete_e
-
diff --git a/tests/test-oldcgi.t b/tests/test-oldcgi.t
index 2651a9c..d397711 100644
--- a/tests/test-oldcgi.t
+++ b/tests/test-oldcgi.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
-
This tests if CGI files from before d0db3462d568 still work.
$ hg init test
diff --git a/tests/test-parents.t b/tests/test-parents.t
index 36f7c65..db2fc1c 100644
--- a/tests/test-parents.t
+++ b/tests/test-parents.t
@@ -150,5 +150,3 @@ merge working dir with 1 parent, hg parents c
date: Thu Jan 01 00:00:04 1970 +0000
summary: c2
-
- $ cd ..
diff --git a/tests/test-parse-date.t b/tests/test-parse-date.t
index c08b27c..58414ef 100644
--- a/tests/test-parse-date.t
+++ b/tests/test-parse-date.t
@@ -93,29 +93,13 @@ Test 12-hours times
standard: Wed Feb 01 13:00:30 2006 +0000
$ hg debugdate "1:00:30PM" > /dev/null
-Normal range
-
- $ hg log -d -1
-
-Negative range
-
- $ hg log -d "--2"
- abort: -2 must be nonnegative (see 'hg help dates')
- [255]
-
-Whitespace only
-
- $ hg log -d " "
- abort: dates cannot consist entirely of whitespace
- [255]
-
Test date formats with '>' or '<' accompanied by space characters
$ hg log -d '>' --template '{date|date}\n'
abort: invalid day spec, use '>DATE'
[255]
- $ hg log -d '<' --template '{date|date}\n'
- abort: invalid day spec, use '<DATE'
+ $ hg log -d '<' hg log -d '>' --template '{date|date}\n'
+ abort: invalid day spec, use '>DATE'
[255]
$ hg log -d ' >' --template '{date|date}\n'
diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t
index 6807f50..711b70e 100644
--- a/tests/test-parseindex.t
+++ b/tests/test-parseindex.t
@@ -57,5 +57,3 @@ We approximate that by reducing the read buffer to 1 byte.
2 revisions:
7c31755bf9b5
26333235a41c
-
- $ cd ..
diff --git a/tests/test-parseindex2.py b/tests/test-parseindex2.py
index 1098226..c42db80 100644
--- a/tests/test-parseindex2.py
+++ b/tests/test-parseindex2.py
@@ -52,6 +52,7 @@ def py_parseindex(data, inline) :
return index, cache
+
data_inlined = '\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x01\x8c' \
'\x00\x00\x04\x07\x00\x00\x00\x00\x00\x00\x15\x15\xff\xff\xff' \
'\xff\xff\xff\xff\xff\xebG\x97\xb7\x1fB\x04\xcf\x13V\x81\tw\x1b' \
@@ -93,16 +94,13 @@ data_non_inlined = '\x00\x00\x00\x01\x00\x00\x00\x00\x00\x01D\x19' \
'\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' \
'\x00\x00\x00\x00\x00\x00\x00\x00\x00'
-def parse_index2(data, inline):
- index, chunkcache = parsers.parse_index2(data, inline)
- return list(index), chunkcache
-
def runtest() :
+
py_res_1 = py_parseindex(data_inlined, True)
- c_res_1 = parse_index2(data_inlined, True)
+ c_res_1 = parsers.parse_index2(data_inlined, True)
py_res_2 = py_parseindex(data_non_inlined, False)
- c_res_2 = parse_index2(data_non_inlined, False)
+ c_res_2 = parsers.parse_index2(data_non_inlined, False)
if py_res_1 != c_res_1:
print "Parse index result (with inlined data) differs!"
@@ -110,17 +108,6 @@ def runtest() :
if py_res_2 != c_res_2:
print "Parse index result (no inlined data) differs!"
- ix = parsers.parse_index2(data_inlined, True)[0]
- for i, r in enumerate(ix):
- if r[7] == nullid:
- i = -1
- try:
- if ix[r[7]] != i:
- print 'Reverse lookup inconsistent for %r' % r[7].encode('hex')
- except TypeError:
- # pure version doesn't support this
- break
-
print "done"
runtest()
diff --git a/tests/test-patch-offset.t b/tests/test-patch-offset.t
index 02508c5..8745d88 100644
--- a/tests/test-patch-offset.t
+++ b/tests/test-patch-offset.t
@@ -69,11 +69,8 @@ import patch
Hunk #2 succeeded at 87 (offset 34 lines).
Hunk #3 succeeded at 109 (offset 34 lines).
a
- created 189885cecb41
compare imported changes against reference file
$ python ../writepatterns.py aref 34X 10A 1B 1a 9A 1C 10A 1B 10A 1D 10A 1B 1a 9A 1E 10A 1B 1a 9A
$ diff aref a
-
- $ cd ..
diff --git a/tests/test-patch.t b/tests/test-patch.t
index 6528ce0..f7c628b 100644
--- a/tests/test-patch.t
+++ b/tests/test-patch.t
@@ -37,7 +37,7 @@ check custom patch options are honored
$ hg --cwd b import -v ../a.diff
applying ../a.diff
Using custom patch
- applied to working directory
+
Issue2417: hg import with # comments in description
diff --git a/tests/test-patchbomb.t b/tests/test-patchbomb.t
index 3ce7407..ba5ea3f 100644
--- a/tests/test-patchbomb.t
+++ b/tests/test-patchbomb.t
@@ -1,3 +1,11 @@
+ $ fixheaders()
+ > {
+ > sed -e 's/\(Message-Id:.*@\).*/\1/' \
+ > -e 's/\(In-Reply-To:.*@\).*/\1/' \
+ > -e 's/\(References:.*@\).*/\1/' \
+ > -e 's/\(User-Agent:.*\)\/.*/\1/' \
+ > -e 's/===.*/===/'
+ > }
$ echo "[extensions]" >> $HGRCPATH
$ echo "patchbomb=" >> $HGRCPATH
@@ -8,16 +16,16 @@
adding a
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -r tip
- this patch series consists of 1 patches.
+ This patch series consists of 1 patches.
- displaying [PATCH] a ...
+ Displaying [PATCH] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.60@*> (glob)
+ Message-Id: <8580ff50825a50c8f716.60@* (glob)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
@@ -41,7 +49,7 @@
$ hg --config ui.interactive=1 email --confirm -n -f quux -t foo -c bar -r tip<<EOF
> n
> EOF
- this patch series consists of 1 patches.
+ This patch series consists of 1 patches.
Final summary:
@@ -61,18 +69,18 @@
adding b
$ hg email --date '1970-1-1 0:2' -n -f quux -t foo -c bar -s test -r 0:tip
- this patch series consists of 2 patches.
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 2] test ...
+ Displaying [PATCH 0 of 2] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2] test
- Message-Id: <patchbomb.120@*> (glob)
+ Message-Id: <patchbomb\.120@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Thu, 01 Jan 1970 00:02:00 +0000
From: quux
@@ -80,15 +88,15 @@
Cc: bar
- displaying [PATCH 1 of 2] a ...
+ Displaying [PATCH 1 of 2] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 2] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.121@*> (glob)
- In-Reply-To: <patchbomb.120@*> (glob)
- References: <patchbomb.120@*> (glob)
+ Message-Id: <8580ff50825a50c8f716\.121@[^>]*> (re)
+ In-Reply-To: <patchbomb\.120@[^>]*> (re)
+ References: <patchbomb\.120@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Thu, 01 Jan 1970 00:02:01 +0000
From: quux
@@ -108,15 +116,15 @@
@@ -0,0 +1,1 @@
+a
- displaying [PATCH 2 of 2] b ...
+ Displaying [PATCH 2 of 2] b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 2 of 2] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.122@*> (glob)
- In-Reply-To: <patchbomb.120@*> (glob)
- References: <patchbomb.120@*> (glob)
+ Message-Id: <97d72e5f12c7e84f8506\.122@[^>]*> (re)
+ In-Reply-To: <patchbomb\.120@[^>]*> (re)
+ References: <patchbomb\.120@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Thu, 01 Jan 1970 00:02:02 +0000
From: quux
@@ -139,10 +147,12 @@
.hg/last-email.txt
- $ cat > editor.sh << '__EOF__'
+ $ cat > editor << '__EOF__'
+ > #!/bin/sh
> echo "a precious introductory message" > "$1"
> __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg email -n -t foo -s test -r 0:tip > /dev/null
+ $ chmod +x editor
+ $ HGEDITOR="'`pwd`'"/editor hg email -n -t foo -s test -r 0:tip > /dev/null
$ cat .hg/last-email.txt
a precious introductory message
@@ -150,27 +160,27 @@
> --config extensions.progress= --config progress.assume-tty=1 \
> --config progress.delay=0 --config progress.refresh=0 \
> --config progress.width=60 2>&1 | \
- > python "$TESTDIR/filtercr.py"
- this patch series consists of 2 patches.
+ > python $TESTDIR/filtercr.py
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- sending [ ] 0/3
- sending [ ] 0/3
+ writing [ ] 0/3
+ writing [ ] 0/3
- sending [==============> ] 1/3
- sending [==============> ] 1/3
+ writing [==============> ] 1/3
+ writing [==============> ] 1/3
- sending [=============================> ] 2/3
- sending [=============================> ] 2/3
+ writing [=============================> ] 2/3
+ writing [=============================> ] 2/3
\r (esc)
- sending [PATCH 0 of 2] test ...
- sending [PATCH 1 of 2] a ...
- sending [PATCH 2 of 2] b ...
+ Writing [PATCH 0 of 2] test ...
+ Writing [PATCH 1 of 2] a ...
+ Writing [PATCH 2 of 2] b ...
$ cd ..
@@ -190,22 +200,22 @@
test bundle and description:
$ hg email --date '1970-1-1 0:3' -n -f quux -t foo \
- > -c bar -s test -r tip -b --desc description
+ > -c bar -s test -r tip -b --desc description | fixheaders
searching for changes
1 changesets found
- displaying test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying test ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: test
- Message-Id: <patchbomb.180@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.180@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:03:00 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -214,7 +224,7 @@ test bundle and description:
description
- --===* (glob)
+ --===
Content-Type: application/x-mercurial-bundle
MIME-Version: 1.0
Content-Disposition: attachment; filename="bundle.hg"
@@ -227,176 +237,86 @@ test bundle and description:
SlIBpFisgGkyRjX//TMtfcUAEsGu56+YnE1OlTZmzKm8BSu2rvo4rHAYYaadIFFuTy0LYgIkgLVD
sgVa2F19D1tx9+hgbAygLgQwaIqcDdgA4BjQgIiz/AEP72++llgDKhKducqodGE4B0ETqF3JFOFC
Q70eyNw=
- --===*-- (glob)
+ --===
utf-8 patch:
$ python -c 'fp = open("utf", "wb"); fp.write("h\xC3\xB6mma!\n"); fp.close();'
- $ hg commit -A -d '4 0' -m 'utf-8 content'
+ $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: base64'
adding description
adding utf
no mime encoding for email --test:
- $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n
- this patch series consists of 1 patches.
-
-
- displaying [PATCH] utf-8 content ...
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 8bit
- Subject: [PATCH] utf-8 content
- X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
- Message-Id: <909a00e13e9d78b575ae.240@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
- Date: Thu, 01 Jan 1970 00:04:00 +0000
- From: quux
- To: foo
- Cc: bar
-
- # HG changeset patch
- # User test
- # Date 4 0
- # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f
- # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
- utf-8 content
-
- diff -r ff2c9fa2018b -r 909a00e13e9d description
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/description Thu Jan 01 00:00:04 1970 +0000
- @@ -0,0 +1,3 @@
- +a multiline
- +
- +description
- diff -r ff2c9fa2018b -r 909a00e13e9d utf
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/utf Thu Jan 01 00:00:04 1970 +0000
- @@ -0,0 +1,1 @@
- +h\xc3\xb6mma! (esc)
-
+ $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | fixheaders > mailtest
+
+md5sum of 8-bit output:
+ $ $TESTDIR/md5sum.py mailtest
+ e726c29b3008e77994c7572563e57c34 mailtest
+
+ $ rm mailtest
mime encoded mbox (base64):
- $ hg email --date '1970-1-1 0:4' -f 'Q <quux>' -t foo -c bar -r tip -m mbox
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
+ This patch series consists of 1 patches.
- sending [PATCH] utf-8 content ...
+ Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
$ cat mbox
- From quux ... ... .. ..:..:.. .... (re)
+ From quux Thu Jan 01 00:04:01 1970
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
- Subject: [PATCH] utf-8 content
- X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
- Message-Id: <909a00e13e9d78b575ae.240@*> (glob)
+ Subject: [PATCH] charset=utf-8; content-transfer-encoding: base64
+ X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ Message-Id: <c3c9e37db9f4fe4882cd.240@* (glob)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Thu, 01 Jan 1970 00:04:00 +0000
- From: Q <quux>
+ From: quux
To: foo
Cc: bar
- IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgOTA5
- YTAwZTEzZTlkNzhiNTc1YWVlZTIzZGRkYmFkYTQ2ZDVhMTQzZgojIFBhcmVudCAgZmYyYzlmYTIw
- MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5Zgp1dGYtOCBjb250ZW50CgpkaWZmIC1yIGZm
- MmM5ZmEyMDE4YiAtciA5MDlhMDBlMTNlOWQgZGVzY3JpcHRpb24KLS0tIC9kZXYvbnVsbAlUaHUg
- SmFuIDAxIDAwOjAwOjAwIDE5NzAgKzAwMDAKKysrIGIvZGVzY3JpcHRpb24JVGh1IEphbiAwMSAw
- MDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEsMyBAQAorYSBtdWx0aWxpbmUKKworZGVzY3Jp
- cHRpb24KZGlmZiAtciBmZjJjOWZhMjAxOGIgLXIgOTA5YTAwZTEzZTlkIHV0ZgotLS0gL2Rldi9u
- dWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCArMDAwMAorKysgYi91dGYJVGh1IEphbiAwMSAw
- MDowMDowNCAxOTcwICswMDAwCkBAIC0wLDAgKzEsMSBAQAoraMO2bW1hIQo=
-
-
- $ python -c 'print open("mbox").read().split("\n\n")[1].decode("base64")'
- # HG changeset patch
- # User test
- # Date 4 0
- # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f
- # Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
- utf-8 content
+ IyBIRyBjaGFuZ2VzZXQgcGF0Y2gKIyBVc2VyIHRlc3QKIyBEYXRlIDQgMAojIE5vZGUgSUQgYzNj
+ OWUzN2RiOWY0ZmU0ODgyY2RhMzliYWY0MmZlZDZiYWQ4YjE1YQojIFBhcmVudCAgZmYyYzlmYTIw
+ MThiMTVmYTc0YjMzMzYzYmRhOTUyNzMyM2UyYTk5ZgpjaGFyc2V0PXV0Zi04OyBjb250ZW50LXRy
+ YW5zZmVyLWVuY29kaW5nOiBiYXNlNjQKCmRpZmYgLXIgZmYyYzlmYTIwMThiIC1yIGMzYzllMzdk
+ YjlmNCBkZXNjcmlwdGlvbgotLS0gL2Rldi9udWxsCVRodSBKYW4gMDEgMDA6MDA6MDAgMTk3MCAr
+ MDAwMAorKysgYi9kZXNjcmlwdGlvbglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
+ LTAsMCArMSwzIEBACithIG11bHRpbGluZQorCitkZXNjcmlwdGlvbgpkaWZmIC1yIGZmMmM5ZmEy
+ MDE4YiAtciBjM2M5ZTM3ZGI5ZjQgdXRmCi0tLSAvZGV2L251bGwJVGh1IEphbiAwMSAwMDowMDow
+ MCAxOTcwICswMDAwCisrKyBiL3V0ZglUaHUgSmFuIDAxIDAwOjAwOjA0IDE5NzAgKzAwMDAKQEAg
+ LTAsMCArMSwxIEBACitow7ZtbWEhCg==
- diff -r ff2c9fa2018b -r 909a00e13e9d description
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/description Thu Jan 01 00:00:04 1970 +0000
- @@ -0,0 +1,3 @@
- +a multiline
- +
- +description
- diff -r ff2c9fa2018b -r 909a00e13e9d utf
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/utf Thu Jan 01 00:00:04 1970 +0000
- @@ -0,0 +1,1 @@
- +h\xc3\xb6mma! (esc)
$ rm mbox
mime encoded mbox (quoted-printable):
- $ python -c 'fp = open("long", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();'
- $ hg commit -A -d '4 0' -m 'long line'
- adding long
+ $ python -c 'fp = open("qp", "wb"); fp.write("%s\nfoo\n\nbar\n" % ("x" * 1024)); fp.close();'
+ $ hg commit -A -d '4 0' -m 'charset=utf-8; content-transfer-encoding: quoted-printable'
+ adding qp
no mime encoding for email --test:
- $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n
- this patch series consists of 1 patches.
-
-
- displaying [PATCH] long line ...
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: quoted-printable
- Subject: [PATCH] long line
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
- Date: Thu, 01 Jan 1970 00:04:00 +0000
- From: quux
- To: foo
- Cc: bar
-
- # HG changeset patch
- # User test
- # Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
-
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
- @@ -0,0 +1,4 @@
- +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- +foo
- +
- +bar
-
+ $ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -n | \
+ > fixheaders > mailtest
+md5sum of qp output:
+ $ $TESTDIR/md5sum.py mailtest
+ 0402c7d033e04044e423bb04816f9dae mailtest
+ $ rm mailtest
mime encoded mbox (quoted-printable):
$ hg email --date '1970-1-1 0:4' -f quux -t foo -c bar -r tip -m mbox
- this patch series consists of 1 patches.
+ This patch series consists of 1 patches.
- sending [PATCH] long line ...
- $ cat mbox
- From quux ... ... .. ..:..:.. .... (re)
+ Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
+ $ cat mbox | fixheaders
+ From quux Thu Jan 01 00:04:01 1970
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
- Subject: [PATCH] long line
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.240@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Subject: [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable
+ X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ Message-Id: <c655633f8c87700bb38c.240@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:04:00 +0000
From: quux
To: foo
@@ -405,13 +325,13 @@ mime encoded mbox (quoted-printable):
# HG changeset patch
# User test
# Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
+ # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ charset=3Dutf-8; content-transfer-encoding: quoted-printable
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
+ diff -r c3c9e37db9f4 -r c655633f8c87 qp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
+ +++ b/qp Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,4 @@
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
@@ -437,47 +357,25 @@ mime encoded mbox (quoted-printable):
iso-8859-1 patch:
$ python -c 'fp = open("isolatin", "wb"); fp.write("h\xF6mma!\n"); fp.close();'
- $ hg commit -A -d '5 0' -m 'isolatin 8-bit encoding'
+ $ hg commit -A -d '5 0' -m 'charset=us-ascii; content-transfer-encoding: 8bit'
adding isolatin
fake ascii mbox:
$ hg email --date '1970-1-1 0:5' -f quux -t foo -c bar -r tip -m mbox
- this patch series consists of 1 patches.
-
-
- sending [PATCH] isolatin 8-bit encoding ...
- $ cat mbox
- From quux ... ... .. ..:..:.. .... (re)
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 8bit
- Subject: [PATCH] isolatin 8-bit encoding
- X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
- Message-Id: <240fb913fc1b7ff15ddb.300@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
- Date: Thu, 01 Jan 1970 00:05:00 +0000
- From: quux
- To: foo
- Cc: bar
-
- # HG changeset patch
- # User test
- # Date 5 0
- # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
- # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- isolatin 8-bit encoding
-
- diff -r a2ea8fc83dd8 -r 240fb913fc1b isolatin
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
- @@ -0,0 +1,1 @@
- +h\xf6mma! (esc)
+ This patch series consists of 1 patches.
+ Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
+ $ fixheaders < mbox > mboxfix
+
+md5sum of 8-bit output:
+ $ $TESTDIR/md5sum.py mboxfix
+ 9ea043d8fc43a71045114508baed144b mboxfix
test diffstat for single patch:
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y -r 2 | \
+ > fixheaders
+ This patch series consists of 1 patches.
Final summary:
@@ -491,14 +389,14 @@ test diffstat for single patch:
are you sure you want to send (yn)? y
- displaying [PATCH] test ...
+ Displaying [PATCH] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -524,8 +422,8 @@ test diffstat for single patch:
test diffstat for multiple patches:
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -d -y \
- > -r 0:1
- this patch series consists of 2 patches.
+ > -r 0:1 | fixheaders
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
@@ -549,13 +447,13 @@ test diffstat for multiple patches:
are you sure you want to send (yn)? y
- displaying [PATCH 0 of 2] test ...
+ Displaying [PATCH 0 of 2] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -566,16 +464,16 @@ test diffstat for multiple patches:
b | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
- displaying [PATCH 1 of 2] a ...
+ Displaying [PATCH 1 of 2] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 2] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -598,16 +496,16 @@ test diffstat for multiple patches:
@@ -0,0 +1,1 @@
+a
- displaying [PATCH 2 of 2] b ...
+ Displaying [PATCH 2 of 2] b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 2 of 2] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
@@ -632,23 +530,24 @@ test diffstat for multiple patches:
test inline for single patch:
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
+ > fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH] test ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -667,27 +566,28 @@ test inline for single patch:
@@ -0,0 +1,1 @@
+c
- --===*-- (glob)
+ --===
test inline for single patch (quoted-printable):
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 4 | \
+ > fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH] test ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH] test
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ Message-Id: <c655633f8c87700bb38c.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
@@ -696,13 +596,13 @@ test inline for single patch (quoted-printable):
# HG changeset patch
# User test
# Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
+ # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ charset=3Dutf-8; content-transfer-encoding: quoted-printable
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
+ diff -r c3c9e37db9f4 -r c655633f8c87 qp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
+ +++ b/qp Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,4 @@
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
@@ -722,45 +622,45 @@ test inline for single patch (quoted-printable):
+
+bar
- --===*-- (glob)
+ --===
test inline for multiple patches:
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i \
- > -r 0:1 -r 4
- this patch series consists of 3 patches.
+ > -r 0:1 -r 4 | fixheaders
+ This patch series consists of 3 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 3] test ...
+ Displaying [PATCH 0 of 3] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 3] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 3] a ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH 1 of 3] a ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH 1 of 3] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -779,22 +679,22 @@ test inline for multiple patches:
@@ -0,0 +1,1 @@
+a
- --===*-- (glob)
- displaying [PATCH 2 of 3] b ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ --===
+ Displaying [PATCH 2 of 3] b ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH 2 of 3] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -813,22 +713,23 @@ test inline for multiple patches:
@@ -0,0 +1,1 @@
+b
- --===*-- (glob)
- displaying [PATCH 3 of 3] long line ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
- MIME-Version: 1.0
- Subject: [PATCH 3 of 3] long line
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.63@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ --===
+ Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
+ Content-Type: multipart/mixed; boundary="===
+ MIME-Version: 1.0
+ Subject: [PATCH 3 of 3] charset=utf-8;
+ content-transfer-encoding: quoted-printable
+ X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ Message-Id: <c655633f8c87700bb38c.63@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:03 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
@@ -837,13 +738,13 @@ test inline for multiple patches:
# HG changeset patch
# User test
# Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
+ # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ charset=3Dutf-8; content-transfer-encoding: quoted-printable
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
+ diff -r c3c9e37db9f4 -r c655633f8c87 qp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
+ +++ b/qp Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,4 @@
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
@@ -863,26 +764,27 @@ test inline for multiple patches:
+
+bar
- --===*-- (glob)
+ --===
test attach for single patch:
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 2 | \
+ > fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH] test ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -891,7 +793,7 @@ test attach for single patch:
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -910,26 +812,27 @@ test attach for single patch:
@@ -0,0 +1,1 @@
+c
- --===*-- (glob)
+ --===
test attach for single patch (quoted-printable):
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a -r 4 | \
+ > fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH] test ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH] test
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ Message-Id: <c655633f8c87700bb38c.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -938,7 +841,7 @@ test attach for single patch (quoted-printable):
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
@@ -947,13 +850,13 @@ test attach for single patch (quoted-printable):
# HG changeset patch
# User test
# Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
+ # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ charset=3Dutf-8; content-transfer-encoding: quoted-printable
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
+ diff -r c3c9e37db9f4 -r c655633f8c87 qp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
+ +++ b/qp Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,4 @@
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
@@ -973,101 +876,45 @@ test attach for single patch (quoted-printable):
+
+bar
- --===*-- (glob)
-
-test attach and body for single patch:
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a --body -r 2
- this patch series consists of 1 patches.
-
-
- displaying [PATCH] test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
- MIME-Version: 1.0
- Subject: [PATCH] test
- X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
- Date: Thu, 01 Jan 1970 00:01:00 +0000
- From: quux
- To: foo
- Cc: bar
-
- --===* (glob)
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
-
- # HG changeset patch
- # User test
- # Date 3 0
- # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
- # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- c
-
- diff -r 97d72e5f12c7 -r ff2c9fa2018b c
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/c Thu Jan 01 00:00:03 1970 +0000
- @@ -0,0 +1,1 @@
- +c
-
- --===* (glob)
- Content-Type: text/x-patch; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Content-Disposition: attachment; filename=t2.patch
-
- # HG changeset patch
- # User test
- # Date 3 0
- # Node ID ff2c9fa2018b15fa74b33363bda9527323e2a99f
- # Parent 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- c
-
- diff -r 97d72e5f12c7 -r ff2c9fa2018b c
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/c Thu Jan 01 00:00:03 1970 +0000
- @@ -0,0 +1,1 @@
- +c
-
- --===*-- (glob)
+ --===
test attach for multiple patches:
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -a \
- > -r 0:1 -r 4
- this patch series consists of 3 patches.
+ > -r 0:1 -r 4 | fixheaders
+ This patch series consists of 3 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 3] test ...
+ Displaying [PATCH 0 of 3] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 3] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 3] a ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH 1 of 3] a ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH 1 of 3] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1076,7 +923,7 @@ test attach for multiple patches:
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1095,22 +942,22 @@ test attach for multiple patches:
@@ -0,0 +1,1 @@
+a
- --===*-- (glob)
- displaying [PATCH 2 of 3] b ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ --===
+ Displaying [PATCH 2 of 3] b ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH 2 of 3] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1119,7 +966,7 @@ test attach for multiple patches:
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1138,22 +985,23 @@ test attach for multiple patches:
@@ -0,0 +1,1 @@
+b
- --===*-- (glob)
- displaying [PATCH 3 of 3] long line ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
- MIME-Version: 1.0
- Subject: [PATCH 3 of 3] long line
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.63@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ --===
+ Displaying [PATCH 3 of 3] charset=utf-8; content-transfer-encoding: quoted-printable ...
+ Content-Type: multipart/mixed; boundary="===
+ MIME-Version: 1.0
+ Subject: [PATCH 3 of 3] charset=utf-8;
+ content-transfer-encoding: quoted-printable
+ X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ Message-Id: <c655633f8c87700bb38c.63@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:03 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1162,7 +1010,7 @@ test attach for multiple patches:
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
@@ -1171,13 +1019,13 @@ test attach for multiple patches:
# HG changeset patch
# User test
# Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
+ # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ charset=3Dutf-8; content-transfer-encoding: quoted-printable
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
+ diff -r c3c9e37db9f4 -r c655633f8c87 qp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
+ +++ b/qp Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,4 @@
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
@@ -1197,40 +1045,40 @@ test attach for multiple patches:
+
+bar
- --===*-- (glob)
+ --===
test intro for single patch:
$ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
- > -r 2
- this patch series consists of 1 patches.
+ > -r 2 | fixheaders
+ This patch series consists of 1 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 1] test ...
+ Displaying [PATCH 0 of 1] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 1] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 1] c ...
+ Displaying [PATCH 1 of 1] c ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 1] c
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -1253,17 +1101,17 @@ test intro for single patch:
test --desc without --intro for a single patch:
$ echo foo > intro.text
$ hg email --date '1970-1-1 0:1' -n --desc intro.text -f quux -t foo -c bar \
- > -s test -r 2
- this patch series consists of 1 patches.
+ > -s test -r 2 | fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH 0 of 1] test ...
+ Displaying [PATCH 0 of 1] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 1] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -1271,16 +1119,16 @@ test --desc without --intro for a single patch:
foo
- displaying [PATCH 1 of 1] c ...
+ Displaying [PATCH 1 of 1] c ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 1] c
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -1302,36 +1150,36 @@ test --desc without --intro for a single patch:
test intro for multiple patches:
$ hg email --date '1970-1-1 0:1' -n --intro -f quux -t foo -c bar -s test \
- > -r 0:1
- this patch series consists of 2 patches.
+ > -r 0:1 | fixheaders
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 2] test ...
+ Displaying [PATCH 0 of 2] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 2] a ...
+ Displaying [PATCH 1 of 2] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 2] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -1350,16 +1198,16 @@ test intro for multiple patches:
@@ -0,0 +1,1 @@
+a
- displaying [PATCH 2 of 2] b ...
+ Displaying [PATCH 2 of 2] b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 2 of 2] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
@@ -1381,18 +1229,18 @@ test intro for multiple patches:
test reply-to via config:
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
- > --config patchbomb.reply-to='baz@example.com'
- this patch series consists of 1 patches.
+ > --config patchbomb.reply-to='baz@example.com' | fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
+ Displaying [PATCH] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -1415,18 +1263,18 @@ test reply-to via config:
test reply-to via command line:
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -r 2 \
- > --reply-to baz --reply-to fred
- this patch series consists of 1 patches.
+ > --reply-to baz --reply-to fred | fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
+ Displaying [PATCH] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -1453,23 +1301,24 @@ tagging csets:
$ hg tag -r2 two two.diff
test inline for single named patch:
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2
- this patch series consists of 1 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 2 | \
+ > fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] test ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH] test ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1488,44 +1337,45 @@ test inline for single named patch:
@@ -0,0 +1,1 @@
+c
- --===*-- (glob)
+ --===
test inline for multiple named/unnamed patches:
- $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 0:1
- this patch series consists of 2 patches.
+ $ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar -s test -i -r 0:1 | \
+ > fixheaders
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 2] test ...
+ Displaying [PATCH 0 of 2] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 2] a ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ Displaying [PATCH 1 of 2] a ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH 1 of 2] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1544,22 +1394,22 @@ test inline for multiple named/unnamed patches:
@@ -0,0 +1,1 @@
+a
- --===*-- (glob)
- displaying [PATCH 2 of 2] b ...
- Content-Type: multipart/mixed; boundary="===*" (glob)
+ --===
+ Displaying [PATCH 2 of 2] b ...
+ Content-Type: multipart/mixed; boundary="===
MIME-Version: 1.0
Subject: [PATCH 2 of 2] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
Cc: bar
- --===* (glob)
+ --===
Content-Type: text/x-patch; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
@@ -1578,25 +1428,25 @@ test inline for multiple named/unnamed patches:
@@ -0,0 +1,1 @@
+b
- --===*-- (glob)
+ --===
test inreplyto:
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
- > -r tip
- this patch series consists of 1 patches.
+ > -r tip | fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
+ Displaying [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] Added tag two, two.diff for changeset ff2c9fa2018b
- X-Mercurial-Node: 7aead2484924c445ad8ce2613df91f52f9e502ed
- Message-Id: <7aead2484924c445ad8c.60@*> (glob)
+ X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
+ Message-Id: <e317db6a6f288748d1f6.60@
In-Reply-To: <baz>
References: <baz>
- User-Agent: Mercurial-patchbomb/* (glob)
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -1605,11 +1455,11 @@ test inreplyto:
# HG changeset patch
# User test
# Date 0 0
- # Node ID 7aead2484924c445ad8ce2613df91f52f9e502ed
- # Parent 045ca29b1ea20e4940411e695e20e521f2f0f98e
+ # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
+ # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
Added tag two, two.diff for changeset ff2c9fa2018b
- diff -r 045ca29b1ea2 -r 7aead2484924 .hgtags
+ diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
--- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
@@ -2,3 +2,5 @@
@@ -1619,105 +1469,47 @@ test inreplyto:
+ff2c9fa2018b15fa74b33363bda9527323e2a99f two
+ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
-no intro message in non-interactive mode
+
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
> -r 0:1
- this patch series consists of 2 patches.
-
- (optional) Subject: [PATCH 0 of 2]
-
- displaying [PATCH 1 of 2] a ...
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- Subject: [PATCH 1 of 2] a
- X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.60@*> (glob)
- In-Reply-To: <baz>
- References: <baz>
- User-Agent: Mercurial-patchbomb/* (glob)
- Date: Thu, 01 Jan 1970 00:01:00 +0000
- From: quux
- To: foo
- Cc: bar
-
- # HG changeset patch
- # User test
- # Date 1 0
- # Node ID 8580ff50825a50c8f716709acdf8de0deddcd6ab
- # Parent 0000000000000000000000000000000000000000
- a
-
- diff -r 000000000000 -r 8580ff50825a a
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/a Thu Jan 01 00:00:01 1970 +0000
- @@ -0,0 +1,1 @@
- +a
-
- displaying [PATCH 2 of 2] b ...
- Content-Type: text/plain; charset="us-ascii"
- MIME-Version: 1.0
- Content-Transfer-Encoding: 7bit
- 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)
- User-Agent: Mercurial-patchbomb/* (glob)
- Date: Thu, 01 Jan 1970 00:01:01 +0000
- From: quux
- To: foo
- Cc: bar
-
- # HG changeset patch
- # User test
- # Date 2 0
- # Node ID 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- # Parent 8580ff50825a50c8f716709acdf8de0deddcd6ab
- b
+ This patch series consists of 2 patches.
- diff -r 8580ff50825a -r 97d72e5f12c7 b
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/b Thu Jan 01 00:00:02 1970 +0000
- @@ -0,0 +1,1 @@
- +b
-
-
-
+ abort: Subject: [PATCH 0 of 2] Please enter a valid value
+ [255]
$ hg email --date '1970-1-1 0:1' -n -f quux -t foo -c bar --in-reply-to baz \
- > -s test -r 0:1
- this patch series consists of 2 patches.
+ > -s test -r 0:1 | fixheaders
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 2] test ...
+ Displaying [PATCH 0 of 2] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2] test
- Message-Id: <patchbomb.60@*> (glob)
+ Message-Id: <patchbomb.60@
In-Reply-To: <baz>
References: <baz>
- User-Agent: Mercurial-patchbomb/* (glob)
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 2] a ...
+ Displaying [PATCH 1 of 2] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 2] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -1736,16 +1528,16 @@ no intro message in non-interactive mode
@@ -0,0 +1,1 @@
+a
- displaying [PATCH 2 of 2] b ...
+ Displaying [PATCH 2 of 2] b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 2 of 2] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
@@ -1767,18 +1559,18 @@ no intro message in non-interactive mode
test single flag for single patch:
$ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
- > -r 2
- this patch series consists of 1 patches.
+ > -r 2 | fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH fooFlag] test ...
+ Displaying [PATCH fooFlag] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH fooFlag] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -1800,36 +1592,36 @@ test single flag for single patch:
test single flag for multiple patches:
$ hg email --date '1970-1-1 0:1' -n --flag fooFlag -f quux -t foo -c bar -s test \
- > -r 0:1
- this patch series consists of 2 patches.
+ > -r 0:1 | fixheaders
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 2 fooFlag] test ...
+ Displaying [PATCH 0 of 2 fooFlag] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2 fooFlag] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 2 fooFlag] a ...
+ Displaying [PATCH 1 of 2 fooFlag] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 2 fooFlag] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -1848,16 +1640,16 @@ test single flag for multiple patches:
@@ -0,0 +1,1 @@
+a
- displaying [PATCH 2 of 2 fooFlag] b ...
+ Displaying [PATCH 2 of 2 fooFlag] b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 2 of 2 fooFlag] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
@@ -1879,18 +1671,18 @@ test single flag for multiple patches:
test mutiple flags for single patch:
$ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
- > -c bar -s test -r 2
- this patch series consists of 1 patches.
+ > -c bar -s test -r 2 | fixheaders
+ This patch series consists of 1 patches.
- displaying [PATCH fooFlag barFlag] test ...
+ Displaying [PATCH fooFlag barFlag] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH fooFlag barFlag] test
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
@@ -1912,36 +1704,36 @@ test mutiple flags for single patch:
test multiple flags for multiple patches:
$ hg email --date '1970-1-1 0:1' -n --flag fooFlag --flag barFlag -f quux -t foo \
- > -c bar -s test -r 0:1
- this patch series consists of 2 patches.
+ > -c bar -s test -r 0:1 | fixheaders
+ This patch series consists of 2 patches.
Write the introductory message for the patch series.
- displaying [PATCH 0 of 2 fooFlag barFlag] test ...
+ Displaying [PATCH 0 of 2 fooFlag barFlag] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 0 of 2 fooFlag barFlag] test
- Message-Id: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:00 +0000
From: quux
To: foo
Cc: bar
- displaying [PATCH 1 of 2 fooFlag barFlag] a ...
+ Displaying [PATCH 1 of 2 fooFlag barFlag] a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 1 of 2 fooFlag barFlag] a
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.61@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.61@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:01 +0000
From: quux
To: foo
@@ -1960,16 +1752,16 @@ test multiple flags for multiple patches:
@@ -0,0 +1,1 @@
+a
- displaying [PATCH 2 of 2 fooFlag barFlag] b ...
+ Displaying [PATCH 2 of 2 fooFlag barFlag] b ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH 2 of 2 fooFlag barFlag] b
X-Mercurial-Node: 97d72e5f12c7e84f85064aa72e5a297142c36ed9
- Message-Id: <97d72e5f12c7e84f8506.62@*> (glob)
- In-Reply-To: <patchbomb.60@*> (glob)
- References: <patchbomb.60@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <97d72e5f12c7e84f8506.62@
+ In-Reply-To: <patchbomb.60@
+ References: <patchbomb.60@
+ User-Agent: Mercurial-patchbomb
Date: Thu, 01 Jan 1970 00:01:02 +0000
From: quux
To: foo
@@ -1993,19 +1785,19 @@ test multi-address parsing:
$ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t 'spam<spam><eggs>' \
> -t toast -c 'foo,bar@example.com' -c '"A, B <>" <a@example.com>' -s test -r 0 \
> --config email.bcc='"Quux, A." <quux>'
- this patch series consists of 1 patches.
+ This patch series consists of 1 patches.
- sending [PATCH] test ...
- $ cat < tmp.mbox
- From quux ... ... .. ..:..:.. .... (re)
+ Writing [PATCH] test ...
+ $ fixheaders < tmp.mbox
+ From quux Tue Jan 01 00:01:01 1980
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] test
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.315532860@*> (glob)
- User-Agent: Mercurial-patchbomb/* (glob)
+ Message-Id: <8580ff50825a50c8f716.315532860@
+ User-Agent: Mercurial-patchbomb
Date: Tue, 01 Jan 1980 00:01:00 +0000
From: quux
To: spam <spam>, eggs, toast
@@ -2032,20 +1824,20 @@ test multi-byte domain parsing:
$ HGENCODING=iso-8859-1
$ export HGENCODING
$ hg email --date '1980-1-1 0:1' -m tmp.mbox -f quux -t "bar@${UUML}nicode.com" -s test -r 0
- this patch series consists of 1 patches.
+ This patch series consists of 1 patches.
Cc:
- sending [PATCH] test ...
+ Writing [PATCH] test ...
$ cat tmp.mbox
- From quux ... ... .. ..:..:.. .... (re)
+ From quux Tue Jan 01 00:01:01 1980
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] test
X-Mercurial-Node: 8580ff50825a50c8f716709acdf8de0deddcd6ab
- Message-Id: <8580ff50825a50c8f716.315532860@*> (glob)
+ Message-Id: <8580ff50825a50c8f716.315532860@* (glob)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:00 +0000
From: quux
@@ -2072,68 +1864,42 @@ test outgoing:
$ hg branch test
marked working directory as branch test
- (branches are permanent and global, did you want a bookmark?)
$ echo d > d
$ hg add d
$ hg ci -md -d '4 0'
- $ echo d >> d
- $ hg ci -mdd -d '5 0'
- $ hg --config extensions.graphlog= glog --template "{rev}:{node|short} {desc|firstline}\n"
- @ 10:3b6f1ec9dde9 dd
- |
- o 9:2f9fa9b998c5 d
- |
- | o 8:7aead2484924 Added tag two, two.diff for changeset ff2c9fa2018b
- | |
- | o 7:045ca29b1ea2 Added tag one, one.patch for changeset 97d72e5f12c7
- | |
- | o 6:5d5ef15dfe5e Added tag zero, zero.foo for changeset 8580ff50825a
- | |
- | o 5:240fb913fc1b isolatin 8-bit encoding
- | |
- | o 4:a2ea8fc83dd8 long line
- | |
- | o 3:909a00e13e9d utf-8 content
- | |
- | o 2:ff2c9fa2018b c
- |/
- o 1:97d72e5f12c7 b
- |
- o 0:8580ff50825a a
-
- $ hg phase --force --secret -r 10
- $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t -r 'rev(10) or rev(6)'
+ $ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t
comparing with ../t
+ searching for changes
From [test]: test
- this patch series consists of 6 patches.
+ This patch series consists of 8 patches.
Write the introductory message for the patch series.
Cc:
- displaying [PATCH 0 of 6] test ...
+ Displaying [PATCH 0 of 8] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
- Subject: [PATCH 0 of 6] test
- Message-Id: <patchbomb.315532860@*> (glob)
+ Subject: [PATCH 0 of 8] test
+ Message-Id: <patchbomb.315532860@* (glob)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:00 +0000
From: test
To: foo
- displaying [PATCH 1 of 6] c ...
+ Displaying [PATCH 1 of 8] c ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
- Subject: [PATCH 1 of 6] c
+ Subject: [PATCH 1 of 8] c
X-Mercurial-Node: ff2c9fa2018b15fa74b33363bda9527323e2a99f
- Message-Id: <ff2c9fa2018b15fa74b3.315532861@*> (glob)
- In-Reply-To: <patchbomb.315532860@*> (glob)
- References: <patchbomb.315532860@*> (glob)
+ Message-Id: <ff2c9fa2018b15fa74b3.315532861@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:01 +0000
From: test
@@ -2152,15 +1918,15 @@ test outgoing:
@@ -0,0 +1,1 @@
+c
- displaying [PATCH 2 of 6] utf-8 content ...
+ Displaying [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64 ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
- Subject: [PATCH 2 of 6] utf-8 content
- X-Mercurial-Node: 909a00e13e9d78b575aeee23dddbada46d5a143f
- Message-Id: <909a00e13e9d78b575ae.315532862@*> (glob)
- In-Reply-To: <patchbomb.315532860@*> (glob)
- References: <patchbomb.315532860@*> (glob)
+ Subject: [PATCH 2 of 8] charset=utf-8; content-transfer-encoding: base64
+ X-Mercurial-Node: c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ Message-Id: <c3c9e37db9f4fe4882cd.315532862@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:02 +0000
From: test
@@ -2169,32 +1935,33 @@ test outgoing:
# HG changeset patch
# User test
# Date 4 0
- # Node ID 909a00e13e9d78b575aeee23dddbada46d5a143f
+ # Node ID c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
# Parent ff2c9fa2018b15fa74b33363bda9527323e2a99f
- utf-8 content
+ charset=utf-8; content-transfer-encoding: base64
- diff -r ff2c9fa2018b -r 909a00e13e9d description
+ diff -r ff2c9fa2018b -r c3c9e37db9f4 description
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/description Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,3 @@
+a multiline
+
+description
- diff -r ff2c9fa2018b -r 909a00e13e9d utf
+ diff -r ff2c9fa2018b -r c3c9e37db9f4 utf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/utf Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,1 @@
+h\xc3\xb6mma! (esc)
- displaying [PATCH 3 of 6] long line ...
+ Displaying [PATCH 3 of 8] charset=utf-8; content-transfer-encoding: quoted-printable ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
- Subject: [PATCH 3 of 6] long line
- X-Mercurial-Node: a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- Message-Id: <a2ea8fc83dd8b93cfd86.315532863@*> (glob)
- In-Reply-To: <patchbomb.315532860@*> (glob)
- References: <patchbomb.315532860@*> (glob)
+ Subject: [PATCH 3 of 8] charset=utf-8;
+ content-transfer-encoding: quoted-printable
+ X-Mercurial-Node: c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ Message-Id: <c655633f8c87700bb38c.315532863@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:03 +0000
From: test
@@ -2203,13 +1970,13 @@ test outgoing:
# HG changeset patch
# User test
# Date 4 0
- # Node ID a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- # Parent 909a00e13e9d78b575aeee23dddbada46d5a143f
- long line
+ # Node ID c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ # Parent c3c9e37db9f4fe4882cda39baf42fed6bad8b15a
+ charset=3Dutf-8; content-transfer-encoding: quoted-printable
- diff -r 909a00e13e9d -r a2ea8fc83dd8 long
+ diff -r c3c9e37db9f4 -r c655633f8c87 qp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/long Thu Jan 01 00:00:04 1970 +0000
+ +++ b/qp Thu Jan 01 00:00:04 1970 +0000
@@ -0,0 +1,4 @@
+xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
@@ -2229,15 +1996,15 @@ test outgoing:
+
+bar
- displaying [PATCH 4 of 6] isolatin 8-bit encoding ...
+ Displaying [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
- Subject: [PATCH 4 of 6] isolatin 8-bit encoding
- X-Mercurial-Node: 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
- Message-Id: <240fb913fc1b7ff15ddb.315532864@*> (glob)
- In-Reply-To: <patchbomb.315532860@*> (glob)
- References: <patchbomb.315532860@*> (glob)
+ Subject: [PATCH 4 of 8] charset=us-ascii; content-transfer-encoding: 8bit
+ X-Mercurial-Node: 22d0f96be12f5945fd67d101af58f7bc8263c835
+ Message-Id: <22d0f96be12f5945fd67.315532864@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:04 +0000
From: test
@@ -2246,25 +2013,25 @@ test outgoing:
# HG changeset patch
# User test
# Date 5 0
- # Node ID 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
- # Parent a2ea8fc83dd8b93cfd86ac97b28287204ab806e1
- isolatin 8-bit encoding
+ # Node ID 22d0f96be12f5945fd67d101af58f7bc8263c835
+ # Parent c655633f8c87700bb38cc6a59a2753bdc5a6c376
+ charset=us-ascii; content-transfer-encoding: 8bit
- diff -r a2ea8fc83dd8 -r 240fb913fc1b isolatin
+ diff -r c655633f8c87 -r 22d0f96be12f isolatin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/isolatin Thu Jan 01 00:00:05 1970 +0000
@@ -0,0 +1,1 @@
+h\xf6mma! (esc)
- displaying [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a ...
+ Displaying [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
- Subject: [PATCH 5 of 6] Added tag zero, zero.foo for changeset 8580ff50825a
- X-Mercurial-Node: 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433
- Message-Id: <5d5ef15dfe5e7bd3a4ee.315532865@*> (glob)
- In-Reply-To: <patchbomb.315532860@*> (glob)
- References: <patchbomb.315532860@*> (glob)
+ Subject: [PATCH 5 of 8] Added tag zero, zero.foo for changeset 8580ff50825a
+ X-Mercurial-Node: dd9c2b4b8a8a0934d5523c15f2c119b362360903
+ Message-Id: <dd9c2b4b8a8a0934d552.315532865@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:05 +0000
From: test
@@ -2273,26 +2040,26 @@ test outgoing:
# HG changeset patch
# User test
# Date 0 0
- # Node ID 5d5ef15dfe5e7bd3a4ee154b5fff76c7945ec433
- # Parent 240fb913fc1b7ff15ddb9f33e73d82bf5277c720
+ # Node ID dd9c2b4b8a8a0934d5523c15f2c119b362360903
+ # Parent 22d0f96be12f5945fd67d101af58f7bc8263c835
Added tag zero, zero.foo for changeset 8580ff50825a
- diff -r 240fb913fc1b -r 5d5ef15dfe5e .hgtags
+ diff -r 22d0f96be12f -r dd9c2b4b8a8a .hgtags
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
@@ -0,0 +1,2 @@
+8580ff50825a50c8f716709acdf8de0deddcd6ab zero
+8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
- displaying [PATCH 6 of 6] d ...
+ Displaying [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7 ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
- Subject: [PATCH 6 of 6] d
- X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
- Message-Id: <2f9fa9b998c5fe3ac2bd.315532866@*> (glob)
- In-Reply-To: <patchbomb.315532860@*> (glob)
- References: <patchbomb.315532860@*> (glob)
+ Subject: [PATCH 6 of 8] Added tag one, one.patch for changeset 97d72e5f12c7
+ X-Mercurial-Node: eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
+ Message-Id: <eae5fcf795eee29d0e45.315532866@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:06 +0000
From: test
@@ -2300,6 +2067,67 @@ test outgoing:
# HG changeset patch
# User test
+ # Date 0 0
+ # Node ID eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
+ # Parent dd9c2b4b8a8a0934d5523c15f2c119b362360903
+ Added tag one, one.patch for changeset 97d72e5f12c7
+
+ diff -r dd9c2b4b8a8a -r eae5fcf795ee .hgtags
+ --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
+ +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
+ @@ -1,2 +1,4 @@
+ 8580ff50825a50c8f716709acdf8de0deddcd6ab zero
+ 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
+ +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
+ +97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
+
+ Displaying [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b ...
+ Content-Type: text/plain; charset="us-ascii"
+ MIME-Version: 1.0
+ Content-Transfer-Encoding: 7bit
+ Subject: [PATCH 7 of 8] Added tag two, two.diff for changeset ff2c9fa2018b
+ X-Mercurial-Node: e317db6a6f288748d1f6cb064f3810fcba66b1b6
+ Message-Id: <e317db6a6f288748d1f6.315532867@* (glob)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
+ User-Agent: Mercurial-patchbomb/* (glob)
+ Date: Tue, 01 Jan 1980 00:01:07 +0000
+ From: test
+ To: foo
+
+ # HG changeset patch
+ # User test
+ # Date 0 0
+ # Node ID e317db6a6f288748d1f6cb064f3810fcba66b1b6
+ # Parent eae5fcf795eee29d0e45ffc9f519a91cd79fc9ff
+ Added tag two, two.diff for changeset ff2c9fa2018b
+
+ diff -r eae5fcf795ee -r e317db6a6f28 .hgtags
+ --- a/.hgtags Thu Jan 01 00:00:00 1970 +0000
+ +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
+ @@ -2,3 +2,5 @@
+ 8580ff50825a50c8f716709acdf8de0deddcd6ab zero.foo
+ 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one
+ 97d72e5f12c7e84f85064aa72e5a297142c36ed9 one.patch
+ +ff2c9fa2018b15fa74b33363bda9527323e2a99f two
+ +ff2c9fa2018b15fa74b33363bda9527323e2a99f two.diff
+
+ Displaying [PATCH 8 of 8] d ...
+ Content-Type: text/plain; charset="us-ascii"
+ MIME-Version: 1.0
+ Content-Transfer-Encoding: 7bit
+ Subject: [PATCH 8 of 8] d
+ X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
+ Message-Id: <2f9fa9b998c5fe3ac2bd\.315532868[^>]*> (re)
+ In-Reply-To: <patchbomb\.315532860@[^>]*> (re)
+ References: <patchbomb\.315532860@[^>]*> (re)
+ User-Agent: Mercurial-patchbomb/* (glob)
+ Date: Tue, 01 Jan 1980 00:01:08 +0000
+ From: test
+ To: foo
+
+ # HG changeset patch
+ # User test
# Date 4 0
# Branch test
# Node ID 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
@@ -2316,18 +2144,19 @@ test outgoing:
dest#branch URIs:
$ hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test
comparing with ../t
+ searching for changes
From [test]: test
- this patch series consists of 1 patches.
+ This patch series consists of 1 patches.
Cc:
- displaying [PATCH] test ...
+ Displaying [PATCH] test ...
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [PATCH] test
X-Mercurial-Node: 2f9fa9b998c5fe3ac2bd9a2b14bfcbeecbc7c268
- Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@*> (glob)
+ Message-Id: <2f9fa9b998c5fe3ac2bd.315532860@* (glob)
User-Agent: Mercurial-patchbomb/* (glob)
Date: Tue, 01 Jan 1980 00:01:00 +0000
From: test
@@ -2347,5 +2176,3 @@ dest#branch URIs:
@@ -0,0 +1,1 @@
+d
-
- $ cd ..
diff --git a/tests/test-paths.t b/tests/test-paths.t
index 99a45aa..d97554a 100644
--- a/tests/test-paths.t
+++ b/tests/test-paths.t
@@ -7,35 +7,29 @@
$ echo 'dupe = ../b' >> .hg/hgrc
$ echo 'expand = $SOMETHING/bar' >> .hg/hgrc
$ hg in dupe
- comparing with $TESTTMP/b (glob)
+ comparing with $TESTTMP/b
no changes found
[1]
$ cd ..
$ hg -R a in dupe
- comparing with $TESTTMP/b (glob)
+ comparing with $TESTTMP/b
no changes found
[1]
$ cd a
$ hg paths
- dupe = $TESTTMP/b (glob)
- expand = $TESTTMP/a/$SOMETHING/bar (glob)
+ dupe = $TESTTMP/b
+ expand = $TESTTMP/a/$SOMETHING/bar
$ SOMETHING=foo hg paths
- dupe = $TESTTMP/b (glob)
- expand = $TESTTMP/a/foo/bar (glob)
-#if msys
- $ SOMETHING=//foo hg paths
- dupe = $TESTTMP/b (glob)
- expand = /foo/bar
-#else
+ dupe = $TESTTMP/b
+ expand = $TESTTMP/a/foo/bar
$ SOMETHING=/foo hg paths
- dupe = $TESTTMP/b (glob)
+ dupe = $TESTTMP/b
expand = /foo/bar
-#endif
$ hg paths -q
dupe
expand
$ hg paths dupe
- $TESTTMP/b (glob)
+ $TESTTMP/b
$ hg paths -q dupe
$ hg paths unknown
not found!
@@ -62,4 +56,3 @@
$ hg -q id
000000000000
- $ cd ..
diff --git a/tests/test-pending.t b/tests/test-pending.t
index d449d29..1a1ace7 100644
--- a/tests/test-pending.t
+++ b/tests/test-pending.t
@@ -60,6 +60,7 @@ python hook
external hook
$ cat <<EOF > reject.sh
+ > #! /bin/sh
> printf 'hook '; hg tip --template '{node}\\n'
> # create the notify file so caller knows we're running
> fpath=$d/notify
@@ -72,6 +73,7 @@ external hook
> done
> exit 1 # reject the changesets
> EOF
+ $ chmod +x reject.sh
create repos
@@ -103,7 +105,7 @@ test external hook
$ cat <<EOF > parent/.hg/hgrc
> [hooks]
- > pretxnchangegroup = sh $d/reject.sh
+ > pretxnchangegroup = $d/reject.sh
> EOF
$ dotest
diff --git a/tests/test-permissions.t b/tests/test-permissions.t
index 88f0637..8de4106 100644
--- a/tests/test-permissions.t
+++ b/tests/test-permissions.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" unix-permissions || exit 80
-
$ hg init t
$ cd t
@@ -69,4 +67,3 @@ Reenable perm to allow deletion:
$ chmod +rx dir
- $ cd ..
diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
deleted file mode 100644
index a8a4483..0000000
--- a/tests/test-phases-exchange.t
+++ /dev/null
@@ -1,1065 +0,0 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
- $ cat >> $HGRCPATH <<EOF
- > [extensions]
- > graphlog=
- > EOF
- $ hgph() { hg log -G --template "{rev} {phase} {desc} - {node|short}\n" $*; }
-
- $ mkcommit() {
- > echo "$1" > "$1"
- > hg add "$1"
- > message="$1"
- > shift
- > hg ci -m "$message" $*
- > }
-
- $ hg init alpha
- $ cd alpha
- $ mkcommit a-A
- $ mkcommit a-B
- $ mkcommit a-C
- $ mkcommit a-D
- $ hgph
- @ 3 draft a-D - b555f63b6063
- |
- o 2 draft a-C - 54acac6f23ab
- |
- o 1 draft a-B - 548a3d25dbf0
- |
- o 0 draft a-A - 054250a37db4
-
-
- $ hg init ../beta
- $ hg push -r 1 ../beta
- pushing to ../beta
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- $ hgph
- @ 3 draft a-D - b555f63b6063
- |
- o 2 draft a-C - 54acac6f23ab
- |
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
- $ cd ../beta
- $ hgph
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg up -q
- $ mkcommit b-A
- $ hgph
- @ 2 draft b-A - f54f1bb90ff3
- |
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg pull ../alpha
- pulling from ../alpha
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hgph
- o 4 public a-D - b555f63b6063
- |
- o 3 public a-C - 54acac6f23ab
- |
- | @ 2 draft b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-pull did not updated ../alpha state.
-push from alpha to beta should update phase even if nothing is transfered
-
- $ cd ../alpha
- $ hgph # not updated by remote pull
- @ 3 draft a-D - b555f63b6063
- |
- o 2 draft a-C - 54acac6f23ab
- |
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg push ../beta
- pushing to ../beta
- searching for changes
- no changes found
- [1]
- $ hgph
- @ 3 public a-D - b555f63b6063
- |
- o 2 public a-C - 54acac6f23ab
- |
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-update must update phase of common changeset too
-
- $ hg pull ../beta # getting b-A
- pulling from ../beta
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
-
- $ cd ../beta
- $ hgph # not updated by remote pull
- o 4 public a-D - b555f63b6063
- |
- o 3 public a-C - 54acac6f23ab
- |
- | @ 2 draft b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg pull ../alpha
- pulling from ../alpha
- searching for changes
- no changes found
- $ hgph
- o 4 public a-D - b555f63b6063
- |
- o 3 public a-C - 54acac6f23ab
- |
- | @ 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Publish configuration option
-----------------------------
-
-Pull
-````
-
-changegroup are added without phase movement
-
- $ hg bundle -a ../base.bundle
- 5 changesets found
- $ cd ..
- $ hg init mu
- $ cd mu
- $ cat > .hg/hgrc << EOF
- > [phases]
- > publish=0
- > EOF
- $ hg unbundle ../base.bundle
- adding changesets
- adding manifests
- adding file changes
- added 5 changesets with 5 changes to 5 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hgph
- o 4 draft a-D - b555f63b6063
- |
- o 3 draft a-C - 54acac6f23ab
- |
- | o 2 draft b-A - f54f1bb90ff3
- |/
- o 1 draft a-B - 548a3d25dbf0
- |
- o 0 draft a-A - 054250a37db4
-
- $ cd ..
-
-Pulling from publish=False to publish=False does not move boundary.
-
- $ hg init nu
- $ cd nu
- $ cat > .hg/hgrc << EOF
- > [phases]
- > publish=0
- > EOF
- $ hg pull ../mu -r 54acac6f23ab
- pulling from ../mu
- adding changesets
- adding manifests
- adding file changes
- added 3 changesets with 3 changes to 3 files
- (run 'hg update' to get a working copy)
- $ hgph
- o 2 draft a-C - 54acac6f23ab
- |
- o 1 draft a-B - 548a3d25dbf0
- |
- o 0 draft a-A - 054250a37db4
-
-
-Even for common
-
- $ hg pull ../mu -r f54f1bb90ff3
- pulling from ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hgph
- o 3 draft b-A - f54f1bb90ff3
- |
- | o 2 draft a-C - 54acac6f23ab
- |/
- o 1 draft a-B - 548a3d25dbf0
- |
- o 0 draft a-A - 054250a37db4
-
-
-
-Pulling from Publish=True to Publish=False move boundary in common set.
-we are in nu
-
- $ hg pull ../alpha -r b555f63b6063
- pulling from ../alpha
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- (run 'hg update' to get a working copy)
- $ hgph # f54f1bb90ff3 stay draft, not ancestor of -r
- o 4 public a-D - b555f63b6063
- |
- | o 3 draft b-A - f54f1bb90ff3
- | |
- o | 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-pulling from Publish=False to publish=False with some public
-
- $ hg up -q f54f1bb90ff3
- $ mkcommit n-A
- $ mkcommit n-B
- $ hgph
- @ 6 draft n-B - 145e75495359
- |
- o 5 draft n-A - d6bcb4f74035
- |
- | o 4 public a-D - b555f63b6063
- | |
- o | 3 draft b-A - f54f1bb90ff3
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ cd ../mu
- $ hg pull ../nu
- pulling from ../nu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- (run 'hg update' to get a working copy)
- $ hgph
- o 6 draft n-B - 145e75495359
- |
- o 5 draft n-A - d6bcb4f74035
- |
- | o 4 public a-D - b555f63b6063
- | |
- | o 3 public a-C - 54acac6f23ab
- | |
- o | 2 draft b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ cd ..
-
-pulling into publish=True
-
- $ cd alpha
- $ hgph
- o 4 public b-A - f54f1bb90ff3
- |
- | @ 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg pull ../mu
- pulling from ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- (run 'hg update' to get a working copy)
- $ hgph
- o 6 draft n-B - 145e75495359
- |
- o 5 draft n-A - d6bcb4f74035
- |
- o 4 public b-A - f54f1bb90ff3
- |
- | @ 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ cd ..
-
-pulling back into original repo
-
- $ cd nu
- $ hg pull ../alpha
- pulling from ../alpha
- searching for changes
- no changes found
- $ hgph
- @ 6 public n-B - 145e75495359
- |
- o 5 public n-A - d6bcb4f74035
- |
- | o 4 public a-D - b555f63b6063
- | |
- o | 3 public b-A - f54f1bb90ff3
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Push
-````
-
-(inserted)
-
-Test that phase are pushed even when they are nothing to pus
-(this might be tested later bu are very convenient to not alter too much test)
-
-Push back to alpha
-
- $ hg push ../alpha # from nu
- pushing to ../alpha
- searching for changes
- no changes found
- [1]
- $ cd ..
- $ cd alpha
- $ hgph
- o 6 public n-B - 145e75495359
- |
- o 5 public n-A - d6bcb4f74035
- |
- o 4 public b-A - f54f1bb90ff3
- |
- | @ 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-(end insertion)
-
-
-initial setup
-
- $ hg glog # of alpha
- o changeset: 6:145e75495359
- | tag: tip
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: n-B
- |
- o changeset: 5:d6bcb4f74035
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: n-A
- |
- o changeset: 4:f54f1bb90ff3
- | parent: 1:548a3d25dbf0
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: b-A
- |
- | @ changeset: 3:b555f63b6063
- | | user: test
- | | date: Thu Jan 01 00:00:00 1970 +0000
- | | summary: a-D
- | |
- | o changeset: 2:54acac6f23ab
- |/ user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: a-C
- |
- o changeset: 1:548a3d25dbf0
- | user: test
- | date: Thu Jan 01 00:00:00 1970 +0000
- | summary: a-B
- |
- o changeset: 0:054250a37db4
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: a-A
-
- $ mkcommit a-E
- $ mkcommit a-F
- $ mkcommit a-G
- $ hg up d6bcb4f74035 -q
- $ mkcommit a-H
- created new head
- $ hgph
- @ 10 draft a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 draft a-F - b740e3e5c05d
- | |
- | o 7 draft a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Pulling from bundle does not alter phases of changeset not present in the bundle
-
- $ hg bundle --base 1 -r 6 -r 3 ../partial-bundle.hg
- 5 changesets found
- $ hg pull ../partial-bundle.hg
- pulling from ../partial-bundle.hg
- searching for changes
- no changes found
- $ hgph
- @ 10 draft a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 draft a-F - b740e3e5c05d
- | |
- | o 7 draft a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Pushing to Publish=False (unknown changeset)
-
- $ hg push ../mu -r b740e3e5c05d # a-F
- pushing to ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- $ hgph
- @ 10 draft a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 draft a-F - b740e3e5c05d
- | |
- | o 7 draft a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
- $ cd ../mu
- $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
- > # not ancestor of -r
- o 8 draft a-F - b740e3e5c05d
- |
- o 7 draft a-E - e9f537e46dea
- |
- | o 6 draft n-B - 145e75495359
- | |
- | o 5 draft n-A - d6bcb4f74035
- | |
- o | 4 public a-D - b555f63b6063
- | |
- o | 3 public a-C - 54acac6f23ab
- | |
- | o 2 draft b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Pushing to Publish=True (unknown changeset)
-
- $ hg push ../beta -r b740e3e5c05d
- pushing to ../beta
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- $ hgph # again f54f1bb90ff3, d6bcb4f74035 and 145e75495359 stay draft,
- > # not ancestor of -r
- o 8 public a-F - b740e3e5c05d
- |
- o 7 public a-E - e9f537e46dea
- |
- | o 6 draft n-B - 145e75495359
- | |
- | o 5 draft n-A - d6bcb4f74035
- | |
- o | 4 public a-D - b555f63b6063
- | |
- o | 3 public a-C - 54acac6f23ab
- | |
- | o 2 draft b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Pushing to Publish=True (common changeset)
-
- $ cd ../beta
- $ hg push ../alpha
- pushing to ../alpha
- searching for changes
- no changes found
- [1]
- $ hgph
- o 6 public a-F - b740e3e5c05d
- |
- o 5 public a-E - e9f537e46dea
- |
- o 4 public a-D - b555f63b6063
- |
- o 3 public a-C - 54acac6f23ab
- |
- | @ 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ cd ../alpha
- $ hgph
- @ 10 draft a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Pushing to Publish=False (common changeset that change phase + unknown one)
-
- $ hg push ../mu -r 967b449fbc94 -f
- pushing to ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- $ hgph
- @ 10 draft a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ cd ../mu
- $ hgph # d6bcb4f74035 should have changed phase
- > # 145e75495359 is still draft. not ancestor of -r
- o 9 draft a-H - 967b449fbc94
- |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 draft n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- | o 4 public a-D - b555f63b6063
- | |
- | o 3 public a-C - 54acac6f23ab
- | |
- o | 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-
-Pushing to Publish=True (common changeset from publish=False)
-
-(in mu)
- $ hg push ../alpha
- pushing to ../alpha
- searching for changes
- no changes found
- [1]
- $ hgph
- o 9 public a-H - 967b449fbc94
- |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- | o 4 public a-D - b555f63b6063
- | |
- | o 3 public a-C - 54acac6f23ab
- | |
- o | 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hgph -R ../alpha # a-H should have been synced to 0
- @ 10 public a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-
-Discovery locally secret changeset on a remote repository:
-
-- should make it non-secret
-
- $ cd ../alpha
- $ mkcommit A-secret --config phases.new-commit=2
- $ hgph
- @ 11 secret A-secret - 435b5d83910c
- |
- o 10 public a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg bundle --base 'parents(.)' -r . ../secret-bundle.hg
- 1 changesets found
- $ hg -R ../mu unbundle ../secret-bundle.hg
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- (run 'hg update' to get a working copy)
- $ hgph -R ../mu
- o 10 draft A-secret - 435b5d83910c
- |
- o 9 public a-H - 967b449fbc94
- |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- | o 4 public a-D - b555f63b6063
- | |
- | o 3 public a-C - 54acac6f23ab
- | |
- o | 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
- $ hg pull ../mu
- pulling from ../mu
- searching for changes
- no changes found
- $ hgph
- @ 11 draft A-secret - 435b5d83910c
- |
- o 10 public a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-pushing a locally public and draft changesets remotly secret should make them
-appear on the remote side.
-
-
- $ hg -R ../mu phase --secret --force 967b449fbc94
- $ hg push -r 435b5d83910c ../mu
- pushing to ../mu
- searching for changes
- abort: push creates new remote head 435b5d83910c!
- (did you forget to merge? use push -f to force)
- [255]
- $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
- pushing to ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 0 changesets with 0 changes to 2 files
- $ hgph -R ../mu
- o 10 draft A-secret - 435b5d83910c
- |
- o 9 public a-H - 967b449fbc94
- |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- | o 4 public a-D - b555f63b6063
- | |
- | o 3 public a-C - 54acac6f23ab
- | |
- o | 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-pull new changeset with common draft locally
-
- $ hg up -q 967b449fbc94 # create a new root for draft
- $ mkcommit 'alpha-more'
- created new head
- $ hg push -fr . ../mu
- pushing to ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- $ cd ../mu
- $ hg phase --secret --force 1c5cfd894796
- $ hg up -q 435b5d83910c
- $ mkcommit 'mu-more'
- $ cd ../alpha
- $ hg pull ../mu
- pulling from ../mu
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- (run 'hg update' to get a working copy)
- $ hgph
- o 13 draft mu-more - 5237fb433fc8
- |
- | @ 12 draft alpha-more - 1c5cfd894796
- | |
- o | 11 draft A-secret - 435b5d83910c
- |/
- o 10 public a-H - 967b449fbc94
- |
- | o 9 draft a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-Test that test are properly ignored on remote event when existing locally
-
- $ cd ..
- $ hg clone -qU -r b555f63b6063 -r f54f1bb90ff3 beta gamma
-
-# pathological case are
-#
-# * secret remotely
-# * known locally
-# * repo have uncommon changeset
-
- $ hg -R beta phase --secret --force f54f1bb90ff3
- $ hg -R gamma phase --draft --force f54f1bb90ff3
-
- $ cd gamma
- $ hg pull ../beta
- pulling from ../beta
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- (run 'hg update' to get a working copy)
- $ hg phase f54f1bb90ff3
- 2: draft
-
-same over the wire
-
- $ cd ../beta
- $ hg serve -p $HGPORT -d --pid-file=../beta.pid -E ../beta-error.log
- $ cat ../beta.pid >> $DAEMON_PIDS
- $ cd ../gamma
-
- $ hg pull http://localhost:$HGPORT/
- pulling from http://localhost:$HGPORT/
- searching for changes
- no changes found
- $ hg phase f54f1bb90ff3
- 2: draft
-
-check that secret local on both side are not synced to public
-
- $ hg push -r b555f63b6063 http://localhost:$HGPORT/
- pushing to http://localhost:$HGPORT/
- searching for changes
- no changes found
- [1]
- $ hg phase f54f1bb90ff3
- 2: draft
-
-put the changeset in the draft state again
-(first test after this one expect to be able to copy)
-
- $ cd ..
-
-
-Test Clone behavior
-
-A. Clone without secret changeset
-
-1. cloning non-publishing repository
-(Phase should be preserved)
-
-# make sure there is no secret so we can use a copy clone
-
- $ hg -R mu phase --draft 'secret()'
-
- $ hg clone -U mu Tau
- $ hgph -R Tau
- o 12 draft mu-more - 5237fb433fc8
- |
- | o 11 draft alpha-more - 1c5cfd894796
- | |
- o | 10 draft A-secret - 435b5d83910c
- |/
- o 9 public a-H - 967b449fbc94
- |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- | o 4 public a-D - b555f63b6063
- | |
- | o 3 public a-C - 54acac6f23ab
- | |
- o | 2 public b-A - f54f1bb90ff3
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
-2. cloning publishing repository
-
-(everything should be public)
-
- $ hg clone -U alpha Upsilon
- $ hgph -R Upsilon
- o 13 public mu-more - 5237fb433fc8
- |
- | o 12 public alpha-more - 1c5cfd894796
- | |
- o | 11 public A-secret - 435b5d83910c
- |/
- o 10 public a-H - 967b449fbc94
- |
- | o 9 public a-G - 3e27b6f1eee1
- | |
- | o 8 public a-F - b740e3e5c05d
- | |
- | o 7 public a-E - e9f537e46dea
- | |
- +---o 6 public n-B - 145e75495359
- | |
- o | 5 public n-A - d6bcb4f74035
- | |
- o | 4 public b-A - f54f1bb90ff3
- | |
- | o 3 public a-D - b555f63b6063
- | |
- | o 2 public a-C - 54acac6f23ab
- |/
- o 1 public a-B - 548a3d25dbf0
- |
- o 0 public a-A - 054250a37db4
-
-
diff --git a/tests/test-phases.t b/tests/test-phases.t
deleted file mode 100644
index 28e7dab..0000000
--- a/tests/test-phases.t
+++ /dev/null
@@ -1,479 +0,0 @@
- $ hglog() { hg log --template "{rev} {phaseidx} {desc}\n" $*; }
- $ mkcommit() {
- > echo "$1" > "$1"
- > hg add "$1"
- > message="$1"
- > shift
- > hg ci -m "$message" $*
- > }
-
- $ hg init initialrepo
- $ cd initialrepo
-
-Cannot change null revision phase
-
- $ hg phase --force --secret null
- abort: cannot change null revision phase
- [255]
- $ hg phase null
- -1: public
-
- $ mkcommit A
-
-New commit are draft by default
-
- $ hglog
- 0 1 A
-
-Following commit are draft too
-
- $ mkcommit B
-
- $ hglog
- 1 1 B
- 0 1 A
-
-Draft commit are properly created over public one:
-
- $ hg phase --public .
- $ hglog
- 1 0 B
- 0 0 A
-
- $ mkcommit C
- $ mkcommit D
-
- $ hglog
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
-
-Test creating changeset as secret
-
- $ mkcommit E --config phases.new-commit='secret'
- $ hglog
- 4 2 E
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
-
-Test the secret property is inherited
-
- $ mkcommit H
- $ hglog
- 5 2 H
- 4 2 E
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
-
-Even on merge
-
- $ hg up -q 1
- $ mkcommit "B'"
- created new head
- $ hglog
- 6 1 B'
- 5 2 H
- 4 2 E
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
- $ hg merge 4 # E
- 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m "merge B' and E"
- $ hglog
- 7 2 merge B' and E
- 6 1 B'
- 5 2 H
- 4 2 E
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
-
-Test secret changeset are not pushed
-
- $ hg init ../push-dest
- $ cat > ../push-dest/.hg/hgrc << EOF
- > [phases]
- > publish=False
- > EOF
- $ hg outgoing ../push-dest --template='{rev} {phase} {desc|firstline}\n'
- comparing with ../push-dest
- searching for changes
- 0 public A
- 1 public B
- 2 draft C
- 3 draft D
- 6 draft B'
- $ hg outgoing -r 'branch(default)' ../push-dest --template='{rev} {phase} {desc|firstline}\n'
- comparing with ../push-dest
- searching for changes
- 0 public A
- 1 public B
- 2 draft C
- 3 draft D
- 6 draft B'
-
- $ hg push ../push-dest -f # force because we push multiple heads
- pushing to ../push-dest
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 5 changesets with 5 changes to 5 files (+1 heads)
- $ hglog
- 7 2 merge B' and E
- 6 1 B'
- 5 2 H
- 4 2 E
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
- $ cd ../push-dest
- $ hglog
- 4 1 B'
- 3 1 D
- 2 1 C
- 1 0 B
- 0 0 A
-
-(Issue3303)
-Check that remote secret changeset are ignore when checking creation of remote heads
-
-We add a secret head into the push destination. This secreat head shadow a
-visible shared between the initial repo and the push destination.
-
- $ hg up -q 4 # B'
- $ mkcommit Z --config phases.new-commit=secret
- $ hg phase .
- 5: secret
-
-# We now try to push a new public changeset that descend from the common public
-# head shadowed by the remote secret head.
-
- $ cd ../initialrepo
- $ hg up -q 6 #B'
- $ mkcommit I
- created new head
- $ hg push ../push-dest
- pushing to ../push-dest
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
-
-:note: The "(+1 heads)" is wrong as we do not had any visible head
-
-
-Restore condition prior extra insertion.
- $ hg -q --config extensions.mq= strip .
- $ hg up -q 7
- $ cd ..
-
-Test secret changeset are not pull
-
- $ hg init pull-dest
- $ cd pull-dest
- $ hg pull ../initialrepo
- pulling from ../initialrepo
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 5 changesets with 5 changes to 5 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hglog
- 4 0 B'
- 3 0 D
- 2 0 C
- 1 0 B
- 0 0 A
- $ cd ..
-
-But secret can still be bundled explicitly
-
- $ cd initialrepo
- $ hg bundle --base '4^' -r 'children(4)' ../secret-bundle.hg
- 4 changesets found
- $ cd ..
-
-Test secret changeset are not cloned
-(during local clone)
-
- $ hg clone -qU initialrepo clone-dest
- $ hglog -R clone-dest
- 4 0 B'
- 3 0 D
- 2 0 C
- 1 0 B
- 0 0 A
-
-Test revset
-
- $ cd initialrepo
- $ hglog -r 'public()'
- 0 0 A
- 1 0 B
- $ hglog -r 'draft()'
- 2 1 C
- 3 1 D
- 6 1 B'
- $ hglog -r 'secret()'
- 4 2 E
- 5 2 H
- 7 2 merge B' and E
-
-test that phase are displayed in log at debug level
-
- $ hg log --debug
- changeset: 7:17a481b3bccb796c0521ae97903d81c52bfee4af
- tag: tip
- phase: secret
- parent: 6:cf9fe039dfd67e829edf6522a45de057b5c86519
- parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
- manifest: 7:5e724ffacba267b2ab726c91fc8b650710deaaa8
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: C D E
- extra: branch=default
- description:
- merge B' and E
-
-
- changeset: 6:cf9fe039dfd67e829edf6522a45de057b5c86519
- phase: draft
- parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
- parent: -1:0000000000000000000000000000000000000000
- manifest: 6:ab8bfef2392903058bf4ebb9e7746e8d7026b27a
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: B'
- extra: branch=default
- description:
- B'
-
-
- changeset: 5:a030c6be5127abc010fcbff1851536552e6951a8
- phase: secret
- parent: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
- parent: -1:0000000000000000000000000000000000000000
- manifest: 5:5c710aa854874fe3d5fa7192e77bdb314cc08b5a
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: H
- extra: branch=default
- description:
- H
-
-
- changeset: 4:a603bfb5a83e312131cebcd05353c217d4d21dde
- phase: secret
- parent: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e
- parent: -1:0000000000000000000000000000000000000000
- manifest: 4:7173fd1c27119750b959e3a0f47ed78abe75d6dc
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: E
- extra: branch=default
- description:
- E
-
-
- changeset: 3:b3325c91a4d916bcc4cdc83ea3fe4ece46a42f6e
- phase: draft
- parent: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757
- parent: -1:0000000000000000000000000000000000000000
- manifest: 3:6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: D
- extra: branch=default
- description:
- D
-
-
- changeset: 2:f838bfaca5c7226600ebcfd84f3c3c13a28d3757
- phase: draft
- parent: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
- parent: -1:0000000000000000000000000000000000000000
- manifest: 2:66a5a01817fdf5239c273802b5b7618d051c89e4
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: C
- extra: branch=default
- description:
- C
-
-
- changeset: 1:27547f69f25460a52fff66ad004e58da7ad3fb56
- parent: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256
- parent: -1:0000000000000000000000000000000000000000
- manifest: 1:cb5cbbc1bfbf24cc34b9e8c16914e9caa2d2a7fd
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: B
- extra: branch=default
- description:
- B
-
-
- changeset: 0:4a2df7238c3b48766b5e22fafbb8a2f506ec8256
- parent: -1:0000000000000000000000000000000000000000
- parent: -1:0000000000000000000000000000000000000000
- manifest: 0:007d8c9d88841325f5c6b06371b35b4e8a2b1a83
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- files+: A
- extra: branch=default
- description:
- A
-
-
-
-Test phase command
-===================
-
-initial picture
-
- $ cat >> $HGRCPATH << EOF
- > [extensions]
- > hgext.graphlog=
- > EOF
- $ hg log -G --template "{rev} {phase} {desc}\n"
- @ 7 secret merge B' and E
- |\
- | o 6 draft B'
- | |
- +---o 5 secret H
- | |
- o | 4 secret E
- | |
- o | 3 draft D
- | |
- o | 2 draft C
- |/
- o 1 public B
- |
- o 0 public A
-
-
-display changesets phase
-
-(mixing -r and plain rev specification)
-
- $ hg phase 1::4 -r 7
- 1: public
- 2: draft
- 3: draft
- 4: secret
- 7: secret
-
-
-move changeset forward
-
-(with -r option)
-
- $ hg phase --public -r 2
- $ hg log -G --template "{rev} {phase} {desc}\n"
- @ 7 secret merge B' and E
- |\
- | o 6 draft B'
- | |
- +---o 5 secret H
- | |
- o | 4 secret E
- | |
- o | 3 draft D
- | |
- o | 2 public C
- |/
- o 1 public B
- |
- o 0 public A
-
-
-move changeset backward
-
-(without -r option)
-
- $ hg phase --draft --force 2
- $ hg log -G --template "{rev} {phase} {desc}\n"
- @ 7 secret merge B' and E
- |\
- | o 6 draft B'
- | |
- +---o 5 secret H
- | |
- o | 4 secret E
- | |
- o | 3 draft D
- | |
- o | 2 draft C
- |/
- o 1 public B
- |
- o 0 public A
-
-
-move changeset forward and backward
-
- $ hg phase --draft --force 1::4
- $ hg log -G --template "{rev} {phase} {desc}\n"
- @ 7 secret merge B' and E
- |\
- | o 6 draft B'
- | |
- +---o 5 secret H
- | |
- o | 4 draft E
- | |
- o | 3 draft D
- | |
- o | 2 draft C
- |/
- o 1 draft B
- |
- o 0 public A
-
-test partial failure
-
- $ hg phase --public 7
- $ hg phase --draft '5 or 7'
- cannot move 1 changesets to a more permissive phase, use --force
- phase changed for 1 changesets
- [1]
- $ hg log -G --template "{rev} {phase} {desc}\n"
- @ 7 public merge B' and E
- |\
- | o 6 public B'
- | |
- +---o 5 draft H
- | |
- o | 4 public E
- | |
- o | 3 public D
- | |
- o | 2 public C
- |/
- o 1 public B
- |
- o 0 public A
-
-
-test complete failure
-
- $ hg phase --draft 7
- cannot move 1 changesets to a more permissive phase, use --force
- no phases changed
- [1]
-
- $ cd ..
diff --git a/tests/test-profile.t b/tests/test-profile.t
index f05a8dd..9591927 100644
--- a/tests/test-profile.t
+++ b/tests/test-profile.t
@@ -1,31 +1,31 @@
test --time
- $ hg --time help -q help 2>&1 | grep time > /dev/null
+ $ hg --time help -q help 2>&1 | grep Time > /dev/null
$ hg init a
$ cd a
-#if lsprof
-
test --profile
- $ hg --profile st 2>../out
- $ grep CallCount ../out > /dev/null || cat ../out
-
- $ hg --profile --config profiling.output=../out st
- $ grep CallCount ../out > /dev/null || cat ../out
-
- $ hg --profile --config profiling.format=text st 2>../out
- $ grep CallCount ../out > /dev/null || cat ../out
-
- $ echo "[profiling]" >> $HGRCPATH
- $ echo "format=kcachegrind" >> $HGRCPATH
-
- $ hg --profile st 2>../out
- $ grep 'events: Ticks' ../out > /dev/null || cat ../out
-
- $ hg --profile --config profiling.output=../out st
- $ grep 'events: Ticks' ../out > /dev/null || cat ../out
-
-#endif
-
- $ cd ..
+ $ if "$TESTDIR/hghave" -q lsprof; then
+ > hg --profile st 2>../out || echo --profile failed
+ > grep CallCount < ../out > /dev/null || echo wrong --profile
+ >
+ > hg --profile --config profiling.output=../out st 2>&1 \
+ > || echo --profile + output to file failed
+ > grep CallCount < ../out > /dev/null \
+ > || echo wrong --profile output when saving to a file
+ >
+ > hg --profile --config profiling.format=text st 2>&1 \
+ > | grep CallCount > /dev/null || echo --profile format=text failed
+ >
+ > echo "[profiling]" >> $HGRCPATH
+ > echo "format=kcachegrind" >> $HGRCPATH
+ >
+ > hg --profile st 2>../out || echo --profile format=kcachegrind failed
+ > grep 'events: Ticks' < ../out > /dev/null || echo --profile output is wrong
+ >
+ > hg --profile --config profiling.output=../out st 2>&1 \
+ > || echo --profile format=kcachegrind + output to file failed
+ > grep 'events: Ticks' < ../out > /dev/null \
+ > || echo --profile output is wrong
+ > fi
diff --git a/tests/test-progress.t b/tests/test-progress.t
index 5fa0a62..6fe1c1e 100644
--- a/tests/test-progress.t
+++ b/tests/test-progress.t
@@ -9,102 +9,53 @@
> total = loops
> if opts.get('total', None):
> total = int(opts.get('total'))
- > nested = False
- > if opts.get('nested', None):
- > nested = True
> loops = abs(loops)
>
> for i in range(loops):
> ui.progress('loop', i, 'loop.%d' % i, 'loopnum', total)
- > if opts.get('parallel'):
- > ui.progress('other', i, 'other.%d' % i, 'othernum', total)
- > if nested:
- > for j in range(2):
- > ui.progress('nested', j, 'nested.%d' % j, 'nestnum', 2)
- > ui.progress('nested', None, 'nested.done', 'nestnum', 2)
> ui.progress('loop', None, 'loop.done', 'loopnum', total)
>
> commands.norepo += " loop"
>
> cmdtable = {
- > "loop": (loop, [('', 'total', '', 'override for total'),
- > ('', 'nested', False, 'show nested results'),
- > ('', 'parallel', False, 'show parallel sets of results'),
- > ],
+ > "loop": (loop, [('', 'total', '', 'override for total')],
> 'hg loop LOOPS'),
> }
> EOF
- $ cp $HGRCPATH $HGRCPATH.orig
$ echo "[extensions]" >> $HGRCPATH
$ echo "progress=" >> $HGRCPATH
$ echo "loop=`pwd`/loop.py" >> $HGRCPATH
$ echo "[progress]" >> $HGRCPATH
- $ echo "format = topic bar number" >> $HGRCPATH
+ $ echo "format = topic bar number" >> $HGRCPATH
$ echo "assume-tty=1" >> $HGRCPATH
$ echo "width=60" >> $HGRCPATH
test default params, display nothing because of delay
- $ hg -y loop 3 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py
$ echo "delay=0" >> $HGRCPATH
$ echo "refresh=0" >> $HGRCPATH
test with delay=0, refresh=0
- $ hg -y loop 3 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg -y loop 3 2>&1 | $TESTDIR/filtercr.py
loop [ ] 0/3
loop [===============> ] 1/3
loop [===============================> ] 2/3
\r (esc)
-
-test nested short-lived topics (which shouldn't display with nestdelay):
-
- $ hg -y loop 3 --nested 2>&1 | \
- > python "$TESTDIR/filtercr.py"
-
- loop [ ] 0/3
- loop [===============> ] 1/3
- loop [===============================> ] 2/3
- \r (esc)
-
-
- $ hg --config progress.changedelay=0 -y loop 3 --nested 2>&1 | \
- > python "$TESTDIR/filtercr.py"
-
- loop [ ] 0/3
- nested [ ] 0/2
- nested [======================> ] 1/2
- loop [===============> ] 1/3
- nested [ ] 0/2
- nested [======================> ] 1/2
- loop [===============================> ] 2/3
- nested [ ] 0/2
- nested [======================> ] 1/2
- \r (esc)
-
-
-test two topics being printed in parallel (as when we're doing a local
---pull clone, where you get the unbundle and bundle progress at the
-same time):
- $ hg loop 3 --parallel 2>&1 | python "$TESTDIR/filtercr.py"
-
- loop [ ] 0/3
- loop [===============> ] 1/3
- loop [===============================> ] 2/3
- \r (esc)
test refresh is taken in account
- $ hg -y --config progress.refresh=100 loop 3 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg -y --config progress.refresh=100 loop 3 2>&1 | $TESTDIR/filtercr.py
test format options 1
$ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 \
- > | "$TESTDIR/filtercr.py"
+ > | $TESTDIR/filtercr.py
0/2 loop lo
1/2 loop lo
@@ -113,7 +64,7 @@ test format options 1
test format options 2
$ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 \
- > | "$TESTDIR/filtercr.py"
+ > | $TESTDIR/filtercr.py
0/2 p.0 [ ]
1/2 p.1 [=======================> ]
@@ -122,7 +73,7 @@ test format options 2
test format options and indeterminate progress
$ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 \
- > | "$TESTDIR/filtercr.py"
+ > | $TESTDIR/filtercr.py
0 loop.0 [ <=> ]
1 loop.1 [ <=> ]
@@ -130,7 +81,7 @@ test format options and indeterminate progress
make sure things don't fall over if count > total
- $ hg -y loop --total 4 6 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg -y loop --total 4 6 2>&1 | $TESTDIR/filtercr.py
loop [ ] 0/4
loop [===========> ] 1/4
@@ -142,7 +93,7 @@ make sure things don't fall over if count > total
test immediate progress completion
- $ hg -y loop 0 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg -y loop 0 2>&1 | $TESTDIR/filtercr.py
test delay time estimates
@@ -163,8 +114,7 @@ test delay time estimates
> time.time = mocktime(int(os.environ.get('MOCKTIME', '11')))
> EOF
- $ cp $HGRCPATH.orig $HGRCPATH
- $ echo "[extensions]" >> $HGRCPATH
+ $ echo "[extensions]" > $HGRCPATH
$ echo "mocktime=`pwd`/mocktime.py" >> $HGRCPATH
$ echo "progress=" >> $HGRCPATH
$ echo "loop=`pwd`/loop.py" >> $HGRCPATH
@@ -173,7 +123,7 @@ test delay time estimates
$ echo "delay=25" >> $HGRCPATH
$ echo "width=60" >> $HGRCPATH
- $ hg -y loop 8 2>&1 | python "$TESTDIR/filtercr.py"
+ $ hg -y loop 8 2>&1 | python $TESTDIR/filtercr.py
loop [=========> ] 2/8 1m07s
loop [===============> ] 3/8 56s
@@ -183,7 +133,7 @@ test delay time estimates
loop [=====================================> ] 7/8 12s
\r (esc)
- $ MOCKTIME=10000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
+ $ MOCKTIME=10000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py
loop [ ] 0/4
loop [=========> ] 1/4 8h21m
@@ -191,7 +141,7 @@ test delay time estimates
loop [==============================> ] 3/4 2h47m
\r (esc)
- $ MOCKTIME=1000000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
+ $ MOCKTIME=1000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py
loop [ ] 0/4
loop [=========> ] 1/4 5w00d
@@ -200,7 +150,7 @@ test delay time estimates
\r (esc)
- $ MOCKTIME=14000000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
+ $ MOCKTIME=14000000 hg -y loop 4 2>&1 | python $TESTDIR/filtercr.py
loop [ ] 0/4
loop [=========> ] 1/4 1y18w
@@ -209,7 +159,7 @@ test delay time estimates
\r (esc)
Time estimates should not fail when there's no end point:
- $ hg -y loop -- -4 2>&1 | python "$TESTDIR/filtercr.py"
+ $ hg -y loop -- -4 2>&1 | python $TESTDIR/filtercr.py
loop [ <=> ] 2
loop [ <=> ] 3
diff --git a/tests/test-pull-branch.t b/tests/test-pull-branch.t
index a9545cf..89f82c3 100644
--- a/tests/test-pull-branch.t
+++ b/tests/test-pull-branch.t
@@ -5,7 +5,6 @@
adding foo
$ hg branch branchA
marked working directory as branch branchA
- (branches are permanent and global, did you want a bookmark?)
$ echo a1 > foo
$ hg ci -ma1 # 1
@@ -33,7 +32,6 @@ Create branch B:
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchB
marked working directory as branch branchB
- (branches are permanent and global, did you want a bookmark?)
$ echo b1 > foo
$ hg ci -mb1 # 3
@@ -141,7 +139,6 @@ Make changes on new branch on tt
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch branchC
marked working directory as branch branchC
- (branches are permanent and global, did you want a bookmark?)
$ echo b1 > bar
$ hg ci -Am "commit on branchC on tt"
adding bar
@@ -212,5 +209,3 @@ Pull from tt
adding file changes
added 2 changesets with 2 changes to 2 files (+2 heads)
(run 'hg heads .' to see heads, 'hg merge' to merge)
-
- $ cd ..
diff --git a/tests/test-pull-http.t b/tests/test-pull-http.t
index 7c53682..3c42ae4 100644
--- a/tests/test-pull-http.t
+++ b/tests/test-pull-http.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hg init test
$ cd test
@@ -13,30 +12,13 @@
$ echo a >> a
$ hg ci -mb
-Cloning with a password in the URL should not save the password in .hg/hgrc:
-
- $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
- $ cat hg.pid >> $DAEMON_PIDS
- $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 1 files
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cat test3/.hg/hgrc
- [paths]
- default = http://foo@localhost:$HGPORT/
- $ "$TESTDIR/killdaemons.py"
-
expect error, cloning not allowed
$ echo '[web]' > .hg/hgrc
$ echo 'allowpull = false' >> .hg/hgrc
$ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
- $ hg clone http://localhost:$HGPORT/ test4
+ $ hg clone http://localhost:$HGPORT/ test3
requesting all changes
abort: authorization failed
[255]
@@ -61,5 +43,3 @@ expect error, pulling not allowed
searching for changes
abort: authorization failed
% serve errors
-
- $ cd ..
diff --git a/tests/test-pull-permission.t b/tests/test-pull-permission.t
index 8df5527..bc9fdf6 100644
--- a/tests/test-pull-permission.t
+++ b/tests/test-pull-permission.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" unix-permissions || exit 80
-
$ hg init a
$ cd a
$ echo foo > b
@@ -29,4 +27,3 @@
checking files
1 files, 1 changesets, 1 total revisions
- $ cd ..
diff --git a/tests/test-pull-pull-corruption.t b/tests/test-pull-pull-corruption.t
index 4df2984..3294d72 100644
--- a/tests/test-pull-pull-corruption.t
+++ b/tests/test-pull-pull-corruption.t
@@ -37,27 +37,26 @@ use a hook to make the second pull start while the first one is still running
start a pull...
- $ hg pull ../source1 > pull.out 2>&1 &
+ $ hg pull ../source1 &
... and start another pull before the first one has finished
$ sleep 1
+ pulling from ../source1
+ requesting all changes
$ hg pull ../source2 2>/dev/null
pulling from ../source2
- searching for changes
adding changesets
adding manifests
adding file changes
- added 1 changesets with 1 changes to 1 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ cat pull.out
- pulling from ../source1
- requesting all changes
+ added 10 changesets with 10 changes to 1 files
+ (run 'hg update' to get a working copy)
+ searching for changes
adding changesets
adding manifests
adding file changes
- added 10 changesets with 10 changes to 1 files
- (run 'hg update' to get a working copy)
+ added 1 changesets with 1 changes to 1 files (+1 heads)
+ (run 'hg heads' to see heads, 'hg merge' to merge)
see the result
@@ -68,5 +67,3 @@ see the result
crosschecking files in changesets and manifests
checking files
1 files, 11 changesets, 11 total revisions
-
- $ cd ..
diff --git a/tests/test-pull-pull-corruption2.t b/tests/test-pull-pull-corruption2.t
new file mode 100644
index 0000000..ad4509c
--- /dev/null
+++ b/tests/test-pull-pull-corruption2.t
@@ -0,0 +1,44 @@
+Corrupt an hg repo with two pulls.
+create one repo with a long history
+
+ $ hg init source1
+ $ cd source1
+ $ touch foo
+ $ hg add foo
+ $ for i in 1 2 3 4 5 6 7 8 9 10; do
+ > echo $i >> foo
+ > hg ci -m $i
+ > done
+ $ cd ..
+
+create a third repo to pull both other repos into it
+
+ $ hg init version2
+ $ hg -R version2 pull source1 &
+ $ sleep 1
+ pulling from source1
+ requesting all changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 10 changesets with 10 changes to 1 files
+ (run 'hg update' to get a working copy)
+ $ hg clone --pull -U version2 corrupted
+ requesting all changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 10 changesets with 10 changes to 1 files
+ $ wait
+ $ hg -R corrupted verify
+ checking changesets
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+ 1 files, 10 changesets, 10 total revisions
+ $ hg -R version2 verify
+ checking changesets
+ checking manifests
+ crosschecking files in changesets and manifests
+ checking files
+ 1 files, 10 changesets, 10 total revisions
diff --git a/tests/test-pull-r.t b/tests/test-pull-r.t
index af91b6d..ed2cada 100644
--- a/tests/test-pull-r.t
+++ b/tests/test-pull-r.t
@@ -43,7 +43,7 @@ don't show "(+1 heads)" message when pulling closed head
2:effea6de0384
1:ed1b79f46b9a
$ hg pull
- pulling from $TESTTMP/repo2 (glob)
+ pulling from $TESTTMP/repo2
searching for changes
adding changesets
adding manifests
@@ -101,4 +101,3 @@ This used to abort: received changelog group is empty:
$ hg pull -qr 1 ../repo
- $ cd ..
diff --git a/tests/test-pull-update.t b/tests/test-pull-update.t
index 3aa5a49..7124fef 100644
--- a/tests/test-pull-update.t
+++ b/tests/test-pull-update.t
@@ -59,4 +59,3 @@ Should work:
added 1 changesets with 1 changes to 1 files (-1 heads)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ..
diff --git a/tests/test-pull.t b/tests/test-pull.t
index b14d7f7..7d194f9 100644
--- a/tests/test-pull.t
+++ b/tests/test-pull.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
$ hg init test
$ cd test
@@ -45,7 +43,7 @@
2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo
$ hg pull
- pulling from http://foo@localhost:$HGPORT/
+ pulling from http://foo:***@localhost:$HGPORT/
searching for changes
no changes found
@@ -88,5 +86,3 @@ regular shell commands.
$ URL=`python -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
$ hg pull -q "$URL"
-
- $ cd ..
diff --git a/tests/test-purge.t b/tests/test-purge.t
index 75f9f90..9e544d5 100644
--- a/tests/test-purge.t
+++ b/tests/test-purge.t
@@ -24,7 +24,7 @@ delete an empty directory
$ hg purge -p
empty_dir
$ hg purge -v
- removing directory empty_dir
+ Removing directory empty_dir
$ ls
directory
r1
@@ -38,9 +38,9 @@ delete an untracked directory
untracked_dir/untracked_file1
untracked_dir/untracked_file2
$ hg purge -v
- removing file untracked_dir/untracked_file1
- removing file untracked_dir/untracked_file2
- removing directory untracked_dir
+ Removing file untracked_dir/untracked_file1
+ Removing file untracked_dir/untracked_file2
+ Removing directory untracked_dir
$ ls
directory
r1
@@ -58,8 +58,8 @@ delete an untracked file
untracked_file
untracked_file_readonly
$ hg purge -v
- removing file untracked_file
- removing file untracked_file_readonly
+ Removing file untracked_file
+ Removing file untracked_file_readonly
$ ls
directory
r1
@@ -70,7 +70,7 @@ delete an untracked file in a tracked directory
$ hg purge -p
directory/untracked_file
$ hg purge -v
- removing file directory/untracked_file
+ Removing file directory/untracked_file
$ ls
directory
r1
@@ -81,8 +81,8 @@ delete nested directories
$ hg purge -p
untracked_directory/nested_directory
$ hg purge -v
- removing directory untracked_directory/nested_directory
- removing directory untracked_directory
+ Removing directory untracked_directory/nested_directory
+ Removing directory untracked_directory
$ ls
directory
r1
@@ -94,8 +94,8 @@ delete nested directories from a subdir
$ hg purge -p
untracked_directory/nested_directory
$ hg purge -v
- removing directory untracked_directory/nested_directory
- removing directory untracked_directory
+ Removing directory untracked_directory/nested_directory
+ Removing directory untracked_directory
$ cd ..
$ ls
directory
@@ -109,8 +109,8 @@ delete only part of the tree
$ hg purge -p ../untracked_directory
untracked_directory/nested_directory
$ hg purge -v ../untracked_directory
- removing directory untracked_directory/nested_directory
- removing directory untracked_directory
+ Removing directory untracked_directory/nested_directory
+ Removing directory untracked_directory
$ cd ..
$ ls
directory
@@ -131,7 +131,7 @@ skip ignored files if --all not specified
$ hg purge -p --all
ignored
$ hg purge -v --all
- removing file ignored
+ Removing file ignored
$ ls
directory
r1
@@ -152,7 +152,7 @@ hide error messages to avoid changing the output when the text changes
$ hg purge -p
untracked_file
$ hg purge -v 2> /dev/null
- removing file untracked_file
+ Removing file untracked_file
$ hg st
! r1
@@ -168,7 +168,7 @@ tracked file in ignored directory (issue621)
$ hg purge -p
untracked_file
$ hg purge -v
- removing file untracked_file
+ Removing file untracked_file
skip excluded files
@@ -214,5 +214,3 @@ skip patterns
$ touch directory/.svn/foo
$ hg purge -p -X .svn -X '*/.svn'
$ hg purge -p -X re:.*.svn
-
- $ cd ..
diff --git a/tests/test-push-cgi.t b/tests/test-push-cgi.t
index 365a73a..e0ae84a 100644
--- a/tests/test-push-cgi.t
+++ b/tests/test-push-cgi.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate web paths as if they were file paths
-
This is a test of the push wire protocol over CGI-based hgweb.
initialize repository
@@ -88,5 +86,3 @@ successful push, SHA1 hash of heads (unbundlehash capability)
adding manifests
adding file changes
added 0 changesets with 0 changes to 1 files
-
- $ cd ..
diff --git a/tests/test-push-http.t b/tests/test-push-http.t
index 7f3c6d6..7474d7b 100644
--- a/tests/test-push-http.t
+++ b/tests/test-push-http.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hg init test
$ cd test
@@ -28,8 +27,6 @@ expect ssl error
pushing to http://localhost:$HGPORT/
searching for changes
remote: ssl required
- remote: ssl required
- updating cb9a9f314b8b to public failed!
% serve errors
expect authorization error
@@ -55,7 +52,7 @@ expect success
$ echo 'allow_push = *' >> .hg/hgrc
$ echo '[hooks]' >> .hg/hgrc
- $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup 0" >> .hg/hgrc
+ $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup 0' >> .hg/hgrc
$ req
pushing to http://localhost:$HGPORT/
searching for changes
@@ -63,10 +60,11 @@ expect success
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
- remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
+ remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
% serve errors
$ hg rollback
repository tip rolled back to revision 0 (undo serve)
+ working directory now based on revision 0
expect success, server lacks the httpheader capability
@@ -79,10 +77,11 @@ expect success, server lacks the httpheader capability
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
- remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
+ remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
% serve errors
$ hg rollback
repository tip rolled back to revision 0 (undo serve)
+ working directory now based on revision 0
expect success, server lacks the unbundlehash capability
@@ -95,10 +94,11 @@ expect success, server lacks the unbundlehash capability
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
- remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
+ remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
% serve errors
$ hg rollback
repository tip rolled back to revision 0 (undo serve)
+ working directory now based on revision 0
expect authorization error: all users denied
@@ -119,5 +119,3 @@ expect authorization error: some users denied, users must be authenticated
searching for changes
abort: authorization failed
% serve errors
-
- $ cd ..
diff --git a/tests/test-push-r.t b/tests/test-push-r.t
index d6e541b..39e4254 100644
--- a/tests/test-push-r.t
+++ b/tests/test-push-r.t
@@ -1,6 +1,6 @@
$ hg init test
$ cd test
- $ hg unbundle "$TESTDIR/bundles/remote.hg"
+ $ hg unbundle $TESTDIR/bundles/remote.hg
adding changesets
adding manifests
adding file changes
@@ -146,4 +146,3 @@
checking files
4 files, 9 changesets, 7 total revisions
- $ cd ..
diff --git a/tests/test-push-validation.t b/tests/test-push-validation.t
index a4b49de..869d7a8 100644
--- a/tests/test-push-validation.t
+++ b/tests/test-push-validation.t
@@ -40,7 +40,7 @@ Expected to fail:
Expected to fail:
$ hg push
- pushing to $TESTTMP/test (glob)
+ pushing to $TESTTMP/test
searching for changes
adding changesets
adding manifests
@@ -50,4 +50,3 @@ Expected to fail:
abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
[255]
- $ cd ..
diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t
index 37c1589..f659d30 100644
--- a/tests/test-push-warn.t
+++ b/tests/test-push-warn.t
@@ -37,7 +37,6 @@
searching: 2 queries
query 2; still undecided: 1, sample size is: 1
2 total queries
- listing keys for "bookmarks"
new remote heads on branch 'default'
new remote head 1e108cc5548c
abort: push creates new remote head 1e108cc5548c!
@@ -117,7 +116,6 @@
pushing to ../c
searching for changes
no changes found
- [1]
$ hg push -r 3 ../c
pushing to ../c
@@ -395,7 +393,6 @@ Check prepush logic with merged branches:
$ hg init j
$ hg -R j branch a
marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
$ echo init > j/foo
$ hg -R j ci -Am init
adding foo
@@ -406,7 +403,6 @@ Check prepush logic with merged branches:
$ hg -R j ci -m a1
$ hg -R k branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ echo b > k/foo
$ hg -R k ci -m b
$ hg -R k up 0
@@ -470,13 +466,11 @@ Check prepush with new branch head on former topo non-head:
$ cd n
$ hg branch A
marked working directory as branch A
- (branches are permanent and global, did you want a bookmark?)
$ echo a >a
$ hg ci -Ama
adding a
$ hg branch B
marked working directory as branch B
- (branches are permanent and global, did you want a bookmark?)
$ echo b >b
$ hg ci -Amb
adding b
@@ -549,13 +543,11 @@ Check prepush with new branch head on former topo head:
$ cd o
$ hg branch A
marked working directory as branch A
- (branches are permanent and global, did you want a bookmark?)
$ echo a >a
$ hg ci -Ama
adding a
$ hg branch B
marked working directory as branch B
- (branches are permanent and global, did you want a bookmark?)
$ echo b >b
$ hg ci -Amb
adding b
@@ -637,7 +629,6 @@ but child is on different branch:
$ cd p
$ hg branch A
marked working directory as branch A
- (branches are permanent and global, did you want a bookmark?)
$ echo a0 >a
$ hg ci -Ama0
adding a
@@ -647,7 +638,6 @@ but child is on different branch:
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch B
marked working directory as branch B
- (branches are permanent and global, did you want a bookmark?)
$ echo b0 >b
$ hg ci -Amb0
adding b
@@ -662,7 +652,6 @@ but child is on different branch:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch -f B
marked working directory as branch B
- (branches are permanent and global, did you want a bookmark?)
$ echo a3 >a
$ hg ci -ma3
created new head
@@ -670,7 +659,6 @@ but child is on different branch:
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch -f A
marked working directory as branch A
- (branches are permanent and global, did you want a bookmark?)
$ echo b3 >b
$ hg ci -mb3
created new head
@@ -728,5 +716,3 @@ outgoing:
searching for changes
no changes found
[1]
-
- $ cd ..
diff --git a/tests/test-qrecord.t b/tests/test-qrecord.t
index ca218f3..0badb91 100644
--- a/tests/test-qrecord.t
+++ b/tests/test-qrecord.t
@@ -6,8 +6,7 @@ Create configuration
help record (no record)
$ hg help record
- record extension - commands to interactively select changes for
- commit/qrefresh
+ record extension - commands to interactively select changes for commit/qrefresh
use "hg help extensions" for information on enabling extensions
@@ -16,7 +15,7 @@ help qrecord (no record)
$ hg help qrecord
'qrecord' is provided by the following extension:
- record commands to interactively select changes for commit/qrefresh
+ record commands to interactively select changes for commit/qrefresh
use "hg help extensions" for information on enabling extensions
@@ -41,7 +40,6 @@ help record (record)
y - record this change
n - skip this change
- e - edit this change manually
s - skip remaining changes to this file
f - record remaining changes to this file
@@ -56,25 +54,23 @@ help record (record)
options:
- -A --addremove mark new/missing files as added/removed before
- committing
- --close-branch mark a branch as closed, hiding it from the branch
- list
- --amend amend the parent of the working dir
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -m --message TEXT use text as commit message
- -l --logfile FILE read commit message from file
- -d --date DATE record the specified date as commit date
- -u --user USER record the specified user as committer
- -S --subrepos recurse into subrepositories
- -w --ignore-all-space ignore white space when comparing lines
- -b --ignore-space-change ignore changes in the amount of white space
- -B --ignore-blank-lines ignore changes whose lines are all blank
+ -A --addremove mark new/missing files as added/removed before
+ committing
+ --close-branch mark a branch as closed, hiding it from the branch
+ list
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -m --message TEXT use text as commit message
+ -l --logfile FILE read commit message from file
+ -d --date DATE record the specified date as commit date
+ -u --user USER record the specified user as committer
+ -w --ignore-all-space ignore white space when comparing lines
+ -b --ignore-space-change ignore changes in the amount of white space
+ -B --ignore-blank-lines ignore changes whose lines are all blank
[+] marked option can be specified multiple times
- use "hg -v help record" to show more info
+ use "hg -v help record" to show global options
help (no mq, so no qrecord)
@@ -85,7 +81,7 @@ help (no mq, so no qrecord)
See "hg help qnew" & "hg help record" for more information and usage.
- use "hg -v help qrecord" to show more info
+ use "hg -v help qrecord" to show global options
$ hg init a
@@ -110,14 +106,14 @@ help (bad mq)
$ echo "mq=nonexistant" >> $HGRCPATH
$ hg help qrecord
- *** failed to import extension mq from nonexistant: [Errno 2] * (glob)
+ *** failed to import extension mq from nonexistant: [Errno 2] No such file or directory
hg qrecord [OPTION]... PATCH [FILE]...
interactively record a new patch
See "hg help qnew" & "hg help record" for more information and usage.
- use "hg -v help qrecord" to show more info
+ use "hg -v help qrecord" to show global options
help (mq present)
@@ -133,24 +129,24 @@ help (mq present)
options:
- -e --edit edit commit message
- -g --git use git extended diff format
- -U --currentuser add "From: <current user>" to patch
- -u --user USER add "From: <USER>" to patch
- -D --currentdate add "Date: <current date>" to patch
- -d --date DATE add "Date: <DATE>" to patch
- -I --include PATTERN [+] include names matching the given patterns
- -X --exclude PATTERN [+] exclude names matching the given patterns
- -m --message TEXT use text as commit message
- -l --logfile FILE read commit message from file
- -w --ignore-all-space ignore white space when comparing lines
- -b --ignore-space-change ignore changes in the amount of white space
- -B --ignore-blank-lines ignore changes whose lines are all blank
- --mq operate on patch repository
+ -e --edit edit commit message
+ -g --git use git extended diff format
+ -U --currentuser add "From: <current user>" to patch
+ -u --user USER add "From: <USER>" to patch
+ -D --currentdate add "Date: <current date>" to patch
+ -d --date DATE add "Date: <DATE>" to patch
+ -I --include PATTERN [+] include names matching the given patterns
+ -X --exclude PATTERN [+] exclude names matching the given patterns
+ -m --message TEXT use text as commit message
+ -l --logfile FILE read commit message from file
+ -w --ignore-all-space ignore white space when comparing lines
+ -b --ignore-space-change ignore changes in the amount of white space
+ -B --ignore-blank-lines ignore changes whose lines are all blank
+ --mq operate on patch repository
[+] marked option can be specified multiple times
- use "hg -v help qrecord" to show more info
+ use "hg -v help qrecord" to show global options
$ cd a
@@ -248,22 +244,22 @@ qrecord a.patch
> EOF
diff --git a/1.txt b/1.txt
2 hunks, 2 lines changed
- examine changes to '1.txt'? [Ynesfdaq?]
+ examine changes to '1.txt'? [Ynsfdaq?]
@@ -1,3 +1,3 @@
1
-2
+2 2
3
- record change 1/4 to '1.txt'? [Ynesfdaq?]
+ record change 1/4 to '1.txt'? [Ynsfdaq?]
@@ -3,3 +3,3 @@
3
-4
+4 4
5
- record change 2/4 to '1.txt'? [Ynesfdaq?]
+ record change 2/4 to '1.txt'? [Ynsfdaq?]
diff --git a/2.txt b/2.txt
1 hunks, 1 lines changed
- examine changes to '2.txt'? [Ynesfdaq?]
+ examine changes to '2.txt'? [Ynsfdaq?]
@@ -1,5 +1,5 @@
a
-b
@@ -271,10 +267,10 @@ qrecord a.patch
c
d
e
- record change 3/4 to '2.txt'? [Ynesfdaq?]
+ record change 3/4 to '2.txt'? [Ynsfdaq?]
diff --git a/dir/a.txt b/dir/a.txt
1 hunks, 1 lines changed
- examine changes to 'dir/a.txt'? [Ynesfdaq?]
+ examine changes to 'dir/a.txt'? [Ynsfdaq?]
After qrecord a.patch 'tip'"
@@ -343,7 +339,7 @@ qrecord b.patch
> EOF
diff --git a/1.txt b/1.txt
1 hunks, 1 lines changed
- examine changes to '1.txt'? [Ynesfdaq?]
+ examine changes to '1.txt'? [Ynsfdaq?]
@@ -1,5 +1,5 @@
1
2 2
@@ -351,17 +347,17 @@ qrecord b.patch
-4
+4 4
5
- record change 1/2 to '1.txt'? [Ynesfdaq?]
+ record change 1/2 to '1.txt'? [Ynsfdaq?]
diff --git a/dir/a.txt b/dir/a.txt
1 hunks, 1 lines changed
- examine changes to 'dir/a.txt'? [Ynesfdaq?]
+ examine changes to 'dir/a.txt'? [Ynsfdaq?]
@@ -1,4 +1,4 @@
-hello world
+hello world!
someone
up
- record change 2/2 to 'dir/a.txt'? [Ynesfdaq?]
+ record change 2/2 to 'dir/a.txt'? [Ynsfdaq?]
After qrecord b.patch 'tip'
@@ -398,5 +394,3 @@ After qrecord b.patch 'tip'
After qrecord b.patch 'diff'
$ hg diff --nodates
-
- $ cd ..
diff --git a/tests/test-rebase-abort.t b/tests/test-rebase-abort.t
index 3be364e..fab0214 100644
--- a/tests/test-rebase-abort.t
+++ b/tests/test-rebase-abort.t
@@ -3,11 +3,8 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
- > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
+ > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -35,18 +32,16 @@
$ mv common.new common
$ hg ci -m L2
- $ hg phase --force --secret 2
-
$ hg tglog
- @ 4:draft 'L2'
+ @ 4: 'L2'
|
- o 3:draft 'L1'
+ o 3: 'L1'
|
- | o 2:secret 'C3'
+ | o 2: 'C3'
|/
- o 1:draft 'C2'
+ o 1: 'C2'
|
- o 0:draft 'C1'
+ o 0: 'C1'
Conflicting rebase:
@@ -54,7 +49,7 @@ Conflicting rebase:
$ hg rebase -s 3 -d 2
merging common
warning: conflicts during merge.
- merging common incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging common failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -65,15 +60,15 @@ Abort:
rebase aborted
$ hg tglog
- @ 4:draft 'L2'
+ @ 4: 'L2'
|
- o 3:draft 'L1'
+ o 3: 'L1'
|
- | o 2:secret 'C3'
+ | o 2: 'C3'
|/
- o 1:draft 'C2'
+ o 1: 'C2'
|
- o 0:draft 'C1'
+ o 0: 'C1'
$ cd ..
@@ -106,53 +101,48 @@ Constrcut new repo:
$ hg ci -Am C1
adding c
- $ hg phase --force --secret 1
- $ hg phase --public 1
-
Rebase and abort without generating new changesets:
$ hg tglog
- @ 4:draft 'C1'
+ @ 4: 'C1'
|
- o 3:draft 'B bis'
+ o 3: 'B bis'
|
- | o 2:secret 'C'
+ | o 2: 'C'
| |
- | o 1:public 'B'
+ | o 1: 'B'
|/
- o 0:public 'A'
+ o 0: 'A'
$ hg rebase -b 4 -d 2
merging c
warning: conflicts during merge.
- merging c incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging c failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
$ hg tglog
- @ 4:draft 'C1'
+ @ 4: 'C1'
|
- o 3:draft 'B bis'
+ o 3: 'B bis'
|
- | @ 2:secret 'C'
+ | @ 2: 'C'
| |
- | o 1:public 'B'
+ | o 1: 'B'
|/
- o 0:public 'A'
+ o 0: 'A'
$ hg rebase -a
rebase aborted
$ hg tglog
- @ 4:draft 'C1'
+ @ 4: 'C1'
|
- o 3:draft 'B bis'
+ o 3: 'B bis'
|
- | o 2:secret 'C'
+ | o 2: 'C'
| |
- | o 1:public 'B'
+ | o 1: 'B'
|/
- o 0:public 'A'
+ o 0: 'A'
-
- $ cd ..
diff --git a/tests/test-rebase-bookmarks.t b/tests/test-rebase-bookmarks.t
index fe5a251..4186be9 100644
--- a/tests/test-rebase-bookmarks.t
+++ b/tests/test-rebase-bookmarks.t
@@ -3,9 +3,6 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' bookmarks: {bookmarks}\n"
> EOF
@@ -36,10 +33,8 @@ Create a repo with several bookmarks
adding d
created new head
- $ hg book W
-
$ hg tglog
- @ 3: 'D' bookmarks: W
+ @ 3: 'D' bookmarks:
|
| o 2: 'C' bookmarks: Y Z
| |
@@ -56,13 +51,13 @@ Move only rebased bookmarks
$ cd a1
$ hg up -q Z
- $ hg rebase -s Y -d 3
+ $ hg rebase --detach -s Y -d 3
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@ 3: 'C' bookmarks: Y Z
|
- o 2: 'D' bookmarks: W
+ o 2: 'D' bookmarks:
|
| o 1: 'B' bookmarks: X
|/
@@ -84,30 +79,7 @@ Keep bookmarks to the correct rebased changeset
|
o 2: 'B' bookmarks: X
|
- o 1: 'D' bookmarks: W
+ o 1: 'D' bookmarks:
|
o 0: 'A' bookmarks:
-
-Keep active bookmark on the correct changeset
-
- $ cd ..
- $ hg clone -q a a3
-
- $ cd a3
- $ hg up -q X
-
- $ hg rebase -d W
- saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 3: 'C' bookmarks: Y Z
- |
- o 2: 'B' bookmarks: X
- |
- o 1: 'D' bookmarks: W
- |
- o 0: 'A' bookmarks:
-
-
- $ cd ..
diff --git a/tests/test-rebase-cache.t b/tests/test-rebase-cache.t
index 81fa012..4792b55 100644
--- a/tests/test-rebase-cache.t
+++ b/tests/test-rebase-cache.t
@@ -2,10 +2,6 @@
> [extensions]
> graphlog=
> rebase=
- > mq=
- >
- > [phases]
- > publish=False
>
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
@@ -21,7 +17,6 @@
$ hg branch branch1
marked working directory as branch branch1
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'branch1'
$ echo b > b
@@ -32,7 +27,6 @@
$ hg branch branch2
marked working directory as branch branch2
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'branch2'
$ echo c > C
@@ -43,7 +37,6 @@
$ hg branch -f branch2
marked working directory as branch branch2
- (branches are permanent and global, did you want a bookmark?)
$ echo d > d
$ hg ci -Am D
adding d
@@ -58,7 +51,6 @@
$ hg branch branch3
marked working directory as branch branch3
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m 'branch3'
$ echo f > f
@@ -105,7 +97,7 @@ Rebase part of branch2 (5-6) onto branch3 (8):
2: 'B' branch1
0: 'A'
- $ hg rebase -s 5 -d 8
+ $ hg rebase --detach -s 5 -d 8
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
$ hg branches
@@ -166,7 +158,7 @@ Rebase head of branch3 (8) onto branch2 (6):
|/
o 0: 'A'
- $ hg rebase -s 8 -d 6
+ $ hg rebase --detach -s 8 -d 6
saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
$ hg branches
@@ -230,7 +222,7 @@ Rebase entire branch3 (7-8) onto branch2 (6):
|/
o 0: 'A'
- $ hg rebase -s 7 -d 6
+ $ hg rebase --detach -s 7 -d 6
saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
$ hg branches
@@ -263,125 +255,3 @@ Rebase entire branch3 (7-8) onto branch2 (6):
$ hg verify -q
-Stripping multiple branches in one go bypasses the fast-case code to
-update the branch cache.
-
- $ hg strip 2
- 0 files updated, 0 files merged, 4 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- o 3: 'C' branch2
- |
- o 2: 'branch2' branch2
- |
- | @ 1: 'branch1' branch1
- |/
- o 0: 'A'
-
-
- $ hg branches
- branch2 3:e4fdb121d036
- branch1 1:63379ac49655
- default 0:1994f17a630e (inactive)
-
- $ hg theads
- 3: 'C' branch2
- 1: 'branch1' branch1
- 0: 'A'
-
-Fast path branchcache code should not be invoked if branches stripped is not
-the same as branches remaining.
-
- $ hg init b
- $ cd b
-
- $ hg branch branch1
- marked working directory as branch branch1
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -m 'branch1'
-
- $ hg branch branch2
- marked working directory as branch branch2
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -m 'branch2'
-
- $ hg branch -f branch1
- marked working directory as branch branch1
- (branches are permanent and global, did you want a bookmark?)
-
- $ echo a > A
- $ hg ci -Am A
- adding A
- created new head
-
- $ hg tglog
- @ 2: 'A' branch1
- |
- o 1: 'branch2' branch2
- |
- o 0: 'branch1' branch1
-
-
- $ hg theads
- 2: 'A' branch1
- 1: 'branch2' branch2
-
- $ hg strip 2
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/a3/b/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg theads
- 1: 'branch2' branch2
- 0: 'branch1' branch1
-
-
-Make sure requesting to strip a revision already stripped does not confuse things.
-Try both orders.
-
- $ cd ..
-
- $ hg init c
- $ cd c
-
- $ echo a > a
- $ hg ci -Am A
- adding a
- $ echo b > b
- $ hg ci -Am B
- adding b
- $ echo c > c
- $ hg ci -Am C
- adding c
- $ echo d > d
- $ hg ci -Am D
- adding d
- $ echo e > e
- $ hg ci -Am E
- adding e
-
- $ hg tglog
- @ 4: 'E'
- |
- o 3: 'D'
- |
- o 2: 'C'
- |
- o 1: 'B'
- |
- o 0: 'A'
-
-
- $ hg strip 3 4
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg theads
- 2: 'C'
-
- $ hg strip 2 1
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/a3/c/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg theads
- 0: 'A'
diff --git a/tests/test-rebase-check-restore.t b/tests/test-rebase-check-restore.t
index c664725..779e29d 100644
--- a/tests/test-rebase-check-restore.t
+++ b/tests/test-rebase-check-restore.t
@@ -3,11 +3,8 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
- > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
+ > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -39,36 +36,34 @@
$ hg branch 'notdefault'
marked working directory as branch notdefault
- (branches are permanent and global, did you want a bookmark?)
$ echo F >> A
$ hg ci -m F
$ cd ..
-Rebasing B onto E - check keep: and phases
+Rebasing B onto E - check keep:
$ hg clone -q -u . a a1
$ cd a1
- $ hg phase --force --secret 2
$ hg tglog
- @ 5:draft 'F' notdefault
+ @ 5: 'F' notdefault
|
- | o 4:draft 'E'
+ | o 4: 'E'
| |
- | o 3:draft 'D'
+ | o 3: 'D'
|/
- | o 2:secret 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg rebase -s 1 -d 4 --keep
merging A
warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging A failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -80,21 +75,21 @@ Solve the conflict and go on:
$ hg rebase --continue
$ hg tglog
- @ 7:secret 'C'
+ @ 7: 'C'
|
- o 6:draft 'B'
+ o 6: 'B'
|
- | o 5:draft 'F' notdefault
+ | o 5: 'F' notdefault
| |
- o | 4:draft 'E'
+ o | 4: 'E'
| |
- o | 3:draft 'D'
+ o | 3: 'D'
|/
- | o 2:secret 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ cd ..
@@ -103,25 +98,24 @@ Rebase F onto E - check keepbranches:
$ hg clone -q -u . a a2
$ cd a2
- $ hg phase --force --secret 2
$ hg tglog
- @ 5:draft 'F' notdefault
+ @ 5: 'F' notdefault
|
- | o 4:draft 'E'
+ | o 4: 'E'
| |
- | o 3:draft 'D'
+ | o 3: 'D'
|/
- | o 2:secret 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg rebase -s 5 -d 4 --keepbranches
merging A
warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging A failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -134,17 +128,15 @@ Solve the conflict and go on:
saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
- @ 5:draft 'F' notdefault
+ @ 5: 'F' notdefault
|
- o 4:draft 'E'
+ o 4: 'E'
|
- o 3:draft 'D'
+ o 3: 'D'
|
- | o 2:secret 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
-
- $ cd ..
diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t
index a89b8fe..1266f82 100644
--- a/tests/test-rebase-collapse.t
+++ b/tests/test-rebase-collapse.t
@@ -2,21 +2,16 @@
> [extensions]
> graphlog=
> rebase=
- > mq=
- >
- > [phases]
- > publish=False
>
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
- > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
> EOF
Create repo a:
$ hg init a
$ cd a
- $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+ $ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
@@ -45,31 +40,28 @@ Create repo a:
$ cd ..
-Rebasing B onto H and collapsing changesets with different phases:
-
+Rebasing B onto H:
$ hg clone -q -u 3 a a1
$ cd a1
- $ hg phase --force --secret 3
-
$ hg rebase --collapse --keepbranches
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
- $ hg tglogp
- @ 5:secret 'Collapsed revision
+ $ hg tglog
+ @ 5: 'Collapsed revision
| * B
| * C
| * D'
- o 4:draft 'H'
+ o 4: 'H'
|
- | o 3:draft 'G'
+ | o 3: 'G'
|/|
- o | 2:draft 'F'
+ o | 2: 'F'
| |
- | o 1:draft 'E'
+ | o 1: 'E'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg manifest
A
@@ -82,13 +74,12 @@ Rebasing B onto H and collapsing changesets with different phases:
$ cd ..
-Rebasing E onto H:
+Rebasing G onto H:
$ hg clone -q -u . a a2
$ cd a2
- $ hg phase --force --secret 6
- $ hg rebase --source 4 --collapse
+ $ hg rebase --base 6 --collapse
saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -124,7 +115,7 @@ Rebasing G onto H with custom message:
abort: message can only be specified with collapse
[255]
- $ hg rebase --source 4 --collapse -m 'custom message'
+ $ hg rebase --base 6 --collapse -m 'custom message'
saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -231,7 +222,7 @@ Rebase and collapse - more than one external (fail):
Rebase and collapse - E onto H:
- $ hg rebase -s 4 --collapse # root (4) is not a merge
+ $ hg rebase -s 4 --collapse
saved backup bundle to $TESTTMP/b1/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -251,6 +242,7 @@ Rebase and collapse - E onto H:
$ hg manifest
A
+ B
C
D
E
@@ -260,44 +252,6 @@ Rebase and collapse - E onto H:
$ cd ..
-
-
-Test that branchheads cache is updated correctly when doing a strip in which
-the parent of the ancestor node to be stripped does not become a head and
-also, the parent of a node that is a child of the node stripped becomes a head
-(node 3).
-
- $ hg clone -q -u . b b2
- $ cd b2
-
- $ hg heads --template="{rev}:{node} {branch}\n"
- 7:c65502d4178782309ce0574c5ae6ee9485a9bafa default
- 6:c772a8b2dc17629cec88a19d09c926c4814b12c7 default
-
- $ cat $TESTTMP/b2/.hg/cache/branchheads
- c65502d4178782309ce0574c5ae6ee9485a9bafa 7
- c772a8b2dc17629cec88a19d09c926c4814b12c7 default
- c65502d4178782309ce0574c5ae6ee9485a9bafa default
-
- $ hg strip 4
- saved backup bundle to $TESTTMP/b2/.hg/strip-backup/8a5212ebc852-backup.hg (glob)
-
- $ cat $TESTTMP/b2/.hg/cache/branchheads
- c65502d4178782309ce0574c5ae6ee9485a9bafa 4
- 2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
- c65502d4178782309ce0574c5ae6ee9485a9bafa default
-
- $ hg heads --template="{rev}:{node} {branch}\n"
- 4:c65502d4178782309ce0574c5ae6ee9485a9bafa default
- 3:2870ad076e541e714f3c2bc32826b5c6a6e5b040 default
-
- $ cd ..
-
-
-
-
-
-
Create repo c:
$ hg init c
@@ -378,7 +332,7 @@ Rebase and collapse - E onto I:
$ hg clone -q -u . c c1
$ cd c1
- $ hg rebase -s 4 --collapse # root (4) is not a merge
+ $ hg rebase -s 4 --collapse
merging E
saved backup bundle to $TESTTMP/c1/.hg/strip-backup/*-backup.hg (glob)
@@ -400,6 +354,7 @@ Rebase and collapse - E onto I:
$ hg manifest
A
+ B
C
D
E
@@ -497,14 +452,12 @@ Interactions between collapse and keepbranches
$ hg branch '1'
marked working directory as branch 1
- (branches are permanent and global, did you want a bookmark?)
$ echo 'b' > b
$ hg ci -Am 'B'
adding b
$ hg branch '2'
marked working directory as branch 2
- (branches are permanent and global, did you want a bookmark?)
$ echo 'c' > c
$ hg ci -Am 'C'
adding c
@@ -527,196 +480,3 @@ Interactions between collapse and keepbranches
abort: cannot collapse multiple named branches
[255]
- $ repeatchange() {
- > hg checkout $1
- > hg cp d z
- > echo blah >> z
- > hg commit -Am "$2" --user "$3"
- > }
- $ repeatchange 3 "E" "user1"
- 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ repeatchange 3 "E" "user2"
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- created new head
- $ hg tglog
- @ 5: 'E'
- |
- | o 4: 'E'
- |/
- o 3: 'D'
- |
- | o 2: 'C' 2
- | |
- | o 1: 'B' 1
- |/
- o 0: 'A'
-
- $ hg rebase -s 5 -d 4
- saved backup bundle to $TESTTMP/e/.hg/strip-backup/*-backup.hg (glob)
- $ hg tglog
- @ 4: 'E'
- |
- o 3: 'D'
- |
- | o 2: 'C' 2
- | |
- | o 1: 'B' 1
- |/
- o 0: 'A'
-
- $ hg export tip
- # HG changeset patch
- # User user1
- # Date 0 0
- # Node ID f338eb3c2c7cc5b5915676a2376ba7ac558c5213
- # Parent 41acb9dca9eb976e84cd21fcb756b4afa5a35c09
- E
-
- diff -r 41acb9dca9eb -r f338eb3c2c7c z
- --- /dev/null Thu Jan 01 00:00:00 1970 +0000
- +++ b/z Thu Jan 01 00:00:00 1970 +0000
- @@ -0,0 +1,2 @@
- +d
- +blah
-
- $ cd ..
-
-Rebase, collapse and copies
-
- $ hg init copies
- $ cd copies
- $ hg unbundle "$TESTDIR/bundles/renames.hg"
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 11 changes to 7 files (+1 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hg up -q tip
- $ hg tglog
- @ 3: 'move2'
- |
- o 2: 'move1'
- |
- | o 1: 'change'
- |/
- o 0: 'add'
-
- $ hg rebase --collapse -d 1
- merging a and d to d
- merging b and e to e
- merging c and f to f
- merging e and g to g
- merging f and c to c
- saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
- $ hg st
- $ hg st --copies --change .
- A d
- a
- A g
- b
- R b
- $ cat c
- c
- c
- $ cat d
- a
- a
- $ cat g
- b
- b
- $ hg log -r . --template "{file_copies}\n"
- d (a)g (b)
-
-Test collapsing a middle revision in-place
-
- $ hg tglog
- @ 2: 'Collapsed revision
- | * move1
- | * move2'
- o 1: 'change'
- |
- o 0: 'add'
-
- $ hg rebase --collapse -r 1 -d 0
- abort: can't remove original changesets with unrebased descendants
- (use --keep to keep original changesets)
- [255]
-
-Test collapsing in place
-
- $ hg rebase --collapse -b . -d 0
- saved backup bundle to $TESTTMP/copies/.hg/strip-backup/*-backup.hg (glob)
- $ hg st --change . --copies
- M a
- M c
- A d
- a
- A g
- b
- R b
- $ cat a
- a
- a
- $ cat c
- c
- c
- $ cat d
- a
- a
- $ cat g
- b
- b
- $ cd ..
-
-
-Test stripping a revision with another child
-
- $ hg init f
- $ cd f
-
- $ echo A > A
- $ hg ci -Am A
- adding A
- $ echo B > B
- $ hg ci -Am B
- adding B
-
- $ hg up -q 0
-
- $ echo C > C
- $ hg ci -Am C
- adding C
- created new head
-
- $ hg tglog
- @ 2: 'C'
- |
- | o 1: 'B'
- |/
- o 0: 'A'
-
-
-
- $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
- 2:c5cefa58fd557f84b72b87f970135984337acbc5 default: C
- 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
-
- $ hg strip 2
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- saved backup bundle to $TESTTMP/f/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- o 1: 'B'
- |
- @ 0: 'A'
-
-
-
- $ hg heads --template="{rev}:{node} {branch}: {desc}\n"
- 1:27547f69f25460a52fff66ad004e58da7ad3fb56 default: B
-
- $ cd ..
-
-
-
-
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
index 9d0a156..2ee4bdd 100644
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -3,11 +3,8 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
- > tglog = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
+ > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
$ hg init a
@@ -37,20 +34,18 @@
$ hg add extra2
$ hg ci -m L3
- $ hg phase --force --secret 4
-
$ hg tglog
- @ 5:secret 'L3'
+ @ 5: 'L3'
|
- o 4:secret 'L2'
+ o 4: 'L2'
|
- o 3:draft 'L1'
+ o 3: 'L1'
|
- | o 2:draft 'C3'
+ | o 2: 'C3'
|/
- o 1:draft 'C2'
+ o 1: 'C2'
|
- o 0:draft 'C1'
+ o 0: 'C1'
Try to call --continue:
@@ -63,7 +58,7 @@ Conflicting rebase:
$ hg rebase -s 3 -d 2
merging common
warning: conflicts during merge.
- merging common incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging common failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -81,17 +76,17 @@ Conclude rebase:
saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
- @ 5:secret 'L3'
+ @ 5: 'L3'
|
- o 4:secret 'L2'
+ o 4: 'L2'
|
- o 3:draft 'L1'
+ o 3: 'L1'
|
- o 2:draft 'C3'
+ o 2: 'C3'
|
- o 1:draft 'C2'
+ o 1: 'C2'
|
- o 0:draft 'C1'
+ o 0: 'C1'
Check correctness:
@@ -118,4 +113,3 @@ Check correctness:
$ hg cat -r 5 common
resolved merge
- $ cd ..
diff --git a/tests/test-rebase-detach.t b/tests/test-rebase-detach.t
index cacc754..35ce8f0 100644
--- a/tests/test-rebase-detach.t
+++ b/tests/test-rebase-detach.t
@@ -3,9 +3,6 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -13,7 +10,7 @@
$ hg init a
$ cd a
- $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+ $ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
@@ -47,26 +44,25 @@ Rebasing D onto H detaching from C:
|/
o 0: 'A'
- $ hg phase --force --secret 3
- $ hg rebase -s 3 -d 7
+ $ hg rebase --detach -s 3 -d 7
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
- $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
- @ 7:secret 'D'
+ $ hg tglog
+ @ 7: 'D'
|
- o 6:draft 'H'
+ o 6: 'H'
|
- | o 5:draft 'G'
+ | o 5: 'G'
|/|
- o | 4:draft 'F'
+ o | 4: 'F'
| |
- | o 3:draft 'E'
+ | o 3: 'E'
|/
- | o 2:draft 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg manifest
A
@@ -99,7 +95,7 @@ Rebasing C onto H detaching from B:
|/
o 0: 'A'
- $ hg rebase -s 2 -d 7
+ $ hg rebase --detach -s 2 -d 7
saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -151,7 +147,7 @@ Rebasing B onto H using detach (same as not using it):
|/
o 0: 'A'
- $ hg rebase -s 1 -d 7
+ $ hg rebase --detach -s 1 -d 7
saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -186,7 +182,6 @@ Rebasing C onto H detaching from B and collapsing:
$ hg clone -q -u . a a4
$ cd a4
- $ hg phase --force --secret 3
$ hg tglog
@ 7: 'H'
@@ -205,24 +200,24 @@ Rebasing C onto H detaching from B and collapsing:
|/
o 0: 'A'
- $ hg rebase --collapse -s 2 -d 7
+ $ hg rebase --detach --collapse -s 2 -d 7
saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
- $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
- @ 6:secret 'Collapsed revision
+ $ hg tglog
+ @ 6: 'Collapsed revision
| * C
| * D'
- o 5:draft 'H'
+ o 5: 'H'
|
- | o 4:draft 'G'
+ | o 4: 'G'
|/|
- o | 3:draft 'F'
+ o | 3: 'F'
| |
- | o 2:draft 'E'
+ | o 2: 'E'
|/
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ hg manifest
A
@@ -264,7 +259,7 @@ Rebasing across null as ancestor
|/
o 0: 'A'
- $ hg rebase -s 1 -d tip
+ $ hg rebase --detach -s 1 -d tip
saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -286,115 +281,3 @@ Rebasing across null as ancestor
|/
o 0: 'A'
-
- $ hg rebase -d 5 -s 7
- saved backup bundle to $TESTTMP/a5/.hg/strip-backup/13547172c9c0-backup.hg (glob)
- $ hg tglog
- @ 8: 'D'
- |
- o 7: 'C'
- |
- | o 6: 'B'
- |/
- o 5: 'extra branch'
-
- o 4: 'H'
- |
- | o 3: 'G'
- |/|
- o | 2: 'F'
- | |
- | o 1: 'E'
- |/
- o 0: 'A'
-
- $ cd ..
-
-Verify that target is not selected as external rev (issue3085)
-
- $ hg clone -q -U a a6
- $ cd a6
- $ hg up -q 6
-
- $ echo "I" >> E
- $ hg ci -m "I"
- $ hg merge 7
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m "Merge"
- $ echo "J" >> F
- $ hg ci -m "J"
-
- $ hg rebase -s 8 -d 7 --collapse --config ui.merge=internal:other
- remote changed E which local deleted
- use (c)hanged version or leave (d)eleted? c
- saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 8: 'Collapsed revision
- | * I
- | * Merge
- | * J'
- o 7: 'H'
- |
- | o 6: 'G'
- |/|
- o | 5: 'F'
- | |
- | o 4: 'E'
- |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- | o 1: 'B'
- |/
- o 0: 'A'
-
-
- $ hg parents
- changeset: 8:9472f4b1d736
- tag: tip
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: Collapsed revision
-
-
- $ cd ..
-
-Ensure --continue restores a correct state (issue3046) and phase:
- $ hg clone -q a a7
- $ cd a7
- $ hg up -q 3
- $ echo 'H2' > H
- $ hg ci -A -m 'H2'
- adding H
- $ hg phase --force --secret 8
- $ hg rebase -s 8 -d 7 --config ui.merge=internal:fail
- merging H
- warning: conflicts during merge.
- merging H incomplete! (edit conflicts, then use 'hg resolve --mark')
- abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
- [255]
- $ hg resolve --all -t internal:local
- $ hg rebase -c
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6215fafa5447-backup.hg (glob)
- $ hg log -G --template "{rev}:{phase} '{desc}' {branches}\n"
- @ 7:draft 'H'
- |
- | o 6:draft 'G'
- |/|
- o | 5:draft 'F'
- | |
- | o 4:draft 'E'
- |/
- | o 3:draft 'D'
- | |
- | o 2:draft 'C'
- | |
- | o 1:draft 'B'
- |/
- o 0:draft 'A'
-
-
- $ cd ..
diff --git a/tests/test-rebase-interruptions.t b/tests/test-rebase-interruptions.t
index 28fd76e..15251be 100644
--- a/tests/test-rebase-interruptions.t
+++ b/tests/test-rebase-interruptions.t
@@ -3,12 +3,8 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
- > tglogp = log -G --template "{rev}:{phase} '{desc}' {branches}\n"
> EOF
@@ -60,7 +56,7 @@ Rebasing B onto E:
$ hg rebase -s 1 -d 4
merging A
warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging A failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -72,31 +68,27 @@ Force a commit on C during the interruption:
$ hg add Extra
$ hg ci -m 'Extra'
-Force this commit onto secret phase
-
- $ hg phase --force --secret 6
-
- $ hg tglogp
- @ 6:secret 'Extra'
+ $ hg tglog
+ @ 6: 'Extra'
|
- | o 5:draft 'B'
+ | o 5: 'B'
| |
- | o 4:draft 'E'
+ | o 4: 'E'
| |
- | o 3:draft 'D'
+ | o 3: 'D'
| |
- o | 2:draft 'C'
+ o | 2: 'C'
| |
- o | 1:draft 'B'
+ o | 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
Resume the rebasing:
$ hg rebase --continue
merging A
warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging A failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -109,22 +101,22 @@ Solve the conflict and go on:
$ hg rebase --continue
warning: new changesets detected on source branch, not stripping
- $ hg tglogp
- @ 7:draft 'C'
+ $ hg tglog
+ @ 7: 'C'
|
- | o 6:secret 'Extra'
+ | o 6: 'Extra'
| |
- o | 5:draft 'B'
+ o | 5: 'B'
| |
- o | 4:draft 'E'
+ o | 4: 'E'
| |
- o | 3:draft 'D'
+ o | 3: 'D'
| |
- | o 2:draft 'C'
+ | o 2: 'C'
| |
- | o 1:draft 'B'
+ | o 1: 'B'
|/
- o 0:draft 'A'
+ o 0: 'A'
$ cd ..
@@ -150,7 +142,7 @@ Rebasing B onto E:
$ hg rebase -s 1 -d 4
merging A
warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging A failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -200,69 +192,3 @@ Abort the rebasing:
$ cd ..
-Changes during an interruption - abort (again):
-
- $ hg clone -q -u . a a3
- $ cd a3
-
- $ hg tglogp
- @ 4:draft 'E'
- |
- o 3:draft 'D'
- |
- | o 2:draft 'C'
- | |
- | o 1:draft 'B'
- |/
- o 0:draft 'A'
-
-Rebasing B onto E:
-
- $ hg rebase -s 1 -d 4
- merging A
- warning: conflicts during merge.
- merging A incomplete! (edit conflicts, then use 'hg resolve --mark')
- abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
- [255]
-
-Change phase on B and B'
-
- $ hg up -q -C 5
- $ hg phase --public 1
- $ hg phase --public 5
- $ hg phase --secret -f 2
-
- $ hg tglogp
- @ 5:public 'B'
- |
- o 4:public 'E'
- |
- o 3:public 'D'
- |
- | o 2:secret 'C'
- | |
- | o 1:public 'B'
- |/
- o 0:public 'A'
-
-Abort the rebasing:
-
- $ hg rebase --abort
- abort: can't abort rebase due to immutable changesets 45396c49d53b
- (see hg help phases for details)
- [255]
-
- $ hg tglogp
- @ 5:public 'B'
- |
- o 4:public 'E'
- |
- o 3:public 'D'
- |
- | o 2:secret 'C'
- | |
- | o 1:public 'B'
- |/
- o 0:public 'A'
-
- $ cd ..
diff --git a/tests/test-rebase-issue-noparam-single-rev.t b/tests/test-rebase-issue-noparam-single-rev.t
index 6e96ee7..38f7e79 100644
--- a/tests/test-rebase-issue-noparam-single-rev.t
+++ b/tests/test-rebase-issue-noparam-single-rev.t
@@ -3,9 +3,6 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -124,5 +121,3 @@ Rebase with no arguments - single revision in target branch:
|
o 0: 'c1'
-
- $ cd ..
diff --git a/tests/test-rebase-mq-skip.t b/tests/test-rebase-mq-skip.t
index 8d70458..75384ee 100644
--- a/tests/test-rebase-mq-skip.t
+++ b/tests/test-rebase-mq-skip.t
@@ -7,9 +7,6 @@ already has one local mq patch
> rebase=
> mq=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n"
> EOF
@@ -117,7 +114,9 @@ already has one local mq patch
saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
- @ 8: 'r5' tags: 5.diff qtip tip
+ @ 9: 'r5' tags: 5.diff qtip tip
+ |
+ o 8: 'r4' tags: 4.diff
|
o 7: 'r2' tags: 2.diff qbase
|
@@ -135,5 +134,3 @@ already has one local mq patch
|
o 0: 'r0' tags:
-
- $ cd ..
diff --git a/tests/test-rebase-mq.t b/tests/test-rebase-mq.t
index 7301ebe..3d3579c 100644
--- a/tests/test-rebase-mq.t
+++ b/tests/test-rebase-mq.t
@@ -62,7 +62,7 @@ Rebase - generate a conflict:
$ hg rebase -s 2 -d 1
merging f
warning: conflicts during merge.
- merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging f failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -73,7 +73,7 @@ Fix the 1st conflict:
$ hg rebase -c
merging f
warning: conflicts during merge.
- merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging f failed!
abort: unresolved conflicts (see hg resolve, then hg rebase --continue)
[255]
@@ -235,7 +235,6 @@ Rebase the applied mq patches:
-mq1
+mq2
- $ cd ..
Rebase with guards
@@ -245,48 +244,32 @@ Rebase with guards
$ hg ci -Am a
adding a
-Create mq repo with guarded patches foo and bar and empty patch:
+Create mq repo with guarded patches foo and bar:
$ hg qinit
- $ echo guarded > guarded
- $ hg add guarded
- $ hg qnew guarded
- $ hg qnew empty-important -m 'important commit message'
- $ echo bar > bar
- $ hg add bar
- $ hg qnew bar
+ $ hg qnew foo
+ $ hg qguard foo +baz
$ echo foo > foo
$ hg add foo
- $ hg qnew foo
- $ hg qpop -a
+ $ hg qref
+ $ hg qpop
popping foo
- popping bar
- popping empty-important
- popping guarded
patch queue now empty
- $ hg qguard guarded +guarded
+
+ $ hg qnew bar
$ hg qguard bar +baz
- $ hg qguard foo +baz
- $ hg qselect baz
- number of unguarded, unapplied patches has changed from 1 to 3
- $ hg qpush bar
- applying empty-important
- patch empty-important is empty
- applying bar
- now at: bar
+ $ echo bar > bar
+ $ hg add bar
+ $ hg qref
$ hg qguard -l
- guarded: +guarded
- empty-important: unguarded
bar: +baz
foo: +baz
$ hg tglog
- @ 2: 'imported patch bar' tags: bar qtip tip
+ @ 1:* '[mq]: bar' tags: bar qbase qtip tip (glob)
|
- o 1: 'important commit message' tags: empty-important qbase
- |
- o 0: 'a' tags: qparent
+ o 0:* 'a' tags: qparent (glob)
Create new head to rebase bar onto:
@@ -296,40 +279,30 @@ Create new head to rebase bar onto:
$ hg add b
$ hg ci -m b
created new head
- $ hg up -C 2
+ $ hg up -C 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo a >> a
$ hg qref
$ hg tglog
- @ 3: '[mq]: bar' tags: bar qtip tip
+ @ 2:* '[mq]: bar' tags: bar qbase qtip tip (glob)
|
- | o 2: 'b' tags:
- | |
- o | 1: 'important commit message' tags: empty-important qbase
+ | o 1:* 'b' tags: (glob)
|/
- o 0: 'a' tags: qparent
+ o 0:* 'a' tags: qparent (glob)
-Rebase bar (make sure series order is preserved and empty-important also is
-removed from the series):
+Rebase bar (make sure series order is preserved):
$ hg qseries
- guarded
- empty-important
bar
foo
- $ [ -f .hg/patches/empty-important ]
- $ hg -q rebase -d 2
+ $ hg -q rebase -d 1
$ hg qseries
- guarded
bar
foo
- $ [ -f .hg/patches/empty-important ]
- [1]
$ hg qguard -l
- guarded: +guarded
bar: +baz
foo: +baz
@@ -340,4 +313,3 @@ removed from the series):
|
o 0:* 'a' tags: (glob)
- $ cd ..
diff --git a/tests/test-rebase-named-branches.t b/tests/test-rebase-named-branches.t
index 0f2f904..1f92f8d 100644
--- a/tests/test-rebase-named-branches.t
+++ b/tests/test-rebase-named-branches.t
@@ -3,16 +3,13 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
$ hg init a
$ cd a
- $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+ $ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
@@ -22,82 +19,24 @@
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd ..
+
+Rebasing descendant onto ancestor across different named branches
+
$ hg clone -q -u . a a1
$ cd a1
- $ hg update 3
- 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ hg branch dev-one
- marked working directory as branch dev-one
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -m 'dev-one named branch'
-
- $ hg update 7
- 2 files updated, 0 files merged, 3 files removed, 0 files unresolved
- $ hg branch dev-two
- marked working directory as branch dev-two
- (branches are permanent and global, did you want a bookmark?)
+ $ hg branch dev
+ marked working directory as branch dev
$ echo x > x
$ hg add x
- $ hg ci -m 'dev-two named branch'
-
- $ hg tglog
- @ 9: 'dev-two named branch' dev-two
- |
- | o 8: 'dev-one named branch' dev-one
- | |
- o | 7: 'H'
- | |
- +---o 6: 'G'
- | | |
- o | | 5: 'F'
- | | |
- +---o 4: 'E'
- | |
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- | o 1: 'B'
- |/
- o 0: 'A'
-
-
-Branch name containing a dash (issue3181)
-
- $ hg rebase -b dev-two -d dev-one --keepbranches
- saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
+ $ hg ci -m 'extra named branch'
$ hg tglog
- @ 9: 'dev-two named branch' dev-two
- |
- o 8: 'H'
- |
- | o 7: 'G'
- |/|
- o | 6: 'F'
- | |
- o | 5: 'dev-one named branch' dev-one
- | |
- | o 4: 'E'
- | |
- o | 3: 'D'
- | |
- o | 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
- $ hg rebase -s dev-one -d 0 --keepbranches
- saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 8: 'dev-two named branch' dev-two
+ @ 8: 'extra named branch' dev
|
o 7: 'H'
|
@@ -115,82 +54,7 @@ Branch name containing a dash (issue3181)
|/
o 0: 'A'
- $ hg update 3
- 3 files updated, 0 files merged, 3 files removed, 0 files unresolved
- $ hg branch dev-one
- marked working directory as branch dev-one
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -m 'dev-one named branch'
- $ hg tglog
- @ 9: 'dev-one named branch' dev-one
- |
- | o 8: 'dev-two named branch' dev-two
- | |
- | o 7: 'H'
- | |
- | | o 6: 'G'
- | |/|
- | o | 5: 'F'
- | | |
- | | o 4: 'E'
- | |/
- o | 3: 'D'
- | |
- o | 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
- $ hg rebase -b 'max(branch("dev-two"))' -d dev-one --keepbranches
- saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 9: 'dev-two named branch' dev-two
- |
- o 8: 'H'
- |
- | o 7: 'G'
- |/|
- o | 6: 'F'
- | |
- o | 5: 'dev-one named branch' dev-one
- | |
- | o 4: 'E'
- | |
- o | 3: 'D'
- | |
- o | 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
- $ hg rebase -s 'max(branch("dev-one"))' -d 0 --keepbranches
- saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 8: 'dev-two named branch' dev-two
- |
- o 7: 'H'
- |
- | o 6: 'G'
- |/|
- o | 5: 'F'
- | |
- | o 4: 'E'
- |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- | o 1: 'B'
- |/
- o 0: 'A'
-
-
-Rebasing descendant onto ancestor across different named branches
$ hg rebase -s 1 -d 8 --keepbranches
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
@@ -202,7 +66,7 @@ Rebasing descendant onto ancestor across different named branches
|
o 6: 'B'
|
- o 5: 'dev-two named branch' dev-two
+ o 5: 'extra named branch' dev
|
o 4: 'H'
|
@@ -228,7 +92,7 @@ Rebasing descendant onto ancestor across different named branches
|
o 6: 'B'
|
- o 5: 'dev-two named branch'
+ o 5: 'extra named branch'
|
o 4: 'H'
|
diff --git a/tests/test-rebase-newancestor.t b/tests/test-rebase-newancestor.t
index 949c5d2..17a6ab7 100644
--- a/tests/test-rebase-newancestor.t
+++ b/tests/test-rebase-newancestor.t
@@ -52,5 +52,3 @@
|
o 0: 'A'
-
- $ cd ..
diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t
index 6597f75..98df15e 100644
--- a/tests/test-rebase-parameters.t
+++ b/tests/test-rebase-parameters.t
@@ -3,9 +3,6 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -13,7 +10,7 @@
$ hg init a
$ cd a
- $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+ $ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
@@ -54,8 +51,8 @@ These fail:
$ cd a1
$ hg rebase -s 8 -d 7
- nothing to rebase
- [1]
+ abort: source is descendant of destination
+ [255]
$ hg rebase --continue --abort
abort: cannot use both abort and continue
@@ -70,13 +67,6 @@ These fail:
[255]
$ hg rebase --base 5 --source 4
- abort: cannot specify both a source and a base
- [255]
-
- $ hg rebase --rev 5 --source 4
- abort: cannot specify both a revision and a source
- [255]
- $ hg rebase --base 5 --rev 4
abort: cannot specify both a revision and a base
[255]
@@ -86,7 +76,7 @@ These fail:
$ hg up -q 7
- $ hg rebase --traceback
+ $ hg rebase
nothing to rebase
[1]
@@ -158,12 +148,12 @@ Rebase with base == '.' => same as no arguments (from 3 onto 8):
$ cd ..
-Rebase with dest == branch(.) => same as no arguments (from 3 onto 8):
+Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8):
$ hg clone -q -u 3 a a3
$ cd a3
- $ hg rebase --dest 'branch(.)'
+ $ hg rebase --dest `hg branch`
saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -193,25 +183,25 @@ Specify only source (from 2 onto 8):
$ hg clone -q -u . a a4
$ cd a4
- $ hg rebase --source 'desc("C")'
+ $ hg rebase --source 2
saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@ 8: 'D'
|
- o 7: 'C'
- |
- o 6: 'I'
- |
- o 5: 'H'
- |
- | o 4: 'G'
- |/|
- o | 3: 'F'
+ o 7: 'C'
+ |\
+ | o 6: 'I'
| |
- | o 2: 'E'
- |/
- | o 1: 'B'
+ | o 5: 'H'
+ | |
+ | | o 4: 'G'
+ | |/|
+ | o | 3: 'F'
+ | | |
+ | | o 2: 'E'
+ | |/
+ o | 1: 'B'
|/
o 0: 'A'
@@ -253,7 +243,7 @@ Specify only base (from 1 onto 8):
$ hg clone -q -u . a a6
$ cd a6
- $ hg rebase --base 'desc("D")'
+ $ hg rebase --base 3
saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -283,7 +273,7 @@ Specify source and dest (from 2 onto 7):
$ hg clone -q -u . a a7
$ cd a7
- $ hg rebase --source 2 --dest 7
+ $ hg rebase --detach --source 2 --dest 7
saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
@@ -337,36 +327,6 @@ Specify base and dest (from 1 onto 7):
$ cd ..
-
-Specify only revs (from 2 onto 8)
-
- $ hg clone -q -u . a a9
- $ cd a9
-
- $ hg rebase --rev 'desc("C")::'
- saved backup bundle to $TESTTMP/a9/.hg/strip-backup/*-backup.hg (glob)
-
- $ hg tglog
- @ 8: 'D'
- |
- o 7: 'C'
- |
- o 6: 'I'
- |
- o 5: 'H'
- |
- | o 4: 'G'
- |/|
- o | 3: 'F'
- | |
- | o 2: 'E'
- |/
- | o 1: 'B'
- |/
- o 0: 'A'
-
- $ cd ..
-
Test --tool parameter:
$ hg init b
@@ -427,4 +387,3 @@ Test --tool parameter:
tool option will be ignored
saved backup bundle to $TESTTMP/b3/.hg/strip-backup/*-backup.hg (glob)
- $ cd ..
diff --git a/tests/test-rebase-pull.t b/tests/test-rebase-pull.t
index 07388d5..ff8ab75 100644
--- a/tests/test-rebase-pull.t
+++ b/tests/test-rebase-pull.t
@@ -48,7 +48,7 @@
Now b has one revision to be pulled from a:
$ hg pull --rebase
- pulling from $TESTTMP/a (glob)
+ pulling from $TESTTMP/a
searching for changes
adding changesets
adding manifests
@@ -68,7 +68,7 @@ Now b has one revision to be pulled from a:
Re-run:
$ hg pull --rebase
- pulling from $TESTTMP/a (glob)
+ pulling from $TESTTMP/a
searching for changes
no changes found
@@ -77,9 +77,8 @@ Invoke pull --rebase and nothing to rebase:
$ cd ../c
- $ hg book norebase
$ hg pull --rebase
- pulling from $TESTTMP/a (glob)
+ pulling from $TESTTMP/a
searching for changes
adding changesets
adding manifests
@@ -87,7 +86,6 @@ Invoke pull --rebase and nothing to rebase:
added 1 changesets with 1 changes to 1 files
nothing to rebase
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- updating bookmark norebase
$ hg tglog -l 1
@ 2: 'R1'
@@ -96,7 +94,7 @@ Invoke pull --rebase and nothing to rebase:
pull --rebase --update should ignore --update:
$ hg pull --rebase --update
- pulling from $TESTTMP/a (glob)
+ pulling from $TESTTMP/a
searching for changes
no changes found
@@ -105,7 +103,7 @@ pull --rebase doesn't update if nothing has been pulled:
$ hg up -q 1
$ hg pull --rebase
- pulling from $TESTTMP/a (glob)
+ pulling from $TESTTMP/a
searching for changes
no changes found
@@ -113,4 +111,3 @@ pull --rebase doesn't update if nothing has been pulled:
o 2: 'R1'
|
- $ cd ..
diff --git a/tests/test-rebase-rename.t b/tests/test-rebase-rename.t
index c46f7c7..81b05d0 100644
--- a/tests/test-rebase-rename.t
+++ b/tests/test-rebase-rename.t
@@ -168,4 +168,3 @@ Test rebase across repeating renames:
unrelated.txt | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
- $ cd ..
diff --git a/tests/test-rebase-scenario-global.t b/tests/test-rebase-scenario-global.t
index 7cb6e8d..3a89d2e 100644
--- a/tests/test-rebase-scenario-global.t
+++ b/tests/test-rebase-scenario-global.t
@@ -3,9 +3,6 @@
> graphlog=
> rebase=
>
- > [phases]
- > publish=False
- >
> [alias]
> tglog = log -G --template "{rev}: '{desc}' {branches}\n"
> EOF
@@ -13,7 +10,7 @@
$ hg init a
$ cd a
- $ hg unbundle "$TESTDIR/bundles/rebase.hg"
+ $ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
@@ -52,19 +49,19 @@ D onto H - simple rebase:
saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
- @ 7: 'D'
- |
- o 6: 'H'
- |
- | o 5: 'G'
- |/|
- o | 4: 'F'
+ @ 7: 'D'
+ |\
+ | o 6: 'H'
| |
- | o 3: 'E'
- |/
- | o 2: 'C'
+ | | o 5: 'G'
+ | |/|
+ | o | 4: 'F'
+ | | |
+ | | o 3: 'E'
+ | |/
+ o | 2: 'C'
| |
- | o 1: 'B'
+ o | 1: 'B'
|/
o 0: 'A'
@@ -80,19 +77,19 @@ D onto F - intermediate point:
saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
$ hg tglog
- @ 7: 'D'
- |
- | o 6: 'H'
- |/
- | o 5: 'G'
- |/|
- o | 4: 'F'
- | |
- | o 3: 'E'
- |/
- | o 2: 'C'
+ @ 7: 'D'
+ |\
+ | | o 6: 'H'
+ | |/
+ | | o 5: 'G'
+ | |/|
+ | o | 4: 'F'
+ | | |
+ | | o 3: 'E'
+ | |/
+ o | 2: 'C'
| |
- | o 1: 'B'
+ o | 1: 'B'
|/
o 0: 'A'
@@ -215,8 +212,8 @@ G onto F - rebase onto an ancestor:
$ cd a7
$ hg rebase -s 6 -d 5
- nothing to rebase
- [1]
+ abort: source is descendant of destination
+ [255]
F onto G - rebase onto a descendant:
@@ -251,297 +248,3 @@ F onto G - rebase onto a descendant:
nothing to rebase
[1]
-C onto A - rebase onto an ancestor:
-
- $ hg rebase -d 0 -s 2
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/5fddd98957c8-backup.hg (glob)
- $ hg tglog
- @ 7: 'D'
- |
- o 6: 'C'
- |
- | o 5: 'H'
- | |
- | | o 4: 'G'
- | |/|
- | o | 3: 'F'
- |/ /
- | o 2: 'E'
- |/
- | o 1: 'B'
- |/
- o 0: 'A'
-
-
-Check rebasing public changeset
-
- $ hg pull --config phases.publish=True -q -r 6 . # update phase of 6
- $ hg rebase -d 5 -b 6
- abort: can't rebase immutable changeset e1c4361dd923
- (see hg help phases for details)
- [255]
-
- $ hg rebase -d 5 -b 6 --keep
-
-Check rebasing mutable changeset
-Source phase greater or equal to destination phase: new changeset get the phase of source:
- $ hg rebase -s9 -d0
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2b23e52411f4-backup.hg (glob)
- $ hg log --template "{phase}\n" -r 9
- draft
- $ hg rebase -s9 -d1
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2cb10d0cfc6c-backup.hg (glob)
- $ hg log --template "{phase}\n" -r 9
- draft
- $ hg phase --force --secret 9
- $ hg rebase -s9 -d0
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/c5b12b67163a-backup.hg (glob)
- $ hg log --template "{phase}\n" -r 9
- secret
- $ hg rebase -s9 -d1
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/2a0524f868ac-backup.hg (glob)
- $ hg log --template "{phase}\n" -r 9
- secret
-Source phase lower than destination phase: new changeset get the phase of destination:
- $ hg rebase -s8 -d9
- saved backup bundle to $TESTTMP/a7/.hg/strip-backup/6d4f22462821-backup.hg (glob)
- $ hg log --template "{phase}\n" -r 'rev(9)'
- secret
-
- $ cd ..
-
-Test for revset
-
-We need a bit different graph
-All destination are B
-
- $ hg init ah
- $ cd ah
- $ hg unbundle "$TESTDIR/bundles/rebase-revset.hg"
- adding changesets
- adding manifests
- adding file changes
- added 9 changesets with 9 changes to 9 files (+2 heads)
- (run 'hg heads' to see heads, 'hg merge' to merge)
- $ hg tglog
- o 8: 'I'
- |
- o 7: 'H'
- |
- o 6: 'G'
- |
- | o 5: 'F'
- | |
- | o 4: 'E'
- |/
- o 3: 'D'
- |
- o 2: 'C'
- |
- | o 1: 'B'
- |/
- o 0: 'A'
-
- $ cd ..
-
-
-Simple case with keep:
-
-Source on have two descendant heads but ask for one
-
- $ hg clone -q -u . ah ah1
- $ cd ah1
- $ hg rebase -r '2::8' -d 1
- abort: can't remove original changesets with unrebased descendants
- (use --keep to keep original changesets)
- [255]
- $ hg rebase -r '2::8' -d 1 --keep
- $ hg tglog
- @ 13: 'I'
- |
- o 12: 'H'
- |
- o 11: 'G'
- |
- o 10: 'D'
- |
- o 9: 'C'
- |
- | o 8: 'I'
- | |
- | o 7: 'H'
- | |
- | o 6: 'G'
- | |
- | | o 5: 'F'
- | | |
- | | o 4: 'E'
- | |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
-
- $ cd ..
-
-Base on have one descendant heads we ask for but common ancestor have two
-
- $ hg clone -q -u . ah ah2
- $ cd ah2
- $ hg rebase -r '3::8' -d 1
- abort: can't remove original changesets with unrebased descendants
- (use --keep to keep original changesets)
- [255]
- $ hg rebase -r '3::8' -d 1 --keep
- $ hg tglog
- @ 12: 'I'
- |
- o 11: 'H'
- |
- o 10: 'G'
- |
- o 9: 'D'
- |
- | o 8: 'I'
- | |
- | o 7: 'H'
- | |
- | o 6: 'G'
- | |
- | | o 5: 'F'
- | | |
- | | o 4: 'E'
- | |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
-
- $ cd ..
-
-rebase subset
-
- $ hg clone -q -u . ah ah3
- $ cd ah3
- $ hg rebase -r '3::7' -d 1
- abort: can't remove original changesets with unrebased descendants
- (use --keep to keep original changesets)
- [255]
- $ hg rebase -r '3::7' -d 1 --keep
- $ hg tglog
- @ 11: 'H'
- |
- o 10: 'G'
- |
- o 9: 'D'
- |
- | o 8: 'I'
- | |
- | o 7: 'H'
- | |
- | o 6: 'G'
- | |
- | | o 5: 'F'
- | | |
- | | o 4: 'E'
- | |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
-
- $ cd ..
-
-rebase subset with multiple head
-
- $ hg clone -q -u . ah ah4
- $ cd ah4
- $ hg rebase -r '3::(7+5)' -d 1
- abort: can't remove original changesets with unrebased descendants
- (use --keep to keep original changesets)
- [255]
- $ hg rebase -r '3::(7+5)' -d 1 --keep
- $ hg tglog
- @ 13: 'H'
- |
- o 12: 'G'
- |
- | o 11: 'F'
- | |
- | o 10: 'E'
- |/
- o 9: 'D'
- |
- | o 8: 'I'
- | |
- | o 7: 'H'
- | |
- | o 6: 'G'
- | |
- | | o 5: 'F'
- | | |
- | | o 4: 'E'
- | |/
- | o 3: 'D'
- | |
- | o 2: 'C'
- | |
- o | 1: 'B'
- |/
- o 0: 'A'
-
-
- $ cd ..
-
-More advanced tests
-
-rebase on ancestor with revset
-
- $ hg clone -q -u . ah ah5
- $ cd ah5
- $ hg rebase -r '6::' -d 2
- saved backup bundle to $TESTTMP/ah5/.hg/strip-backup/3d8a618087a7-backup.hg (glob)
- $ hg tglog
- @ 8: 'I'
- |
- o 7: 'H'
- |
- o 6: 'G'
- |
- | o 5: 'F'
- | |
- | o 4: 'E'
- | |
- | o 3: 'D'
- |/
- o 2: 'C'
- |
- | o 1: 'B'
- |/
- o 0: 'A'
-
- $ cd ..
-
-
-rebase with multiple root.
-We rebase E and G on B
-We would expect heads are I, F if it was supported
-
- $ hg clone -q -u . ah ah6
- $ cd ah6
- $ hg rebase -r '(4+6)::' -d 1
- abort: can't rebase multiple roots
- [255]
- $ cd ..
diff --git a/tests/test-rebuildstate.t b/tests/test-rebuildstate.t
index 954d343..35b2729 100644
--- a/tests/test-rebuildstate.t
+++ b/tests/test-rebuildstate.t
@@ -17,8 +17,8 @@ basic test for hg debugrebuildstate
state dump after
$ hg debugstate --nodates | sort
- n 644 -1 bar
- n 644 -1 foo
+ n 666 -1 bar
+ n 666 -1 foo
status
@@ -27,4 +27,3 @@ status
? baz
C foo
- $ cd ..
diff --git a/tests/test-record.t b/tests/test-record.t
index 833b290..8a697c5 100644
--- a/tests/test-record.t
+++ b/tests/test-record.t
@@ -18,7 +18,7 @@ Select no files
> EOF
diff --git a/empty-rw b/empty-rw
new file mode 100644
- examine changes to 'empty-rw'? [Ynesfdaq?]
+ examine changes to 'empty-rw'? [Ynsfdaq?]
no changes to record
$ hg tip -p
@@ -37,7 +37,7 @@ Select files but no hunks
> EOF
diff --git a/empty-rw b/empty-rw
new file mode 100644
- examine changes to 'empty-rw'? [Ynesfdaq?]
+ examine changes to 'empty-rw'? [Ynsfdaq?]
abort: empty commit message
[255]
@@ -57,7 +57,7 @@ Record empty file
> EOF
diff --git a/empty-rw b/empty-rw
new file mode 100644
- examine changes to 'empty-rw'? [Ynesfdaq?]
+ examine changes to 'empty-rw'? [Ynsfdaq?]
$ hg tip -p
changeset: 0:c0708cf4e46e
@@ -86,7 +86,7 @@ Rename empty file
diff --git a/empty-rw b/empty-rename
rename from empty-rw
rename to empty-rename
- examine changes to 'empty-rw' and 'empty-rename'? [Ynesfdaq?]
+ examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?]
$ hg tip -p
changeset: 1:d695e8dcb197
@@ -106,7 +106,7 @@ Copy empty file
diff --git a/empty-rename b/empty-copy
copy from empty-rename
copy to empty-copy
- examine changes to 'empty-rename' and 'empty-copy'? [Ynesfdaq?]
+ examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?]
$ hg tip -p
changeset: 2:1d4b90bea524
@@ -125,7 +125,7 @@ Delete empty file
> EOF
diff --git a/empty-copy b/empty-copy
deleted file mode 100644
- examine changes to 'empty-copy'? [Ynesfdaq?]
+ examine changes to 'empty-copy'? [Ynsfdaq?]
$ hg tip -p
changeset: 3:b39a238f01a1
@@ -147,7 +147,7 @@ Add binary file
diff --git a/tip.bundle b/tip.bundle
new file mode 100644
this is a binary file
- examine changes to 'tip.bundle'? [Ynesfdaq?]
+ examine changes to 'tip.bundle'? [Ynsfdaq?]
$ hg tip -p
changeset: 4:ad816da3711e
@@ -169,7 +169,7 @@ Change binary file
> EOF
diff --git a/tip.bundle b/tip.bundle
this modifies a binary file (all or nothing)
- examine changes to 'tip.bundle'? [Ynesfdaq?]
+ examine changes to 'tip.bundle'? [Ynsfdaq?]
$ hg tip -p
changeset: 5:dccd6f3eb485
@@ -194,7 +194,7 @@ Rename and change binary file
rename from tip.bundle
rename to top.bundle
this modifies a binary file (all or nothing)
- examine changes to 'tip.bundle' and 'top.bundle'? [Ynesfdaq?]
+ examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?]
$ hg tip -p
changeset: 6:7fa44105f5b3
@@ -222,7 +222,7 @@ Add plain file
> EOF
diff --git a/plain b/plain
new file mode 100644
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
$ hg tip -p
changeset: 7:11fb457c1be4
@@ -256,13 +256,13 @@ Modify end of plain file
> EOF
diff --git a/plain b/plain
1 hunks, 1 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -8,3 +8,4 @@
8
9
10
+11
- record this change to 'plain'? [Ynesfdaq?]
+ record this change to 'plain'? [Ynsfdaq?]
Modify end of plain file, no EOL
@@ -273,14 +273,14 @@ Modify end of plain file, no EOL
> EOF
diff --git a/plain b/plain
1 hunks, 1 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -9,3 +9,4 @@
9
10
11
+7264f99c5f5ff3261504828afa4fb4d406c3af54
\ No newline at end of file
- record this change to 'plain'? [Ynesfdaq?]
+ record this change to 'plain'? [Ynsfdaq?]
Modify end of plain file, add EOL
@@ -294,7 +294,7 @@ Modify end of plain file, add EOL
> EOF
diff --git a/plain b/plain
1 hunks, 1 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -9,4 +9,4 @@
9
10
@@ -302,10 +302,10 @@ Modify end of plain file, add EOL
-7264f99c5f5ff3261504828afa4fb4d406c3af54
\ No newline at end of file
+7264f99c5f5ff3261504828afa4fb4d406c3af54
- record change 1/2 to 'plain'? [Ynesfdaq?]
+ record change 1/2 to 'plain'? [Ynsfdaq?]
diff --git a/plain2 b/plain2
new file mode 100644
- examine changes to 'plain2'? [Ynesfdaq?]
+ examine changes to 'plain2'? [Ynsfdaq?]
Modify beginning, trim end, record both, add another file to test
changes numbering
@@ -325,28 +325,28 @@ changes numbering
> EOF
diff --git a/plain b/plain
2 hunks, 3 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -1,4 +1,4 @@
-1
+2
2
3
4
- record change 1/3 to 'plain'? [Ynesfdaq?]
+ record change 1/3 to 'plain'? [Ynsfdaq?]
@@ -8,5 +8,3 @@
8
9
10
-11
-7264f99c5f5ff3261504828afa4fb4d406c3af54
- record change 2/3 to 'plain'? [Ynesfdaq?]
+ record change 2/3 to 'plain'? [Ynsfdaq?]
diff --git a/plain2 b/plain2
1 hunks, 1 lines changed
- examine changes to 'plain2'? [Ynesfdaq?]
+ examine changes to 'plain2'? [Ynsfdaq?]
@@ -1,1 +1,2 @@
1
+2
- record change 3/3 to 'plain2'? [Ynesfdaq?]
+ record change 3/3 to 'plain2'? [Ynsfdaq?]
$ hg tip -p
changeset: 11:21df83db12b8
@@ -394,7 +394,7 @@ Record end
> EOF
diff --git a/plain b/plain
2 hunks, 4 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -1,9 +1,6 @@
-2
-2
@@ -405,7 +405,7 @@ Record end
7
8
9
- record change 1/2 to 'plain'? [Ynesfdaq?]
+ record change 1/2 to 'plain'? [Ynsfdaq?]
@@ -4,7 +1,7 @@
4
5
@@ -415,7 +415,7 @@ Record end
9
-10
+10.new
- record change 2/2 to 'plain'? [Ynesfdaq?]
+ record change 2/2 to 'plain'? [Ynsfdaq?]
$ hg tip -p
changeset: 12:99337501826f
@@ -443,7 +443,7 @@ Record beginning
> EOF
diff --git a/plain b/plain
1 hunks, 3 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -1,6 +1,3 @@
-2
-2
@@ -451,7 +451,7 @@ Record beginning
4
5
6
- record this change to 'plain'? [Ynesfdaq?]
+ record this change to 'plain'? [Ynsfdaq?]
$ hg tip -p
changeset: 13:bbd45465d540
@@ -488,7 +488,7 @@ Record end
> EOF
diff --git a/plain b/plain
2 hunks, 4 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -1,6 +1,9 @@
+1
+2
@@ -499,7 +499,7 @@ Record end
7
8
9
- record change 1/2 to 'plain'? [Ynesfdaq?]
+ record change 1/2 to 'plain'? [Ynsfdaq?]
@@ -1,7 +4,6 @@
4
5
@@ -508,7 +508,7 @@ Record end
8
9
-10.new
- record change 2/2 to 'plain'? [Ynesfdaq?]
+ record change 2/2 to 'plain'? [Ynsfdaq?]
Add to beginning, middle, end
@@ -527,14 +527,14 @@ Record beginning, middle
> EOF
diff --git a/plain b/plain
3 hunks, 7 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -1,2 +1,5 @@
+1
+2
+3
4
5
- record change 1/3 to 'plain'? [Ynesfdaq?]
+ record change 1/3 to 'plain'? [Ynsfdaq?]
@@ -1,6 +4,8 @@
4
5
@@ -544,7 +544,7 @@ Record beginning, middle
7
8
9
- record change 2/3 to 'plain'? [Ynesfdaq?]
+ record change 2/3 to 'plain'? [Ynsfdaq?]
@@ -3,4 +8,6 @@
6
7
@@ -552,7 +552,7 @@ Record beginning, middle
9
+10
+11
- record change 3/3 to 'plain'? [Ynesfdaq?]
+ record change 3/3 to 'plain'? [Ynsfdaq?]
$ hg tip -p
changeset: 15:f34a7937ec33
@@ -585,14 +585,14 @@ Record end
> EOF
diff --git a/plain b/plain
1 hunks, 2 lines changed
- examine changes to 'plain'? [Ynesfdaq?]
+ examine changes to 'plain'? [Ynsfdaq?]
@@ -9,3 +9,5 @@
7
8
9
+10
+11
- record this change to 'plain'? [Ynesfdaq?]
+ record this change to 'plain'? [Ynsfdaq?]
$ hg tip -p
changeset: 16:f9900b71a04c
@@ -625,11 +625,11 @@ Record end
> EOF
diff --git a/subdir/a b/subdir/a
1 hunks, 1 lines changed
- examine changes to 'subdir/a'? [Ynesfdaq?]
+ examine changes to 'subdir/a'? [Ynsfdaq?]
@@ -1,1 +1,2 @@
a
+a
- record this change to 'subdir/a'? [Ynesfdaq?]
+ record this change to 'subdir/a'? [Ynsfdaq?]
$ hg tip -p
changeset: 18:61be427a9deb
@@ -663,17 +663,16 @@ Help, quit
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
y - record this change
n - skip this change
- e - edit this change manually
s - skip remaining changes to this file
f - record remaining changes to this file
d - done, skip remaining changes and files
a - record all changes to all remaining files
q - quit, recording no changes
? - display help
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
abort: user quit
[255]
@@ -684,10 +683,10 @@ Skip
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
diff --git a/subdir/f2 b/subdir/f2
1 hunks, 1 lines changed
- examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
+ examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
[255]
No
@@ -697,10 +696,10 @@ No
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
diff --git a/subdir/f2 b/subdir/f2
1 hunks, 1 lines changed
- examine changes to 'subdir/f2'? [Ynesfdaq?] abort: response expected
+ examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
[255]
f, quit
@@ -711,10 +710,10 @@ f, quit
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
diff --git a/subdir/f2 b/subdir/f2
1 hunks, 1 lines changed
- examine changes to 'subdir/f2'? [Ynesfdaq?]
+ examine changes to 'subdir/f2'? [Ynsfdaq?]
abort: user quit
[255]
@@ -726,10 +725,10 @@ s, all
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
diff --git a/subdir/f2 b/subdir/f2
1 hunks, 1 lines changed
- examine changes to 'subdir/f2'? [Ynesfdaq?]
+ examine changes to 'subdir/f2'? [Ynsfdaq?]
$ hg tip -p
changeset: 20:b3df3dda369a
@@ -753,7 +752,7 @@ f
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
$ hg tip -p
changeset: 21:38ec577f126b
@@ -770,8 +769,6 @@ f
+a
-#if execbit
-
Preserve chmod +x
$ chmod +x f1
@@ -785,12 +782,12 @@ Preserve chmod +x
old mode 100644
new mode 100755
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
@@ -1,2 +1,3 @@
a
a
+a
- record this change to 'subdir/f1'? [Ynesfdaq?]
+ record this change to 'subdir/f1'? [Ynsfdaq?]
$ hg tip --config diff.git=True -p
changeset: 22:3261adceb075
@@ -820,13 +817,13 @@ Preserve execute permission on original
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
@@ -1,3 +1,4 @@
a
a
a
+b
- record this change to 'subdir/f1'? [Ynesfdaq?]
+ record this change to 'subdir/f1'? [Ynsfdaq?]
$ hg tip --config diff.git=True -p
changeset: 23:b429867550db
@@ -858,13 +855,13 @@ Preserve chmod -x
old mode 100755
new mode 100644
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
@@ -2,3 +2,4 @@
a
a
b
+c
- record this change to 'subdir/f1'? [Ynesfdaq?]
+ record this change to 'subdir/f1'? [Ynsfdaq?]
$ hg tip --config diff.git=True -p
changeset: 24:0b082130c20a
@@ -885,120 +882,8 @@ Preserve chmod -x
+c
-#else
-
-Slightly bogus tests to get almost same repo structure as when x bit is used
-- but with different hashes.
-
-Mock "Preserve chmod +x"
-
- $ echo a >> f1
- $ hg record -d '20 0' -mz <<EOF
- > y
- > y
- > y
- > EOF
- diff --git a/subdir/f1 b/subdir/f1
- 1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
- @@ -1,2 +1,3 @@
- a
- a
- +a
- record this change to 'subdir/f1'? [Ynesfdaq?]
-
- $ hg tip --config diff.git=True -p
- changeset: 22:0d463bd428f5
- tag: tip
- user: test
- date: Thu Jan 01 00:00:20 1970 +0000
- summary: z
-
- diff --git a/subdir/f1 b/subdir/f1
- --- a/subdir/f1
- +++ b/subdir/f1
- @@ -1,2 +1,3 @@
- a
- a
- +a
-
-
-Mock "Preserve execute permission on original"
-
- $ echo b >> f1
- $ hg record -d '21 0' -maa <<EOF
- > y
- > y
- > y
- > EOF
- diff --git a/subdir/f1 b/subdir/f1
- 1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
- @@ -1,3 +1,4 @@
- a
- a
- a
- +b
- record this change to 'subdir/f1'? [Ynesfdaq?]
-
- $ hg tip --config diff.git=True -p
- changeset: 23:0eab41a3e524
- tag: tip
- user: test
- date: Thu Jan 01 00:00:21 1970 +0000
- summary: aa
-
- diff --git a/subdir/f1 b/subdir/f1
- --- a/subdir/f1
- +++ b/subdir/f1
- @@ -1,3 +1,4 @@
- a
- a
- a
- +b
-
-
-Mock "Preserve chmod -x"
-
- $ chmod -x f1
- $ echo c >> f1
- $ hg record -d '22 0' -mab <<EOF
- > y
- > y
- > y
- > EOF
- diff --git a/subdir/f1 b/subdir/f1
- 1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
- @@ -2,3 +2,4 @@
- a
- a
- b
- +c
- record this change to 'subdir/f1'? [Ynesfdaq?]
-
- $ hg tip --config diff.git=True -p
- changeset: 24:f4f718f27b7c
- tag: tip
- user: test
- date: Thu Jan 01 00:00:22 1970 +0000
- summary: ab
-
- diff --git a/subdir/f1 b/subdir/f1
- --- a/subdir/f1
- +++ b/subdir/f1
- @@ -2,3 +2,4 @@
- a
- a
- b
- +c
-
-
-#endif
-
$ cd ..
-
Abort early when a merge is in progress
$ hg up 4
@@ -1009,7 +894,6 @@ Abort early when a merge is in progress
$ hg branch thatbranch
marked working directory as branch thatbranch
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m'new head'
@@ -1027,149 +911,6 @@ Abort early when a merge is in progress
$ hg up -C
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-Editing patch
-
- $ cat > editor.sh << '__EOF__'
- > sed -e 7d -e '5s/^-/ /' "$1" > tmp
- > mv tmp "$1"
- > __EOF__
- $ cat > editedfile << '__EOF__'
- > This is the first line
- > This is the second line
- > This is the third line
- > __EOF__
- $ hg add editedfile
- $ hg commit -medit-patch-1
- $ cat > editedfile << '__EOF__'
- > This line has changed
- > This change will be committed
- > This is the third line
- > __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record -d '23 0' -medit-patch-2 <<EOF
- > y
- > e
- > EOF
- diff --git a/editedfile b/editedfile
- 1 hunks, 2 lines changed
- examine changes to 'editedfile'? [Ynesfdaq?]
- @@ -1,3 +1,3 @@
- -This is the first line
- -This is the second line
- +This line has changed
- +This change will be committed
- This is the third line
- record this change to 'editedfile'? [Ynesfdaq?]
- $ cat editedfile
- This line has changed
- This change will be committed
- This is the third line
- $ hg cat -r tip editedfile
- This is the first line
- This change will be committed
- This is the third line
- $ hg revert editedfile
-
-Trying to edit patch for whole file
-
- $ echo "This is the fourth line" >> editedfile
- $ hg record <<EOF
- > e
- > q
- > EOF
- diff --git a/editedfile b/editedfile
- 1 hunks, 1 lines changed
- examine changes to 'editedfile'? [Ynesfdaq?]
- cannot edit patch for whole file
- examine changes to 'editedfile'? [Ynesfdaq?]
- abort: user quit
- [255]
- $ hg revert editedfile
-
-Removing changes from patch
-
- $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
- $ mv tmp editedfile
- $ echo "This line has been added" >> editedfile
- $ cat > editor.sh << '__EOF__'
- > sed -e 's/^[-+]/ /' "$1" > tmp
- > mv tmp "$1"
- > __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
- > y
- > e
- > EOF
- diff --git a/editedfile b/editedfile
- 1 hunks, 3 lines changed
- examine changes to 'editedfile'? [Ynesfdaq?]
- @@ -1,3 +1,3 @@
- -This is the first line
- -This change will be committed
- -This is the third line
- +This change will not be committed
- +This is the second line
- +This line has been added
- record this change to 'editedfile'? [Ynesfdaq?]
- no changes to record
- $ cat editedfile
- This change will not be committed
- This is the second line
- This line has been added
- $ hg cat -r tip editedfile
- This is the first line
- This change will be committed
- This is the third line
- $ hg revert editedfile
-
-Invalid patch
-
- $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
- $ mv tmp editedfile
- $ echo "This line has been added" >> editedfile
- $ cat > editor.sh << '__EOF__'
- > sed s/This/That/ "$1" > tmp
- > mv tmp "$1"
- > __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg record <<EOF
- > y
- > e
- > EOF
- diff --git a/editedfile b/editedfile
- 1 hunks, 3 lines changed
- examine changes to 'editedfile'? [Ynesfdaq?]
- @@ -1,3 +1,3 @@
- -This is the first line
- -This change will be committed
- -This is the third line
- +This change will not be committed
- +This is the second line
- +This line has been added
- record this change to 'editedfile'? [Ynesfdaq?]
- patching file editedfile
- Hunk #1 FAILED at 0
- 1 out of 1 hunks FAILED -- saving rejects to file editedfile.rej
- abort: patch failed to apply
- [255]
- $ cat editedfile
- This change will not be committed
- This is the second line
- This line has been added
- $ hg cat -r tip editedfile
- This is the first line
- This change will be committed
- This is the third line
- $ cat editedfile.rej
- --- editedfile
- +++ editedfile
- @@ -1,3 +1,3 @@
- -That is the first line
- -That change will be committed
- -That is the third line
- +That change will not be committed
- +That is the second line
- +That line has been added
- $ hg up -C
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
With win32text
$ echo '[extensions]' >> .hg/hgrc
@@ -1187,35 +928,34 @@ Ignore win32text deprecation warning for now:
$ echo 'warn = no' >> .hg/hgrc
$ echo d >> subdir/f1
- $ hg record -d '24 0' -mw1 <<EOF
+ $ hg record -d '23 0' -mw1 <<EOF
> y
> y
> EOF
diff --git a/subdir/f1 b/subdir/f1
1 hunks, 1 lines changed
- examine changes to 'subdir/f1'? [Ynesfdaq?]
+ examine changes to 'subdir/f1'? [Ynsfdaq?]
@@ -3,3 +3,4 @@
a
b
c
+d
- record this change to 'subdir/f1'? [Ynesfdaq?]
+ record this change to 'subdir/f1'? [Ynsfdaq?]
$ hg tip -p
- changeset: 28:* (glob)
+ changeset: 26:b8306e70edc4
tag: tip
+ parent: 24:0b082130c20a
user: test
- date: Thu Jan 01 00:00:24 1970 +0000
+ date: Thu Jan 01 00:00:23 1970 +0000
summary: w1
- diff -r ???????????? -r ???????????? subdir/f1 (glob)
- --- a/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
- +++ b/subdir/f1 Thu Jan 01 00:00:24 1970 +0000
+ diff -r 0b082130c20a -r b8306e70edc4 subdir/f1
+ --- a/subdir/f1 Thu Jan 01 00:00:22 1970 +0000
+ +++ b/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
@@ -3,3 +3,4 @@
a
b
c
+d
-
- $ cd ..
diff --git a/tests/test-relink.t b/tests/test-relink.t
index 2b0bc2b..1c07911 100644
--- a/tests/test-relink.t
+++ b/tests/test-relink.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" hardlink || exit 80
-
$ echo "[extensions]" >> $HGRCPATH
$ echo "relink=" >> $HGRCPATH
@@ -27,21 +25,21 @@ create source repository
$ hg ci -Am addfile
adding a
adding b
- $ cat "$TESTDIR/binfile.bin" >> a
- $ cat "$TESTDIR/binfile.bin" >> b
+ $ cat $TESTDIR/binfile.bin >> a
+ $ cat $TESTDIR/binfile.bin >> b
$ hg ci -Am changefiles
make another commit to create files larger than 1 KB to test
formatting of final byte count
- $ cat "$TESTDIR/binfile.bin" >> a
- $ cat "$TESTDIR/binfile.bin" >> b
+ $ cat $TESTDIR/binfile.bin >> a
+ $ cat $TESTDIR/binfile.bin >> b
$ hg ci -m anotherchange
don't sit forever trying to double-lock the source repo
$ hg relink .
- relinking $TESTTMP/repo/.hg/store to $TESTTMP/repo/.hg/store (glob)
+ relinking $TESTTMP/repo/.hg/store to $TESTTMP/repo/.hg/store
there is nothing to relink
diff --git a/tests/test-remove-new.t b/tests/test-remove-new.t
new file mode 100644
index 0000000..fcc633a
--- /dev/null
+++ b/tests/test-remove-new.t
@@ -0,0 +1,13 @@
+test that 'hg commit' does not crash if the user removes a newly added file
+
+ $ hg init
+ $ echo This is file a1 > a
+ $ hg add a
+ $ hg commit -m "commit #0"
+ $ touch b
+ $ hg add b
+ $ rm b
+ $ hg commit -A -m"comment #1"
+ removing b
+ nothing changed
+ [1]
diff --git a/tests/test-remove.t b/tests/test-remove.t
index f67146e..70d175b 100644
--- a/tests/test-remove.t
+++ b/tests/test-remove.t
@@ -29,7 +29,7 @@ the table cases
$ echo b > bar
$ hg add bar
$ remove bar
- not removing bar: file has been marked for add (use forget to undo)
+ not removing bar: file has been marked for add (use -f to force removal)
exit code: 1
A bar
./bar
@@ -196,8 +196,8 @@ dir, options none
$ rm test/bar
$ remove test
- removing test/bar (glob)
- removing test/foo (glob)
+ removing test/bar
+ removing test/foo
exit code: 0
R test/bar
R test/foo
@@ -208,8 +208,8 @@ dir, options -f
$ rm test/bar
$ remove -f test
- removing test/bar (glob)
- removing test/foo (glob)
+ removing test/bar
+ removing test/foo
exit code: 0
R test/bar
R test/foo
@@ -220,8 +220,8 @@ dir, options -A
$ rm test/bar
$ remove -A test
- not removing test/foo: file still exists (use -f to force removal) (glob)
- removing test/bar (glob)
+ not removing test/foo: file still exists (use -f to force removal)
+ removing test/bar
exit code: 1
R test/bar
./foo
@@ -232,8 +232,8 @@ dir, options -Af
$ rm test/bar
$ remove -Af test
- removing test/bar (glob)
- removing test/foo (glob)
+ removing test/bar
+ removing test/foo
exit code: 0
R test/bar
R test/foo
@@ -250,19 +250,7 @@ test remove dropping empty trees (issue1861)
adding issue1861/b/c/y
adding issue1861/x
$ hg rm issue1861/b
- removing issue1861/b/c/y (glob)
+ removing issue1861/b/c/y
$ hg ci -m remove
$ ls issue1861
x
-
-test that commit does not crash if the user removes a newly added file
-
- $ touch f1
- $ hg add f1
- $ rm f1
- $ hg ci -A -mx
- removing f1
- nothing changed
- [1]
-
- $ cd ..
diff --git a/tests/test-rename-after-merge.t b/tests/test-rename-after-merge.t
index 8c6bd49..c6033fe 100644
--- a/tests/test-rename-after-merge.t
+++ b/tests/test-rename-after-merge.t
@@ -118,4 +118,3 @@ Commit issue 1476 with a rename on the other side:
$ hg log -r tip -C -v | grep copies
copies: b2 (b1)
- $ cd ..
diff --git a/tests/test-rename-dir-merge.t b/tests/test-rename-dir-merge.t
index b115c26..c66318b 100644
--- a/tests/test-rename-dir-merge.t
+++ b/tests/test-rename-dir-merge.t
@@ -11,8 +11,8 @@
$ hg co -C 0
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg mv a b
- moving a/a to b/a (glob)
- moving a/b to b/b (glob)
+ moving a/a to b/a
+ moving a/b to b/b
$ hg ci -m "1 mv a/ b/"
$ hg co -C 0
@@ -27,38 +27,43 @@
searching for copies back to rev 1
unmatched files in local:
a/c
+ a/d
unmatched files in other:
b/a
b/b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b/a -> a/a
b/b -> a/b
checking for directory renames
dir a/ -> b/
file a/c -> b/c
+ file a/d -> b/d
resolving manifests
- overwrite: False, partial: False
- ancestor: f9b20c0d4c51, local: ce36d17b18fb+, remote: 397f8b00a740
+ overwrite None partial False
+ ancestor f9b20c0d4c51 local ce36d17b18fb+ remote 397f8b00a740
+ a/d: remote renamed directory to b/d -> d
a/c: remote renamed directory to b/c -> d
a/b: other deleted -> r
a/a: other deleted -> r
b/a: remote created -> g
b/b: remote created -> g
- updating: a/a 1/5 files (20.00%)
+ updating: a/a 1/6 files (16.67%)
removing a/a
- updating: a/b 2/5 files (40.00%)
+ updating: a/b 2/6 files (33.33%)
removing a/b
- updating: a/c 3/5 files (60.00%)
+ updating: a/c 3/6 files (50.00%)
moving a/c to b/c
- updating: b/a 4/5 files (80.00%)
+ updating: a/d 4/6 files (66.67%)
+ moving a/d to b/d
+ updating: b/a 5/6 files (83.33%)
getting b/a
- updating: b/b 5/5 files (100.00%)
+ updating: b/b 6/6 files (100.00%)
getting b/b
- 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ 4 files updated, 0 files merged, 2 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ echo a/* b/*
- a/d b/a b/b b/c
+ a/* b/a b/b b/c b/d
$ hg st -C
M b/a
M b/b
@@ -67,10 +72,10 @@
R a/a
R a/b
R a/c
- ? a/d
+ ? b/d
$ hg ci -m "3 merge 2+1"
$ hg debugrename b/c
- b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob)
+ b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88
$ hg co -C 1
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -79,17 +84,18 @@
unmatched files in local:
b/a
b/b
+ b/d
unmatched files in other:
a/c
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b/a -> a/a
b/b -> a/b
checking for directory renames
dir a/ -> b/
file a/c -> b/c
resolving manifests
- overwrite: False, partial: False
- ancestor: f9b20c0d4c51, local: 397f8b00a740+, remote: ce36d17b18fb
+ overwrite None partial False
+ ancestor f9b20c0d4c51 local 397f8b00a740+ remote ce36d17b18fb
None: local renamed directory to b/c -> d
updating:None 1/1 files (100.00%)
getting a/c to b/c
@@ -97,15 +103,15 @@
(branch merge, don't forget to commit)
$ echo a/* b/*
- a/d b/a b/b b/c
+ a/* b/a b/b b/c b/d
$ hg st -C
A b/c
a/c
- ? a/d
+ ? b/d
$ hg ci -m "4 merge 1+2"
created new head
$ hg debugrename b/c
- b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88 (glob)
+ b/c renamed from a/c:354ae8da6e890359ef49ade27b68bbc361f3ca88
Second scenario with two repos:
@@ -116,7 +122,7 @@ Second scenario with two repos:
$ mkdir a
$ echo foo > a/f
$ hg add a
- adding a/f (glob)
+ adding a/f
$ hg ci -m "a/f == foo"
$ cd ..
@@ -125,7 +131,7 @@ Second scenario with two repos:
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd r2
$ hg mv a b
- moving a/f to b/f (glob)
+ moving a/f to b/f
$ echo foo1 > b/f
$ hg ci -m" a -> b, b/f == foo1"
$ cd ..
@@ -134,7 +140,7 @@ Second scenario with two repos:
$ mkdir a/aa
$ echo bar > a/aa/g
$ hg add a/aa
- adding a/aa/g (glob)
+ adding a/aa/g
$ hg ci -m "a/aa/g"
$ hg pull ../r2
pulling from ../r2
@@ -155,5 +161,3 @@ Second scenario with two repos:
a/aa/g
R a/aa/g
R a/f
-
- $ cd ..
diff --git a/tests/test-rename-merge1.t b/tests/test-rename-merge1.t
index f6b5f52..5a77cba 100644
--- a/tests/test-rename-merge1.t
+++ b/tests/test-rename-merge1.t
@@ -28,15 +28,15 @@
unmatched files in other:
b
b2
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
c2 -> a2 !
b -> a *
b2 -> a2 !
checking for directory renames
a2: divergent renames -> dr
resolving manifests
- overwrite: False, partial: False
- ancestor: af1939970a1c, local: 044f8520aeeb+, remote: 85c198ef2f6c
+ overwrite None partial False
+ ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c
a: remote moved to b -> m
b2: remote created -> g
preserving a for resolve of b
@@ -68,9 +68,9 @@
$ hg ci -m "merge"
$ hg debugindex b
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 67 ..... 1 57eacc201a7f 000000000000 000000000000 (re)
- 1 67 72 ..... 3 4727ba907962 000000000000 57eacc201a7f (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 67 0 1 57eacc201a7f 000000000000 000000000000
+ 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f
$ hg debugrename b
b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
@@ -95,6 +95,9 @@ We'd rather not warn on divergent renames done in the same changeset (issue2113)
$ hg up c761c6948de0
1 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ hg up
+ note: possible conflict - b was renamed multiple times to:
+ b3
+ b4
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
Check for issue2642
@@ -123,8 +126,6 @@ Check for issue2642
$ cat f2
c0
- $ cd ..
-
Check for issue2089
$ hg init repo2089
@@ -154,42 +155,3 @@ Check for issue2089
$ cat f2
c2
-
- $ cd ..
-
-Check for issue3074
-
- $ hg init repo3074
- $ cd repo3074
- $ echo foo > file
- $ hg add file
- $ hg commit -m "added file"
- $ hg mv file newfile
- $ hg commit -m "renamed file"
- $ hg update 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg rm file
- $ hg commit -m "deleted file"
- created new head
- $ hg merge --debug
- searching for copies back to rev 1
- unmatched files in other:
- newfile
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
- newfile -> file %
- checking for directory renames
- file: rename and delete -> rd
- resolving manifests
- overwrite: False, partial: False
- ancestor: 19d7f95df299, local: 0084274f6b67+, remote: 5d32493049f0
- newfile: remote created -> g
- updating: file 1/2 files (50.00%)
- note: possible conflict - file was deleted and renamed to:
- newfile
- updating: newfile 2/2 files (100.00%)
- getting newfile
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg status
- M newfile
- $ cd ..
diff --git a/tests/test-rename-merge2.t b/tests/test-rename-merge2.t
index e5ba1d5..ba4a90b 100644
--- a/tests/test-rename-merge2.t
+++ b/tests/test-rename-merge2.t
@@ -80,12 +80,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in other:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24
+ overwrite None partial False
+ ancestor 924404dff337 local e300d1c794ec+ remote 4ce40f5aca24
rev: versions differ -> m
a: remote copied to b -> m
preserving a for resolve of b
@@ -115,12 +115,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in local:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 86a2aa42fc76+, remote: f4db7e329e71
+ overwrite None partial False
+ ancestor 924404dff337 local 86a2aa42fc76+ remote f4db7e329e71
a: remote is newer -> g
b: local copied/moved to a -> m
rev: versions differ -> m
@@ -153,12 +153,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in other:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: e300d1c794ec+, remote: bdb19105162a
+ overwrite None partial False
+ ancestor 924404dff337 local e300d1c794ec+ remote bdb19105162a
rev: versions differ -> m
a: remote moved to b -> m
preserving a for resolve of b
@@ -188,12 +188,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in local:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 02963e448370+, remote: f4db7e329e71
+ overwrite None partial False
+ ancestor 924404dff337 local 02963e448370+ remote f4db7e329e71
b: local copied/moved to a -> m
rev: versions differ -> m
preserving b for resolve of b
@@ -222,12 +222,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in other:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: 4ce40f5aca24
+ overwrite None partial False
+ ancestor 924404dff337 local 94b33a1b7f2d+ remote 4ce40f5aca24
rev: versions differ -> m
b: remote created -> g
preserving rev for resolve of rev
@@ -252,12 +252,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in local:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 97c705ade336
+ overwrite None partial False
+ ancestor 924404dff337 local 86a2aa42fc76+ remote 97c705ade336
rev: versions differ -> m
preserving rev for resolve of rev
updating: rev 1/1 files (100.00%)
@@ -279,12 +279,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in other:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 94b33a1b7f2d+, remote: bdb19105162a
+ overwrite None partial False
+ ancestor 924404dff337 local 94b33a1b7f2d+ remote bdb19105162a
a: other deleted -> r
rev: versions differ -> m
b: remote created -> g
@@ -311,12 +311,12 @@ $4 = expected result
searching for copies back to rev 1
unmatched files in local:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 02963e448370+, remote: 97c705ade336
+ overwrite None partial False
+ ancestor 924404dff337 local 02963e448370+ remote 97c705ade336
rev: versions differ -> m
preserving rev for resolve of rev
updating: rev 1/1 files (100.00%)
@@ -336,8 +336,8 @@ $4 = expected result
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 62e7bf090eba+, remote: 49b6d8032493
+ overwrite None partial False
+ ancestor 924404dff337 local 62e7bf090eba+ remote 49b6d8032493
b: versions differ -> m
rev: versions differ -> m
preserving b for resolve of b
@@ -369,14 +369,14 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
b
unmatched files in other:
c
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
c -> a !
b -> a !
checking for directory renames
a: divergent renames -> dr
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 02963e448370+, remote: fe905ef2c33e
+ overwrite None partial False
+ ancestor 924404dff337 local 02963e448370+ remote fe905ef2c33e
rev: versions differ -> m
c: remote created -> g
preserving rev for resolve of rev
@@ -404,8 +404,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 86a2aa42fc76+, remote: af30c7647fc7
+ overwrite None partial False
+ ancestor 924404dff337 local 86a2aa42fc76+ remote af30c7647fc7
b: versions differ -> m
rev: versions differ -> m
preserving b for resolve of b
@@ -432,8 +432,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
+ overwrite None partial False
+ ancestor 924404dff337 local 59318016310c+ remote bdb19105162a
a: other deleted -> r
b: versions differ -> m
rev: versions differ -> m
@@ -462,8 +462,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
+ overwrite None partial False
+ ancestor 924404dff337 local 86a2aa42fc76+ remote 8dbce441892a
a: remote is newer -> g
b: versions differ -> m
rev: versions differ -> m
@@ -493,8 +493,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 59318016310c+, remote: bdb19105162a
+ overwrite None partial False
+ ancestor 924404dff337 local 59318016310c+ remote bdb19105162a
a: other deleted -> r
b: versions differ -> m
rev: versions differ -> m
@@ -523,8 +523,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 86a2aa42fc76+, remote: 8dbce441892a
+ overwrite None partial False
+ ancestor 924404dff337 local 86a2aa42fc76+ remote 8dbce441892a
a: remote is newer -> g
b: versions differ -> m
rev: versions differ -> m
@@ -554,8 +554,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24
+ overwrite None partial False
+ ancestor 924404dff337 local 0b76e65c8289+ remote 4ce40f5aca24
b: versions differ -> m
rev: versions differ -> m
preserving b for resolve of b
@@ -582,8 +582,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 02963e448370+, remote: 8dbce441892a
+ overwrite None partial False
+ ancestor 924404dff337 local 02963e448370+ remote 8dbce441892a
b: versions differ -> m
rev: versions differ -> m
remote changed a which local deleted
@@ -615,8 +615,8 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
--------------
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 0b76e65c8289+, remote: bdb19105162a
+ overwrite None partial False
+ ancestor 924404dff337 local 0b76e65c8289+ remote bdb19105162a
local changed a which remote deleted
use (c)hanged version or (d)elete? c
a: prompt keep -> a
@@ -648,12 +648,12 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
searching for copies back to rev 1
unmatched files in other:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: e300d1c794ec+, remote: 49b6d8032493
+ overwrite None partial False
+ ancestor 924404dff337 local e300d1c794ec+ remote 49b6d8032493
rev: versions differ -> m
a: remote moved to b -> m
preserving a for resolve of b
@@ -682,12 +682,12 @@ m "um a c" "um x c" " " "10 do merge with no ancestor"
searching for copies back to rev 1
unmatched files in local:
b
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 62e7bf090eba+, remote: f4db7e329e71
+ overwrite None partial False
+ ancestor 924404dff337 local 62e7bf090eba+ remote f4db7e329e71
b: local copied/moved to a -> m
rev: versions differ -> m
preserving b for resolve of b
@@ -720,12 +720,12 @@ m "nm a b" "um x a" " " "22 get a, keep b"
b
unmatched files in other:
c
- all copies found (* = to merge, ! = divergent, % = renamed and deleted):
+ all copies found (* = to merge, ! = divergent):
b -> a *
checking for directory renames
resolving manifests
- overwrite: False, partial: False
- ancestor: 924404dff337, local: 02963e448370+, remote: 2b958612230f
+ overwrite None partial False
+ ancestor 924404dff337 local 02963e448370+ remote 2b958612230f
b: local copied/moved to a -> m
rev: versions differ -> m
c: remote created -> g
@@ -750,5 +750,3 @@ m "nm a b" "um x a" " " "22 get a, keep b"
M c
--------------
-
- $ cd ..
diff --git a/tests/test-rename.t b/tests/test-rename.t
index 059f569..b26924d 100644
--- a/tests/test-rename.t
+++ b/tests/test-rename.t
@@ -69,7 +69,7 @@ rename --after a single file when src and tgt already tracked
rename --after a single file to a nonexistant target filename
$ hg rename --after d1/a dummy
- d1/a: not recording move - dummy does not exist (glob)
+ d1/a: not recording move - dummy does not exist
move a single file to an existing directory
@@ -119,10 +119,10 @@ rename --after a file using a relative path
rename directory d1 as d3
$ hg rename d1/ d3
- moving d1/a to d3/a (glob)
- moving d1/b to d3/b (glob)
- moving d1/ba to d3/ba (glob)
- moving d1/d11/a1 to d3/d11/a1 (glob)
+ moving d1/a to d3/a
+ moving d1/b to d3/b
+ moving d1/ba to d3/ba
+ moving d1/d11/a1 to d3/d11/a1
$ hg status -C
A d3/a
d1/a
@@ -144,10 +144,10 @@ rename --after directory d1 as d3
$ mv d1 d3
$ hg rename --after d1 d3
- moving d1/a to d3/a (glob)
- moving d1/b to d3/b (glob)
- moving d1/ba to d3/ba (glob)
- moving d1/d11/a1 to d3/d11/a1 (glob)
+ moving d1/a to d3/a
+ moving d1/b to d3/b
+ moving d1/ba to d3/ba
+ moving d1/d11/a1 to d3/d11/a1
$ hg status -C
A d3/a
d1/a
@@ -168,7 +168,7 @@ rename --after directory d1 as d3
move a directory using a relative path
$ (cd d2; mkdir d3; hg rename ../d1/d11 d3)
- moving ../d1/d11/a1 to d3/d11/a1 (glob)
+ moving ../d1/d11/a1 to d3/d11/a1
$ hg status -C
A d2/d3/d11/a1
d1/d11/a1
@@ -180,7 +180,7 @@ move a directory using a relative path
move --after a directory using a relative path
$ (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3)
- moving ../d1/d11/a1 to d3/d11/a1 (glob)
+ moving ../d1/d11/a1 to d3/d11/a1
$ hg status -C
A d2/d3/d11/a1
d1/d11/a1
@@ -192,7 +192,7 @@ move --after a directory using a relative path
move directory d1/d11 to an existing directory d2 (removes empty d1)
$ hg rename d1/d11/ d2
- moving d1/d11/a1 to d2/d11/a1 (glob)
+ moving d1/d11/a1 to d2/d11/a1
$ hg status -C
A d2/d11/a1
d1/d11/a1
@@ -205,11 +205,11 @@ move directories d1 and d2 to a new directory d3
$ mkdir d3
$ hg rename d1 d2 d3
- moving d1/a to d3/d1/a (glob)
- moving d1/b to d3/d1/b (glob)
- moving d1/ba to d3/d1/ba (glob)
- moving d1/d11/a1 to d3/d1/d11/a1 (glob)
- moving d2/b to d3/d2/b (glob)
+ moving d1/a to d3/d1/a
+ moving d1/b to d3/d1/b
+ moving d1/ba to d3/d1/ba
+ moving d1/d11/a1 to d3/d1/d11/a1
+ moving d2/b to d3/d2/b
$ hg status -C
A d3/d1/a
d1/a
@@ -235,11 +235,11 @@ move --after directories d1 and d2 to a new directory d3
$ mkdir d3
$ mv d1 d2 d3
$ hg rename --after d1 d2 d3
- moving d1/a to d3/d1/a (glob)
- moving d1/b to d3/d1/b (glob)
- moving d1/ba to d3/d1/ba (glob)
- moving d1/d11/a1 to d3/d1/d11/a1 (glob)
- moving d2/b to d3/d2/b (glob)
+ moving d1/a to d3/d1/a
+ moving d1/b to d3/d1/b
+ moving d1/ba to d3/d1/ba
+ moving d1/d11/a1 to d3/d1/d11/a1
+ moving d2/b to d3/d2/b
$ hg status -C
A d3/d1/a
d1/a
@@ -265,7 +265,7 @@ overwrite existing files (d2/b)
$ hg rename d1/* d2
d2/b: not overwriting - file exists
- moving d1/d11/a1 to d2/d11/a1 (glob)
+ moving d1/d11/a1 to d2/d11/a1
$ hg status -C
A d2/a
d1/a
@@ -306,10 +306,10 @@ move every file under d1 to d2/d21 (glob)
$ mkdir d2/d21
$ hg rename 'glob:d1/**' d2/d21
- moving d1/a to d2/d21/a (glob)
- moving d1/b to d2/d21/b (glob)
- moving d1/ba to d2/d21/ba (glob)
- moving d1/d11/a1 to d2/d21/a1 (glob)
+ moving d1/a to d2/d21/a
+ moving d1/b to d2/d21/b
+ moving d1/ba to d2/d21/ba
+ moving d1/d11/a1 to d2/d21/a1
$ hg status -C
A d2/d21/a
d1/a
@@ -332,10 +332,10 @@ move --after some files under d1 to d2/d21 (glob)
$ mkdir d2/d21
$ mv d1/a d1/d11/a1 d2/d21
$ hg rename --after 'glob:d1/**' d2/d21
- moving d1/a to d2/d21/a (glob)
- d1/b: not recording move - d2/d21/b does not exist (glob)
- d1/ba: not recording move - d2/d21/ba does not exist (glob)
- moving d1/d11/a1 to d2/d21/a1 (glob)
+ moving d1/a to d2/d21/a
+ d1/b: not recording move - d2/d21/b does not exist
+ d1/ba: not recording move - d2/d21/ba does not exist
+ moving d1/d11/a1 to d2/d21/a1
$ hg status -C
A d2/d21/a
d1/a
@@ -351,8 +351,8 @@ move every file under d1 starting with an 'a' to d2/d21 (regexp)
$ mkdir d2/d21
$ hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21
- moving d1/a to d2/d21/a (glob)
- moving d1/d11/a1 to d2/d21/a1 (glob)
+ moving d1/a to d2/d21/a
+ moving d1/d11/a1 to d2/d21/a1
$ hg status -C
A d2/d21/a
d1/a
@@ -388,7 +388,6 @@ forced overwrite of an existing file
attempt to overwrite an existing broken symlink
-#if symlink
$ ln -s ba d1/ca
$ hg rename --traceback d1/ba d1/ca
d1/ca: not overwriting - file exists
@@ -409,13 +408,12 @@ replace a symlink with a file
$ hg update -C
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm d1/ca
-#endif
do not copy more than one source file to the same destination file
$ mkdir d3
$ hg rename d1/* d2/* d3
- moving d1/d11/a1 to d3/d11/a1 (glob)
+ moving d1/d11/a1 to d3/d11/a1
d3/b: not overwriting - d2/b collides with d1/b
$ hg status -C
A d3/a
@@ -441,7 +439,7 @@ move a whole subtree with "hg rename ."
moving a to ../d3/d1/a
moving b to ../d3/d1/b
moving ba to ../d3/d1/ba
- moving d11/a1 to ../d3/d1/d11/a1 (glob)
+ moving d11/a1 to ../d3/d1/d11/a1
$ hg status -C
A d3/d1/a
d1/a
@@ -467,7 +465,7 @@ move a whole subtree with "hg rename --after ."
moving a to ../d3/a
moving b to ../d3/b
moving ba to ../d3/ba
- moving d11/a1 to ../d3/d11/a1 (glob)
+ moving d11/a1 to ../d3/d11/a1
$ hg status -C
A d3/a
d1/a
@@ -488,9 +486,9 @@ move a whole subtree with "hg rename --after ."
move the parent tree with "hg rename .."
$ (cd d1/d11; hg rename .. ../../d3)
- moving ../a to ../../d3/a (glob)
- moving ../b to ../../d3/b (glob)
- moving ../ba to ../../d3/ba (glob)
+ moving ../a to ../../d3/a
+ moving ../b to ../../d3/b
+ moving ../ba to ../../d3/ba
moving a1 to ../../d3/d11/a1
$ hg status -C
A d3/a
@@ -513,9 +511,9 @@ skip removed files
$ hg remove d1/b
$ hg rename d1 d3
- moving d1/a to d3/a (glob)
- moving d1/ba to d3/ba (glob)
- moving d1/d11/a1 to d3/d11/a1 (glob)
+ moving d1/a to d3/a
+ moving d1/ba to d3/ba
+ moving d1/d11/a1 to d3/d11/a1
$ hg status -C
A d3/a
d1/a
@@ -589,7 +587,7 @@ overwriting with renames (issue1959)
check illegal path components
$ hg rename d1/d11/a1 .hg/foo
- abort: path contains illegal component: .hg/foo (glob)
+ abort: path contains illegal component: .hg/foo
[255]
$ hg status -C
$ hg rename d1/d11/a1 ../foo
@@ -599,7 +597,7 @@ check illegal path components
$ mv d1/d11/a1 .hg/foo
$ hg rename --after d1/d11/a1 .hg/foo
- abort: path contains illegal component: .hg/foo (glob)
+ abort: path contains illegal component: .hg/foo
[255]
$ hg status -C
! d1/d11/a1
@@ -608,17 +606,17 @@ check illegal path components
$ rm .hg/foo
$ hg rename d1/d11/a1 .hg
- abort: path contains illegal component: .hg/a1 (glob)
+ abort: path contains illegal component: .hg/a1
[255]
$ hg status -C
$ hg rename d1/d11/a1 ..
- abort: ../a1 not under root (glob)
+ abort: ../a1 not under root
[255]
$ hg status -C
$ mv d1/d11/a1 .hg
$ hg rename --after d1/d11/a1 .hg
- abort: path contains illegal component: .hg/a1 (glob)
+ abort: path contains illegal component: .hg/a1
[255]
$ hg status -C
! d1/d11/a1
@@ -627,7 +625,7 @@ check illegal path components
$ rm .hg/a1
$ (cd d1/d11; hg rename ../../d2/b ../../.hg/foo)
- abort: path contains illegal component: .hg/foo (glob)
+ abort: path contains illegal component: .hg/foo
[255]
$ hg status -C
$ (cd d1/d11; hg rename ../../d2/b ../../../foo)
diff --git a/tests/test-repair-strip.t b/tests/test-repair-strip.t
index 6393ea2..bc7dc9d 100644
--- a/tests/test-repair-strip.t
+++ b/tests/test-repair-strip.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" unix-permissions || exit 80
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=">> $HGRCPATH
@@ -129,4 +128,3 @@
checking files
2 files, 2 changesets, 2 total revisions
- $ cd ..
diff --git a/tests/test-requires.t b/tests/test-requires.t
index ff3427d..9b487f5 100644
--- a/tests/test-requires.t
+++ b/tests/test-requires.t
@@ -15,5 +15,3 @@
$ hg tip
abort: unknown repository format: requires features 'indoor-pool', 'outdoor-pool' (upgrade Mercurial)!
[255]
-
- $ cd ..
diff --git a/tests/test-resolve.t b/tests/test-resolve.t
index 86dc9ea..c895488 100644
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -42,5 +42,3 @@ test crashed merge with empty mergestate
resolve -l, should be empty
$ hg resolve -l
-
- $ cd ..
diff --git a/tests/test-revert-flags.t b/tests/test-revert-flags.t
index 890e590..6419dec 100644
--- a/tests/test-revert-flags.t
+++ b/tests/test-revert-flags.t
@@ -19,5 +19,3 @@ reverting to rev 0
diff --git a/foo b/foo
old mode 100755
new mode 100644
-
- $ cd ..
diff --git a/tests/test-revert.t b/tests/test-revert.t
index c2b085f..e0751f0 100644
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -80,7 +80,7 @@ should show b deleted
should not find b
$ hg status b
- b: * (glob)
+ b: No such file or directory
should show a c e
@@ -153,7 +153,6 @@ should silently keep d removed
$ hg update -C
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-#if execbit
$ chmod +x c
$ hg revert --all
reverting c
@@ -174,7 +173,6 @@ should print executable
$ test -x c && echo executable
executable
-#endif
$ cd ..
@@ -216,11 +214,11 @@ Issue332: confusing message when reverting directory
$ echo foo > newdir/newfile
$ hg add newdir/newfile
$ hg revert b newdir
- reverting b/b (glob)
- forgetting newdir/newfile (glob)
+ reverting b/b
+ forgetting newdir/newfile
$ echo foobar > b/b
$ hg revert .
- reverting b/b (glob)
+ reverting b/b
reverting a rename target should revert the source
@@ -261,8 +259,8 @@ should revert ignored* and undelete *removed
$ hg revert -a --no-backup
reverting ignored
- reverting ignoreddir/file (glob)
- undeleting ignoreddir/removed (glob)
+ reverting ignoreddir/file
+ undeleting ignoreddir/removed
undeleting removed
$ hg st -mardi
@@ -274,5 +272,3 @@ should silently revert the named files
$ hg revert --no-backup ignored removed
$ hg st -mardi
-
- $ cd ..
diff --git a/tests/test-revlog-ancestry.py b/tests/test-revlog-ancestry.py
index 0834646..e5c2a42 100644
--- a/tests/test-revlog-ancestry.py
+++ b/tests/test-revlog-ancestry.py
@@ -47,31 +47,27 @@ if __name__ == '__main__':
# Ancestors
print 'Ancestors of 5'
- for r in repo.changelog.ancestors([5]):
+ for r in repo.changelog.ancestors(5):
print r,
print '\nAncestors of 6 and 5'
- for r in repo.changelog.ancestors([6, 5]):
+ for r in repo.changelog.ancestors(6, 5):
print r,
print '\nAncestors of 5 and 4'
- for r in repo.changelog.ancestors([5, 4]):
- print r,
-
- print '\nAncestors of 7, stop at 6'
- for r in repo.changelog.ancestors([7], 6):
+ for r in repo.changelog.ancestors(5, 4):
print r,
# Descendants
print '\n\nDescendants of 5'
- for r in repo.changelog.descendants([5]):
+ for r in repo.changelog.descendants(5):
print r,
print '\nDescendants of 5 and 3'
- for r in repo.changelog.descendants([5, 3]):
+ for r in repo.changelog.descendants(5, 3):
print r,
print '\nDescendants of 5 and 4'
- for r in repo.changelog.descendants([5, 4]):
+ for r in repo.changelog.descendants(5, 4):
print r,
diff --git a/tests/test-revlog-ancestry.py.out b/tests/test-revlog-ancestry.py.out
index d5c167a..b0b37ea 100644
--- a/tests/test-revlog-ancestry.py.out
+++ b/tests/test-revlog-ancestry.py.out
@@ -4,8 +4,6 @@ Ancestors of 6 and 5
3 4 2 1 0
Ancestors of 5 and 4
4 2 0
-Ancestors of 7, stop at 6
-6
Descendants of 5
7 8
diff --git a/tests/test-revlog-group-emptyiter.t b/tests/test-revlog-group-emptyiter.t
index 905a6e0..f97a020 100644
--- a/tests/test-revlog-group-emptyiter.t
+++ b/tests/test-revlog-group-emptyiter.t
@@ -32,4 +32,3 @@ pushing
adding file changes
added 1 changesets with 0 changes to 0 files (+1 heads)
- $ cd ..
diff --git a/tests/test-revlog-packentry.t b/tests/test-revlog-packentry.t
index 4bcb3f9..160869c 100644
--- a/tests/test-revlog-packentry.t
+++ b/tests/test-revlog-packentry.t
@@ -16,8 +16,6 @@ this should be stored as a delta against rev 0
created new head
$ hg debugindex foo
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 0 ..... 0 b80de5d13875 000000000000 000000000000 (re)
- 1 0 24 ..... 1 0376abec49b8 000000000000 000000000000 (re)
-
- $ cd ..
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 0 0 0 b80de5d13875 000000000000 000000000000
+ 1 0 24 0 1 0376abec49b8 000000000000 000000000000
diff --git a/tests/test-revset-dirstate-parents.t b/tests/test-revset-dirstate-parents.t
index 0582bc7..27e6d18 100644
--- a/tests/test-revset-dirstate-parents.t
+++ b/tests/test-revset-dirstate-parents.t
@@ -13,17 +13,11 @@
$ cd repo
$ try 'p1()'
- (func
- ('symbol', 'p1')
- None)
+ ('func', ('symbol', 'p1'), None)
$ try 'p2()'
- (func
- ('symbol', 'p2')
- None)
+ ('func', ('symbol', 'p2'), None)
$ try 'parents()'
- (func
- ('symbol', 'parents')
- None)
+ ('func', ('symbol', 'parents'), None)
null revision
$ log 'p1()'
@@ -56,5 +50,3 @@ merge in progress
$ log 'parents()'
1
2
-
- $ cd ..
diff --git a/tests/test-revset-outgoing.t b/tests/test-revset-outgoing.t
index 18d36f2..456c684 100644
--- a/tests/test-revset-outgoing.t
+++ b/tests/test-revset-outgoing.t
@@ -21,7 +21,6 @@
$ hg branch stable
marked working directory as branch stable
- (branches are permanent and global, did you want a bookmark?)
$ echo bar >> a
$ hg ci -qm2
@@ -40,7 +39,7 @@
$ cd b
$ cat .hg/hgrc
[paths]
- default = $TESTTMP/a#stable (glob)
+ default = $TESTTMP/a#stable
$ echo red >> a
$ hg ci -qm3
@@ -61,7 +60,7 @@
$ hg tout
- comparing with $TESTTMP/a (glob)
+ comparing with $TESTTMP/a
searching for changes
2:1d4099801a4e: '3' stable
@@ -80,15 +79,14 @@
$ cat .hg/hgrc
[paths]
- default = $TESTTMP/a#stable (glob)
+ default = $TESTTMP/a#stable
green = ../a#default
$ hg tout green
- comparing with $TESTTMP/a (glob)
+ comparing with $TESTTMP/a
searching for changes
3:f0461977a3db: '4'
$ hg tlog -r 'outgoing("green")'
3:f0461977a3db: '4'
- $ cd ..
diff --git a/tests/test-revset.t b/tests/test-revset.t
index 2a41901..242ec6c 100644
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -15,36 +15,22 @@
$ echo a > a
$ hg branch a
marked working directory as branch a
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm0
$ echo b > b
$ hg branch b
marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm1
$ rm a
$ hg branch a-b-c-
marked working directory as branch a-b-c-
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm2 -u Bob
- $ hg log -r "extra('branch', 'a-b-c-')" --template '{rev}\n'
- 2
- $ hg log -r "extra('branch')" --template '{rev}\n'
- 0
- 1
- 2
- $ hg log -r "extra('branch', 're:a')" --template '{rev} {branch}\n'
- 0 a
- 2 a-b-c-
-
$ hg co 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch +a+b+c+
marked working directory as branch +a+b+c+
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm3
$ hg co 2 # interleave
@@ -52,14 +38,12 @@
$ echo bb > b
$ hg branch -- -a-b-c-
marked working directory as branch -a-b-c-
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm4 -d "May 12 2005"
$ hg co 3
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg branch !a/b/c/
- marked working directory as branch !a/b/c/
- (branches are permanent and global, did you want a bookmark?)
+ $ hg branch /a/b/c/
+ marked working directory as branch /a/b/c/
$ hg ci -Aqm"5 bug"
$ hg merge 4
@@ -67,17 +51,14 @@
(branch merge, don't forget to commit)
$ hg branch _a_b_c_
marked working directory as branch _a_b_c_
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm"6 issue619"
$ hg branch .a.b.c.
marked working directory as branch .a.b.c.
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm7
$ hg branch all
marked working directory as branch all
- (branches are permanent and global, did you want a bookmark?)
$ hg ci --close-branch -Aqm8
abort: can only close branch heads
[255]
@@ -86,7 +67,6 @@
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg branch é
marked working directory as branch \xc3\xa9 (esc)
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -Aqm9
$ hg tag -r6 1.0
@@ -102,25 +82,19 @@ names that should work without quoting
('symbol', 'a')
0
$ try b-a
- (minus
- ('symbol', 'b')
- ('symbol', 'a'))
+ ('minus', ('symbol', 'b'), ('symbol', 'a'))
1
$ try _a_b_c_
('symbol', '_a_b_c_')
6
$ try _a_b_c_-a
- (minus
- ('symbol', '_a_b_c_')
- ('symbol', 'a'))
+ ('minus', ('symbol', '_a_b_c_'), ('symbol', 'a'))
6
$ try .a.b.c.
('symbol', '.a.b.c.')
7
$ try .a.b.c.-a
- (minus
- ('symbol', '.a.b.c.')
- ('symbol', 'a'))
+ ('minus', ('symbol', '.a.b.c.'), ('symbol', 'a'))
7
$ try -- '-a-b-c-' # complains
hg: parse error at 7: not a prefix: end
@@ -128,15 +102,7 @@ names that should work without quoting
$ log -a-b-c- # succeeds with fallback
4
$ try -- -a-b-c--a # complains
- (minus
- (minus
- (minus
- (negate
- ('symbol', 'a'))
- ('symbol', 'b'))
- ('symbol', 'c'))
- (negate
- ('symbol', 'a')))
+ ('minus', ('minus', ('minus', ('negate', ('symbol', 'a')), ('symbol', 'b')), ('symbol', 'c')), ('negate', ('symbol', 'a')))
abort: unknown revision '-a'!
[255]
$ try é
@@ -146,9 +112,7 @@ names that should work without quoting
quoting needed
$ try '"-a-b-c-"-a'
- (minus
- ('string', '-a-b-c-')
- ('symbol', 'a'))
+ ('minus', ('string', '-a-b-c-'), ('symbol', 'a'))
4
$ log '1 or 2'
@@ -160,32 +124,15 @@ quoting needed
$ log '1 and 2'
$ log '1&2'
$ try '1&2|3' # precedence - and is higher
- (or
- (and
- ('symbol', '1')
- ('symbol', '2'))
- ('symbol', '3'))
+ ('or', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
3
$ try '1|2&3'
- (or
- ('symbol', '1')
- (and
- ('symbol', '2')
- ('symbol', '3')))
+ ('or', ('symbol', '1'), ('and', ('symbol', '2'), ('symbol', '3')))
1
$ try '1&2&3' # associativity
- (and
- (and
- ('symbol', '1')
- ('symbol', '2'))
- ('symbol', '3'))
+ ('and', ('and', ('symbol', '1'), ('symbol', '2')), ('symbol', '3'))
$ try '1|(2|3)'
- (or
- ('symbol', '1')
- (group
- (or
- ('symbol', '2')
- ('symbol', '3'))))
+ ('or', ('symbol', '1'), ('group', ('or', ('symbol', '2'), ('symbol', '3'))))
1
2
3
@@ -231,30 +178,9 @@ quoting needed
5
$ log 'author(bob)'
2
- $ log 'author("re:bob|test")'
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
$ log 'branch(é)'
8
9
- $ log 'branch(a)'
- 0
- $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n'
- 0 a
- 2 a-b-c-
- 3 +a+b+c+
- 4 -a-b-c-
- 5 !a/b/c/
- 6 _a_b_c_
- 7 .a.b.c.
$ log 'children(ancestor(4,5))'
2
3
@@ -275,7 +201,7 @@ quoting needed
7
8
9
- $ log 'file("b*")'
+ $ log 'file(b)'
1
4
$ log 'follow()'
@@ -288,19 +214,13 @@ quoting needed
$ log 'grep("issue\d+")'
6
$ try 'grep("(")' # invalid regular expression
- (func
- ('symbol', 'grep')
- ('string', '('))
+ ('func', ('symbol', 'grep'), ('string', '('))
hg: parse error: invalid match pattern: unbalanced parenthesis
[255]
$ try 'grep("\bissue\d+")'
- (func
- ('symbol', 'grep')
- ('string', '\x08issue\\d+'))
+ ('func', ('symbol', 'grep'), ('string', '\x08issue\\d+'))
$ try 'grep(r"\bissue\d+")'
- (func
- ('symbol', 'grep')
- ('string', '\\bissue\\d+'))
+ ('func', ('symbol', 'grep'), ('string', '\\bissue\\d+'))
6
$ try 'grep(r"\")'
hg: parse error at 7: unterminated string
@@ -321,11 +241,6 @@ quoting needed
6
$ log 'limit(head(), 1)'
0
- $ log 'matching(6)'
- 6
- $ log 'matching(6:7, "phase parents user date branch summary files description substate")'
- 6
- 7
$ log 'max(contains(a))'
5
$ log 'min(contains(a))'
@@ -334,13 +249,6 @@ quoting needed
6
$ log 'modifies(b)'
4
- $ log 'modifies("path:b")'
- 4
- $ log 'modifies("*")'
- 4
- 6
- $ log 'modifies("set:modified()")'
- 4
$ log 'id(5)'
2
$ log 'outgoing()'
@@ -372,17 +280,6 @@ quoting needed
4
3
2
- $ log 'reverse(all())'
- 9
- 8
- 7
- 6
- 5
- 4
- 3
- 2
- 1
- 0
$ log 'rev(5)'
5
$ log 'sort(limit(reverse(all()), 3))'
@@ -402,22 +299,6 @@ quoting needed
6
$ log 'tag(tip)'
9
-
-we can use patterns when searching for tags
-
- $ log 'tag("1..*")'
- abort: tag '1..*' does not exist
- [255]
- $ log 'tag("re:1..*")'
- 6
- $ log 'tag("re:[0-9].[0-9]")'
- 6
- $ log 'tag("literal:1.0")'
- 6
- $ log 'tag("re:0..*")'
- abort: no tags exist that match '0..*'
- [255]
-
$ log 'tag(unknown)'
abort: tag 'unknown' does not exist
[255]
@@ -466,10 +347,6 @@ we can use patterns when searching for tags
0
$ log '4::8 - 8'
4
- $ log 'matching(1 or 2 or 3) and (2 or 3 or 1)'
- 2
- 3
- 1
issue2437
@@ -483,8 +360,6 @@ issue2437
2
$ log 'roots(all()) or roots(all())'
0
- $ hg debugrevspec 'roots(all()) or roots(all())'
- 0
$ log 'heads(branch(é)) or heads(branch(é))'
9
$ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(é)))'
@@ -543,192 +418,41 @@ aliases:
$ echo '[revsetalias]' >> .hg/hgrc
$ echo 'm = merge()' >> .hg/hgrc
- $ echo 'sincem = descendants(m)' >> .hg/hgrc
$ echo 'd($1) = reverse(sort($1, date))' >> .hg/hgrc
$ echo 'rs(ARG1, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
$ echo 'rs4(ARG1, ARGA, ARGB, ARG2) = reverse(sort(ARG1, ARG2))' >> .hg/hgrc
$ try m
('symbol', 'm')
- (func
- ('symbol', 'merge')
- None)
- 6
-
-test alias recursion
-
- $ try sincem
- ('symbol', 'sincem')
- (func
- ('symbol', 'descendants')
- (func
- ('symbol', 'merge')
- None))
+ ('func', ('symbol', 'merge'), None)
6
- 7
-
-test infinite recursion
-
- $ echo 'recurse1 = recurse2' >> .hg/hgrc
- $ echo 'recurse2 = recurse1' >> .hg/hgrc
- $ try recurse1
- ('symbol', 'recurse1')
- hg: parse error: infinite expansion of revset alias "recurse1" detected
- [255]
-
- $ echo 'level1($1, $2) = $1 or $2' >> .hg/hgrc
- $ echo 'level2($1, $2) = level1($2, $1)' >> .hg/hgrc
- $ try "level2(level1(1, 2), 3)"
- (func
- ('symbol', 'level2')
- (list
- (func
- ('symbol', 'level1')
- (list
- ('symbol', '1')
- ('symbol', '2')))
- ('symbol', '3')))
- (or
- ('symbol', '3')
- (or
- ('symbol', '1')
- ('symbol', '2')))
- 3
- 1
- 2
-
-test nesting and variable passing
-
- $ echo 'nested($1) = nested2($1)' >> .hg/hgrc
- $ echo 'nested2($1) = nested3($1)' >> .hg/hgrc
- $ echo 'nested3($1) = max($1)' >> .hg/hgrc
- $ try 'nested(2:5)'
- (func
- ('symbol', 'nested')
- (range
- ('symbol', '2')
- ('symbol', '5')))
- (func
- ('symbol', 'max')
- (range
- ('symbol', '2')
- ('symbol', '5')))
- 5
-
-test variable isolation, variable placeholders are rewritten as string
-then parsed and matched again as string. Check they do not leak too
-far away.
-
- $ echo 'injectparamasstring = max("$1")' >> .hg/hgrc
- $ echo 'callinjection($1) = descendants(injectparamasstring)' >> .hg/hgrc
- $ try 'callinjection(2:5)'
- (func
- ('symbol', 'callinjection')
- (range
- ('symbol', '2')
- ('symbol', '5')))
- (func
- ('symbol', 'descendants')
- (func
- ('symbol', 'max')
- ('string', '$1')))
- abort: unknown revision '$1'!
- [255]
-
- $ echo 'injectparamasstring2 = max(_aliasarg("$1"))' >> .hg/hgrc
- $ echo 'callinjection2($1) = descendants(injectparamasstring2)' >> .hg/hgrc
- $ try 'callinjection2(2:5)'
- (func
- ('symbol', 'callinjection2')
- (range
- ('symbol', '2')
- ('symbol', '5')))
- hg: parse error: not a function: _aliasarg
- [255]
- >>> data = file('.hg/hgrc', 'rb').read()
- >>> file('.hg/hgrc', 'wb').write(data.replace('_aliasarg', ''))
-
$ try 'd(2:5)'
- (func
- ('symbol', 'd')
- (range
- ('symbol', '2')
- ('symbol', '5')))
- (func
- ('symbol', 'reverse')
- (func
- ('symbol', 'sort')
- (list
- (range
- ('symbol', '2')
- ('symbol', '5'))
- ('symbol', 'date'))))
+ ('func', ('symbol', 'd'), ('range', ('symbol', '2'), ('symbol', '5')))
+ ('func', ('symbol', 'reverse'), ('func', ('symbol', 'sort'), ('list', ('range', ('symbol', '2'), ('symbol', '5')), ('symbol', 'date'))))
4
5
3
2
$ try 'rs(2 or 3, date)'
- (func
- ('symbol', 'rs')
- (list
- (or
- ('symbol', '2')
- ('symbol', '3'))
- ('symbol', 'date')))
- (func
- ('symbol', 'reverse')
- (func
- ('symbol', 'sort')
- (list
- (or
- ('symbol', '2')
- ('symbol', '3'))
- ('symbol', 'date'))))
+ ('func', ('symbol', 'rs'), ('list', ('or', ('symbol', '2'), ('symbol', '3')), ('symbol', 'date')))
+ ('func', ('symbol', 'reverse'), ('func', ('symbol', 'sort'), ('list', ('or', ('symbol', '2'), ('symbol', '3')), ('symbol', 'date'))))
3
2
$ try 'rs()'
- (func
- ('symbol', 'rs')
- None)
+ ('func', ('symbol', 'rs'), None)
hg: parse error: invalid number of arguments: 0
[255]
$ try 'rs(2)'
- (func
- ('symbol', 'rs')
- ('symbol', '2'))
+ ('func', ('symbol', 'rs'), ('symbol', '2'))
hg: parse error: invalid number of arguments: 1
[255]
$ try 'rs(2, data, 7)'
- (func
- ('symbol', 'rs')
- (list
- (list
- ('symbol', '2')
- ('symbol', 'data'))
- ('symbol', '7')))
+ ('func', ('symbol', 'rs'), ('list', ('list', ('symbol', '2'), ('symbol', 'data')), ('symbol', '7')))
hg: parse error: invalid number of arguments: 3
[255]
$ try 'rs4(2 or 3, x, x, date)'
- (func
- ('symbol', 'rs4')
- (list
- (list
- (list
- (or
- ('symbol', '2')
- ('symbol', '3'))
- ('symbol', 'x'))
- ('symbol', 'x'))
- ('symbol', 'date')))
- (func
- ('symbol', 'reverse')
- (func
- ('symbol', 'sort')
- (list
- (or
- ('symbol', '2')
- ('symbol', '3'))
- ('symbol', 'date'))))
+ ('func', ('symbol', 'rs4'), ('list', ('list', ('list', ('or', ('symbol', '2'), ('symbol', '3')), ('symbol', 'x')), ('symbol', 'x')), ('symbol', 'date')))
+ ('func', ('symbol', 'reverse'), ('func', ('symbol', 'sort'), ('list', ('or', ('symbol', '2'), ('symbol', '3')), ('symbol', 'date'))))
3
2
@@ -739,79 +463,3 @@ issue2549 - correct optimizations
$ log 'max(1 or 2) and not 2'
$ log 'min(1 or 2) and not 1'
$ log 'last(1 or 2, 1) and not 2'
-
-tests for 'remote()' predicate:
-#. (csets in remote) (id) (remote)
-1. less than local current branch "default"
-2. same with local specified "default"
-3. more than local specified specified
-
- $ hg clone --quiet -U . ../remote3
- $ cd ../remote3
- $ hg update -q 7
- $ echo r > r
- $ hg ci -Aqm 10
- $ log 'remote()'
- 7
- $ log 'remote("a-b-c-")'
- 2
- $ cd ../repo
- $ log 'remote(".a.b.c.", "../remote3")'
-
- $ cd ..
-
-test author/desc/keyword in problematic encoding
-# unicode: cp932:
-# u30A2 0x83 0x41(= 'A')
-# u30C2 0x83 0x61(= 'a')
-
- $ hg init problematicencoding
- $ cd problematicencoding
-
- $ python > setup.sh <<EOF
- > print u'''
- > echo a > text
- > hg add text
- > hg --encoding utf-8 commit -u '\u30A2' -m none
- > echo b > text
- > hg --encoding utf-8 commit -u '\u30C2' -m none
- > echo c > text
- > hg --encoding utf-8 commit -u none -m '\u30A2'
- > echo d > text
- > hg --encoding utf-8 commit -u none -m '\u30C2'
- > '''.encode('utf-8')
- > EOF
- $ sh < setup.sh
-
-test in problematic encoding
- $ python > test.sh <<EOF
- > print u'''
- > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30A2)'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -r 'author(\u30C2)'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30A2)'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -r 'desc(\u30C2)'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30A2)'
- > echo ====
- > hg --encoding cp932 log --template '{rev}\\n' -r 'keyword(\u30C2)'
- > '''.encode('cp932')
- > EOF
- $ sh < test.sh
- 0
- ====
- 1
- ====
- 2
- ====
- 3
- ====
- 0
- 2
- ====
- 1
- 3
-
- $ cd ..
diff --git a/tests/test-rollback.t b/tests/test-rollback.t
index 305555b..889e350 100644
--- a/tests/test-rollback.t
+++ b/tests/test-rollback.t
@@ -1,9 +1,9 @@
-setup repo
+
$ hg init t
$ cd t
$ echo a > a
- $ hg commit -Am'add a'
- adding a
+ $ hg add a
+ $ hg commit -m "test"
$ hg verify
checking changesets
checking manifests
@@ -11,14 +11,12 @@ setup repo
checking files
1 files, 1 changesets, 1 total revisions
$ hg parents
- changeset: 0:1f0dee641bb7
+ changeset: 0:acb14030fe0a
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
- summary: add a
+ summary: test
-
-rollback to null revision
$ hg status
$ hg rollback
repository tip rolled back to revision -1 (undo commit)
@@ -33,68 +31,36 @@ rollback to null revision
$ hg status
A a
-Two changesets this time so we rollback to a real changeset
- $ hg commit -m'add a again'
- $ echo a >> a
- $ hg commit -m'modify a'
+Test issue 902
-Test issue 902 (current branch is preserved)
+ $ hg commit -m "test2"
$ hg branch test
marked working directory as branch test
- (branches are permanent and global, did you want a bookmark?)
$ hg rollback
- repository tip rolled back to revision 0 (undo commit)
- working directory now based on revision 0
+ repository tip rolled back to revision -1 (undo commit)
+ working directory now based on revision -1
$ hg branch
default
Test issue 1635 (commit message saved)
+.hg/last-message.txt:
+
$ cat .hg/last-message.txt ; echo
- modify a
+ test2
Test rollback of hg before issue 902 was fixed
$ hg commit -m "test3"
$ hg branch test
marked working directory as branch test
- (branches are permanent and global, did you want a bookmark?)
$ rm .hg/undo.branch
$ hg rollback
- repository tip rolled back to revision 0 (undo commit)
- named branch could not be reset: current branch is still 'test'
- working directory now based on revision 0
+ repository tip rolled back to revision -1 (undo commit)
+ named branch could not be reset, current branch is still: test
+ working directory now based on revision -1
$ hg branch
test
-working dir unaffected by rollback: do not restore dirstate et. al.
- $ hg log --template '{rev} {branch} {desc|firstline}\n'
- 0 default add a again
- $ hg status
- M a
- $ hg bookmark foo
- $ hg commit -m'modify a again'
- $ echo b > b
- $ hg commit -Am'add b'
- adding b
- $ hg log --template '{rev} {branch} {desc|firstline}\n'
- 2 test add b
- 1 test modify a again
- 0 default add a again
- $ hg update default
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg bookmark bar
- $ cat .hg/undo.branch ; echo
- test
- $ hg rollback -f
- repository tip rolled back to revision 1 (undo commit)
- $ hg id -n
- 0
- $ hg branch
- default
- $ cat .hg/bookmarks.current ; echo
- bar
- $ hg bookmark --delete foo
-
rollback by pretxncommit saves commit message (issue 1635)
$ echo a >> a
@@ -103,15 +69,20 @@ rollback by pretxncommit saves commit message (issue 1635)
rollback completed
abort: pretxncommit hook exited with status * (glob)
[255]
+
+.hg/last-message.txt:
+
$ cat .hg/last-message.txt ; echo
precious commit message
same thing, but run $EDITOR
- $ cat > editor.sh << '__EOF__'
+ $ cat > editor << '__EOF__'
+ > #!/bin/sh
> echo "another precious commit message" > "$1"
> __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg --config hooks.pretxncommit=false commit 2>&1
+ $ chmod +x editor
+ $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
transaction abort!
rollback completed
note: commit message saved in .hg/last-message.txt
@@ -122,7 +93,6 @@ same thing, but run $EDITOR
test rollback on served repository
-#if serve
$ hg commit -m "precious commit message"
$ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
@@ -132,56 +102,18 @@ test rollback on served repository
adding changesets
adding manifests
adding file changes
- added 3 changesets with 2 changes to 1 files (+1 heads)
- updating to branch default
+ added 1 changesets with 1 changes to 1 files
+ updating to branch test
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd u
$ hg id default
- 068774709090
+ 1df294f7b1a2
now rollback and observe that 'hg serve' reloads the repository and
presents the correct tip changeset:
$ hg -R ../t rollback
- repository tip rolled back to revision 1 (undo commit)
- working directory now based on revision 0
+ repository tip rolled back to revision -1 (undo commit)
+ working directory now based on revision -1
$ hg id default
- 791dd2169706
-#endif
-
-update to older changeset and then refuse rollback, because
-that would lose data (issue2998)
- $ cd ../t
- $ hg -q update
- $ rm `hg status -un`
- $ template='{rev}:{node|short} [{branch}] {desc|firstline}\n'
- $ echo 'valuable new file' > b
- $ echo 'valuable modification' >> a
- $ hg commit -A -m'a valuable change'
- adding b
- $ hg update 0
- 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg rollback
- abort: rollback of last commit while not checked out may lose data
- (use -f to force)
- [255]
- $ hg tip -q
- 2:4d9cd3795eea
- $ hg rollback -f
- repository tip rolled back to revision 1 (undo commit)
- $ hg status
- $ hg log --removed b # yep, it's gone
-
-same again, but emulate an old client that doesn't write undo.desc
- $ hg -q update
- $ echo 'valuable modification redux' >> a
- $ hg commit -m'a valuable change redux'
- $ rm .hg/undo.desc
- $ hg update 0
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg rollback
- rolling back unknown transaction
- $ cat a
- a
-
- $ cd ..
+ 000000000000
diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
index 68b60cf..977f0fd 100644
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -16,25 +16,6 @@ Multi-line command:
$ foo
bar
-Return codes before inline python:
-
- $ sh -c 'exit 1'
- [1]
-
-Doctest commands:
-
- >>> print 'foo'
- foo
- $ echo interleaved
- interleaved
- >>> for c in 'xyz':
- ... print c
- x
- y
- z
- >>> print
-
-
Regular expressions:
$ echo foobarbaz
@@ -52,47 +33,6 @@ Literal match ending in " (re)":
$ echo 'foo (re)'
foo (re)
-testing hghave
-
- $ "$TESTDIR/hghave" true
- $ "$TESTDIR/hghave" false
- skipped: missing feature: nail clipper
- [1]
- $ "$TESTDIR/hghave" no-true
- skipped: system supports yak shaving
- [1]
- $ "$TESTDIR/hghave" no-false
-
-Conditional sections based on hghave:
-
-#if true
- $ echo tested
- tested
-#else
- $ echo skipped
-#endif
-
-#if false
- $ echo skipped
-#else
- $ echo tested
- tested
-#endif
-
-#if no-false
- $ echo tested
- tested
-#else
- $ echo skipped
-#endif
-
-#if no-true
- $ echo skipped
-#else
- $ echo tested
- tested
-#endif
-
Exit code:
$ (exit 1)
diff --git a/tests/test-schemes.t b/tests/test-schemes.t
index a31ae80..7ae54f4 100644
--- a/tests/test-schemes.t
+++ b/tests/test-schemes.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ cat <<EOF >> $HGRCPATH
> [extensions]
@@ -46,5 +45,3 @@ check that paths are expanded
errors
$ cat errors.log
-
- $ cd ..
diff --git a/tests/test-serve.t b/tests/test-serve.t
index 8ae4a86..20784b4 100644
--- a/tests/test-serve.t
+++ b/tests/test-serve.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ hgserve()
> {
@@ -9,12 +8,13 @@
> cat hg.pid >> "$DAEMON_PIDS"
> echo % errors
> cat errors.log
+ > sleep 1
> if [ "$KILLQUIETLY" = "Y" ]; then
> kill `cat hg.pid` 2>/dev/null
> else
> kill `cat hg.pid`
> fi
- > while kill -0 `cat hg.pid` 2>/dev/null; do sleep 0; done
+ > sleep 1
> }
$ hg init test
@@ -28,9 +28,9 @@ Without -v
$ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log
$ cat hg.pid >> "$DAEMON_PIDS"
$ if [ -f access.log ]; then
- > echo 'access log created - .hg/hgrc respected'
- > fi
+ $ echo 'access log created - .hg/hgrc respected'
access log created - .hg/hgrc respected
+ $ fi
errors
@@ -80,5 +80,3 @@ With --prefix /foo/
$ hgserve --prefix /foo/
listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
% errors
-
- $ cd ..
diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
index cca197d..72d0d87 100644
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -288,7 +288,7 @@ One with >200 heads, which used to use up all of the sample:
reading DAG from stdin
$ hg heads -t --template . | wc -c
- \s*261 (re)
+ *261 (re)
$ hg clone -b a . a
adding changesets
@@ -324,4 +324,3 @@ One with >200 heads, which used to use up all of the sample:
5 total queries
common heads: 3ee37d65064a
- $ cd ..
diff --git a/tests/test-share.t b/tests/test-share.t
index 0eb755f..ba20b02 100644
--- a/tests/test-share.t
+++ b/tests/test-share.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
$ echo "[extensions]" >> $HGRCPATH
$ echo "share = " >> $HGRCPATH
@@ -27,16 +26,7 @@ share shouldn't have a store dir
Some sed versions appends newline, some don't, and some just fails
$ cat .hg/sharedpath; echo
- $TESTTMP/repo1/.hg (glob)
-
-trailing newline on .hg/sharedpath is ok
- $ hg tip -q
- 0:d3873e73d99e
- $ echo '' >> .hg/sharedpath
- $ cat .hg/sharedpath
- $TESTTMP/repo1/.hg (glob)
- $ hg tip -q
- 0:d3873e73d99e
+ $TESTTMP/repo1/.hg
commit in shared clone
@@ -99,7 +89,7 @@ hg serve shared clone
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid
$ cat hg.pid >> $DAEMON_PIDS
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-file/'
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/'
200 Script output follows
@@ -107,23 +97,3 @@ hg serve shared clone
-rw-r--r-- 2 b
-
-test unshare command
-
- $ hg unshare
- $ test -d .hg/store
- $ test -f .hg/sharedpath
- [1]
- $ hg unshare
- abort: this is not a shared repo
- [255]
-
-check that a change does not propagate
-
- $ echo b >> b
- $ hg commit -m'change in unshared'
- $ cd ../repo1
- $ hg id -r tip
- c2e0ac586386 tip
-
- $ cd ..
diff --git a/tests/test-simple-update.t b/tests/test-simple-update.t
index 080bdc7..f87d9ca 100644
--- a/tests/test-simple-update.t
+++ b/tests/test-simple-update.t
@@ -54,5 +54,3 @@ update to rev 0 with a date
$ hg upd -d foo 0
abort: you can't specify a revision and a date
[255]
-
- $ cd ..
diff --git a/tests/test-simplemerge.py b/tests/test-simplemerge.py
index fb6add0..9746d00 100644
--- a/tests/test-simplemerge.py
+++ b/tests/test-simplemerge.py
@@ -11,7 +11,8 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import unittest
from unittest import TestCase
diff --git a/tests/test-ssh-clone-r.t b/tests/test-ssh-clone-r.t
index 4c1dff2..02bd316 100644
--- a/tests/test-ssh-clone-r.t
+++ b/tests/test-ssh-clone-r.t
@@ -4,7 +4,7 @@ creating 'remote' repo
$ hg init remote
$ cd remote
- $ hg unbundle "$TESTDIR/bundles/remote.hg"
+ $ hg unbundle $TESTDIR/bundles/remote.hg
adding changesets
adding manifests
adding file changes
@@ -17,7 +17,7 @@ creating 'remote' repo
clone remote via stream
$ for i in 0 1 2 3 4 5 6 7 8; do
- > hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
+ > hg clone -e "python $TESTDIR/dummyssh" --uncompressed -r "$i" ssh://user@dummy/remote test-"$i"
> if cd test-"$i"; then
> hg verify
> cd ..
@@ -139,7 +139,7 @@ clone remote via stream
4 files, 9 changesets, 7 total revisions
$ cd ..
$ cd test-1
- $ hg pull -e "python \"$TESTDIR/dummyssh\"" -r 4 ssh://user@dummy/remote
+ $ hg pull -e "python $TESTDIR/dummyssh" -r 4 ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@@ -153,7 +153,7 @@ clone remote via stream
crosschecking files in changesets and manifests
checking files
1 files, 3 changesets, 2 total revisions
- $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote
+ $ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@@ -163,7 +163,7 @@ clone remote via stream
(run 'hg update' to get a working copy)
$ cd ..
$ cd test-2
- $ hg pull -e "python \"$TESTDIR/dummyssh\"" -r 5 ssh://user@dummy/remote
+ $ hg pull -e "python $TESTDIR/dummyssh" -r 5 ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@@ -177,7 +177,7 @@ clone remote via stream
crosschecking files in changesets and manifests
checking files
1 files, 5 changesets, 3 total revisions
- $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote
+ $ hg pull -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote
pulling from ssh://user@dummy/remote
searching for changes
adding changesets
@@ -191,5 +191,3 @@ clone remote via stream
crosschecking files in changesets and manifests
checking files
4 files, 9 changesets, 7 total revisions
-
- $ cd ..
diff --git a/tests/test-ssh.t b/tests/test-ssh.t
index 169473d..3a3b636 100644
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -14,27 +14,27 @@ creating 'remote' repo
> uncompressed = True
>
> [hooks]
- > changegroup = python "$TESTDIR/printenv.py" changegroup-in-remote 0 ../dummylog
+ > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog
> EOF
$ cd ..
repo not found error
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/nonexistent local
- remote: abort: there is no Mercurial repository here (.hg not found)!
+ $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/nonexistent local
+ remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
[255]
non-existent absolute path
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy//`pwd`/nonexistent local
- remote: abort: there is no Mercurial repository here (.hg not found)!
+ $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy//`pwd`/nonexistent local
+ remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!
[255]
clone remote via stream
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" --uncompressed ssh://user@dummy/remote local-stream
+ $ hg clone -e "python $TESTDIR/dummyssh" --uncompressed ssh://user@dummy/remote local-stream
streaming all changes
4 files to transfer, 392 bytes of data
transferred 392 bytes in * seconds (*/sec) (glob)
@@ -51,7 +51,7 @@ clone remote via stream
clone remote via pull
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local
+ $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote local
requesting all changes
adding changesets
adding manifests
@@ -70,13 +70,13 @@ verify
checking files
2 files, 1 changesets, 2 total revisions
$ echo '[hooks]' >> .hg/hgrc
- $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc
+ $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc
empty default pull
$ hg paths
default = ssh://user@dummy/remote
- $ hg pull -e "python \"$TESTDIR/dummyssh\""
+ $ hg pull -e "python $TESTDIR/dummyssh"
pulling from ssh://user@dummy/remote
searching for changes
no changes found
@@ -90,7 +90,7 @@ updating rc
$ echo "default-push = ssh://user@dummy/remote" >> .hg/hgrc
$ echo "[ui]" >> .hg/hgrc
- $ echo "ssh = python \"$TESTDIR/dummyssh\"" >> .hg/hgrc
+ $ echo "ssh = python $TESTDIR/dummyssh" >> .hg/hgrc
find outgoing
@@ -106,7 +106,7 @@ find outgoing
find incoming on the remote side
- $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/local
+ $ hg incoming -R ../remote -e "python $TESTDIR/dummyssh" ssh://user@dummy/local
comparing with ssh://user@dummy/local
searching for changes
changeset: 1:a28a9d1a809c
@@ -118,7 +118,7 @@ find incoming on the remote side
find incoming on the remote side (using absolute path)
- $ hg incoming -R ../remote -e "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/`pwd`"
+ $ hg incoming -R ../remote -e "python $TESTDIR/dummyssh" "ssh://user@dummy/`pwd`"
comparing with ssh://user@dummy/$TESTTMP/local
searching for changes
changeset: 1:a28a9d1a809c
@@ -163,9 +163,8 @@ check remote tip
test pushkeys and bookmarks
$ cd ../local
- $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote namespaces
+ $ hg debugpushkey --config ui.ssh="python $TESTDIR/dummyssh" ssh://user@dummy/remote namespaces
bookmarks
- phases
namespaces
$ hg book foo -r 0
$ hg out -B
@@ -177,8 +176,7 @@ test pushkeys and bookmarks
searching for changes
no changes found
exporting bookmark foo
- [1]
- $ hg debugpushkey --config ui.ssh="python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote bookmarks
+ $ hg debugpushkey --config ui.ssh="python $TESTDIR/dummyssh" ssh://user@dummy/remote bookmarks
foo 1160648e36cec0054048a7edc4110c6f84fde594
$ hg book -f foo
$ hg push --traceback
@@ -186,7 +184,6 @@ test pushkeys and bookmarks
searching for changes
no changes found
updating bookmark foo
- [1]
$ hg book -d foo
$ hg in -B
comparing with ssh://user@dummy/remote
@@ -204,7 +201,6 @@ test pushkeys and bookmarks
searching for changes
no changes found
deleting remote bookmark foo
- [1]
a bad, evil hook that prints to stdout
@@ -249,7 +245,7 @@ clone bookmarks
$ hg -R ../remote bookmark test
$ hg -R ../remote bookmarks
* test 2:6c0482d977a3
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote local-bookmarks
+ $ hg clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/remote local-bookmarks
requesting all changes
adding changesets
adding manifests
@@ -270,85 +266,6 @@ results here)
[255]
$ cd ..
-
-hide outer repo
- $ hg init
-
-Test remote paths with spaces (issue2983):
-
- $ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
- $ touch "$TESTTMP/a repo/test"
- $ hg -R 'a repo' commit -A -m "test"
- adding test
- $ hg -R 'a repo' tag tag
- $ hg id --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
- 73649e48688a
-
-Test hg-ssh using a helper script that will restore PYTHONPATH (which might
-have been cleared by a hg.exe wrapper) and invoke hg-ssh with the right
-parameters:
-
- $ cat > ssh.sh << EOF
- > userhost="\$1"
- > SSH_ORIGINAL_COMMAND="\$2"
- > export SSH_ORIGINAL_COMMAND
- > PYTHONPATH="$PYTHONPATH"
- > export PYTHONPATH
- > python "$TESTDIR/../contrib/hg-ssh" "$TESTTMP/a repo"
- > EOF
-
- $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a repo"
- 73649e48688a
-
- $ hg id --ssh "sh ssh.sh" "ssh://user@dummy/a'repo"
- remote: Illegal repository "$TESTTMP/a'repo" (glob)
- abort: no suitable response from remote hg!
- [255]
-
- $ hg id --ssh "sh ssh.sh" --remotecmd hacking "ssh://user@dummy/a'repo"
- remote: Illegal command "hacking -R 'a'\''repo' serve --stdio"
- abort: no suitable response from remote hg!
- [255]
-
- $ SSH_ORIGINAL_COMMAND="'hg' -R 'a'repo' serve --stdio" python "$TESTDIR/../contrib/hg-ssh"
- Illegal command "'hg' -R 'a'repo' serve --stdio": No closing quotation
- [255]
-
-Test hg-ssh in read-only mode:
-
- $ cat > ssh.sh << EOF
- > userhost="\$1"
- > SSH_ORIGINAL_COMMAND="\$2"
- > export SSH_ORIGINAL_COMMAND
- > PYTHONPATH="$PYTHONPATH"
- > export PYTHONPATH
- > python "$TESTDIR/../contrib/hg-ssh" --read-only "$TESTTMP/remote"
- > EOF
-
- $ hg clone --ssh "sh ssh.sh" "ssh://user@dummy/$TESTTMP/remote" read-only-local
- requesting all changes
- adding changesets
- adding manifests
- adding file changes
- added 4 changesets with 5 changes to 4 files (+1 heads)
- updating to branch default
- 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
- $ cd read-only-local
- $ echo "baz" > bar
- $ hg ci -A -m "unpushable commit" bar
- $ hg push --ssh "sh ../ssh.sh"
- pushing to ssh://user@dummy/*/remote (glob)
- searching for changes
- remote: Permission denied
- remote: abort: prechangegroup.hg-ssh hook failed
- remote: Permission denied
- remote: abort: prepushkey.hg-ssh hook failed
- abort: unexpected response: empty string
- [255]
-
- $ cd ..
-
$ cat dummylog
Got arguments 1:user@dummy 2:hg -R nonexistent serve --stdio
Got arguments 1:user@dummy 2:hg -R /$TESTTMP/nonexistent serve --stdio
@@ -359,7 +276,7 @@ Test hg-ssh in read-only mode:
Got arguments 1:user@dummy 2:hg -R local serve --stdio
Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
- changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
+ changegroup-in-remote hook: HG_NODE=a28a9d1a809cab7d4e2fde4bee738a9ede948b60 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
@@ -369,8 +286,5 @@ Test hg-ssh in read-only mode:
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
- changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
+ changegroup-in-remote hook: HG_NODE=1383141674ec756a6056f6a9097618482fe0f4a6 HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
- Got arguments 1:user@dummy 2:hg init 'a repo'
- Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
- Got arguments 1:user@dummy 2:hg -R 'a repo' serve --stdio
diff --git a/tests/test-static-http.t b/tests/test-static-http.t
index ed9ab54..d454fbf 100644
--- a/tests/test-static-http.t
+++ b/tests/test-static-http.t
@@ -1,14 +1,7 @@
- $ "$TESTDIR/hghave" serve || exit 80
-#if windows
- $ hg clone http://localhost:$HGPORT/ copy
- abort: * (glob)
- [255]
-#else
$ hg clone http://localhost:$HGPORT/ copy
abort: error: Connection refused
[255]
-#endif
$ test -d copy
[1]
@@ -72,7 +65,7 @@ check for HTTP opener failures when cachefile does not exist
$ rm .hg/cache/*
$ cd ../local
$ echo '[hooks]' >> .hg/hgrc
- $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
+ $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
$ hg pull
pulling from static-http://localhost:$HGPORT/remote
searching for changes
@@ -80,7 +73,7 @@ check for HTTP opener failures when cachefile does not exist
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
- changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote
+ changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote
(run 'hg update' to get a working copy)
trying to push
@@ -91,7 +84,7 @@ trying to push
$ hg commit -m"test"
$ hg push
pushing to static-http://localhost:$HGPORT/remote
- abort: destination does not support push
+ abort: cannot lock static-http repository
[255]
trying clone -r
@@ -112,9 +105,6 @@ test with "/" URI (issue 747) and subrepo
$ hg init
$ hg init sub
- $ touch sub/test
- $ hg -R sub commit -A -m "test"
- adding test
$ hg -R sub tag not-empty
$ echo sub=sub > .hgsub
$ echo a > a
@@ -132,7 +122,7 @@ test with "/" URI (issue 747) and subrepo
adding changesets
adding manifests
adding file changes
- added 2 changesets with 2 changes to 2 files
+ added 1 changesets with 1 changes to 1 files
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd local2
$ hg verify
diff --git a/tests/test-status-color.t b/tests/test-status-color.t
index f7917f7..0c8af2b 100644
--- a/tests/test-status-color.t
+++ b/tests/test-status-color.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" tic || exit 80
-
$ echo "[extensions]" >> $HGRCPATH
$ echo "color=" >> $HGRCPATH
$ echo "[color]" >> $HGRCPATH
@@ -136,7 +134,7 @@ hg status:
hg status modified added removed deleted unknown never-existed ignored:
$ hg status --color=always modified added removed deleted unknown never-existed ignored
- never-existed: * (glob)
+ never-existed: No such file or directory
\x1b[0;32;1mA added\x1b[0m (esc)
\x1b[0;31;1mR removed\x1b[0m (esc)
\x1b[0;36;1;4m! deleted\x1b[0m (esc)
@@ -169,9 +167,9 @@ hg status -A:
hg status -A (with terminfo color):
- $ mkdir "$TESTTMP/terminfo"
- $ TERMINFO="$TESTTMP/terminfo" tic "$TESTDIR/hgterm.ti"
- $ TERM=hgterm TERMINFO="$TESTTMP/terminfo" hg status --config color.mode=terminfo --color=always -A
+ $ mkdir $TESTTMP/terminfo
+ $ TERMINFO=$TESTTMP/terminfo tic $TESTDIR/hgterm.ti
+ $ TERM=hgterm TERMINFO=$TESTTMP/terminfo hg status --config color.mode=terminfo --color=always -A
\x1b[30m\x1b[32m\x1b[1mA added\x1b[30m (esc)
\x1b[30m\x1b[32m\x1b[1mA copied\x1b[30m (esc)
\x1b[30m\x1b[30m modified\x1b[30m (esc)
@@ -282,10 +280,10 @@ test 'resolve -l'
$ hg merge
merging a
warning: conflicts during merge.
- merging a incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging a failed!
merging b
warning: conflicts during merge.
- merging b incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging b failed!
0 files updated, 0 files merged, 0 files removed, 2 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
[1]
@@ -296,5 +294,3 @@ hg resolve with one unresolved, one resolved:
$ hg resolve --color=always -l
\x1b[0;31;1mU a\x1b[0m (esc)
\x1b[0;32;1mR b\x1b[0m (esc)
-
- $ cd ..
diff --git a/tests/test-status.t b/tests/test-status.t
index 8de94a1..1f36b34 100644
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -127,7 +127,7 @@ hg status:
hg status modified added removed deleted unknown never-existed ignored:
$ hg status modified added removed deleted unknown never-existed ignored
- never-existed: * (glob)
+ never-existed: No such file or directory
A added
R removed
! deleted
@@ -263,71 +263,12 @@ hg status -C --change 1 added modified copied removed deleted:
modified
R removed
-hg status -A --change 1 and revset:
+hg status -A --change 1:
- $ hg status -A --change '1|1'
+ $ hg status -A --change 1
M modified
A added
A copied
modified
R removed
C deleted
-
- $ cd ..
-
-hg status of binary file starting with '\1\n', a separator for metadata:
-
- $ hg init repo5
- $ cd repo5
- >>> open("010a", "wb").write("\1\nfoo")
- $ hg ci -q -A -m 'initial checkin'
- $ hg status -A
- C 010a
-
- >>> open("010a", "wb").write("\1\nbar")
- $ hg status -A
- M 010a
- $ hg ci -q -m 'modify 010a'
- $ hg status -A --rev 0:1
- M 010a
-
- $ touch empty
- $ hg ci -q -A -m 'add another file'
- $ hg status -A --rev 1:2 010a
- C 010a
-
- $ cd ..
-
-test "hg status" with "directory pattern" which matches against files
-only known on target revision.
-
- $ hg init repo6
- $ cd repo6
-
- $ echo a > a.txt
- $ hg add a.txt
- $ hg commit -m '#0'
- $ mkdir -p 1/2/3/4/5
- $ echo b > 1/2/3/4/5/b.txt
- $ hg add 1/2/3/4/5/b.txt
- $ hg commit -m '#1'
-
- $ hg update -C 0 > /dev/null
- $ hg status -A
- C a.txt
-
-the directory matching against specified pattern should be removed,
-because directory existence prevents 'dirstate.walk()' from showing
-warning message about such pattern.
-
- $ test ! -d 1
- $ hg status -A --rev 1 1/2/3/4/5/b.txt
- R 1/2/3/4/5/b.txt
- $ hg status -A --rev 1 1/2/3/4/5
- R 1/2/3/4/5/b.txt
- $ hg status -A --rev 1 1/2/3
- R 1/2/3/4/5/b.txt
- $ hg status -A --rev 1 1
- R 1/2/3/4/5/b.txt
-
- $ cd ..
diff --git a/tests/test-strict.t b/tests/test-strict.t
index 0e108cb..4612046 100644
--- a/tests/test-strict.t
+++ b/tests/test-strict.t
@@ -7,9 +7,6 @@
$ hg an a
0: a
- $ hg --config ui.strict=False an a
- 0: a
-
$ echo "[ui]" >> $HGRCPATH
$ echo "strict=True" >> $HGRCPATH
@@ -19,24 +16,23 @@
basic commands:
- add add the specified files on the next commit
- annotate show changeset information by line for each file
- clone make a copy of an existing repository
- commit commit the specified files or all outstanding changes
- diff diff repository (or selected files)
- export dump the header and diffs for one or more changesets
- forget forget the specified files on the next commit
- init create a new repository in the given directory
- log show revision history of entire repository or files
- merge merge working directory with another revision
- phase set or show the current phase name
- pull pull changes from the specified source
- push push changes to the specified destination
- remove remove the specified files on the next commit
- serve start stand-alone webserver
- status show changed files in the working directory
- summary summarize working directory state
- update update working directory (or switch revisions)
+ add add the specified files on the next commit
+ annotate show changeset information by line for each file
+ clone make a copy of an existing repository
+ commit commit the specified files or all outstanding changes
+ diff diff repository (or selected files)
+ export dump the header and diffs for one or more changesets
+ forget forget the specified files on the next commit
+ init create a new repository in the given directory
+ log show revision history of entire repository or files
+ merge merge working directory with another revision
+ pull pull changes from the specified source
+ push push changes to the specified destination
+ remove remove the specified files on the next commit
+ serve start stand-alone webserver
+ status show changed files in the working directory
+ summary summarize working directory state
+ update update working directory (or switch revisions)
use "hg help" for the full list of commands or "hg -v" for details
[255]
diff --git a/tests/test-strip-cross.t b/tests/test-strip-cross.t
index 95bc17b..dbc584f 100644
--- a/tests/test-strip-cross.t
+++ b/tests/test-strip-cross.t
@@ -34,12 +34,12 @@ test stripping of filelogs where the linkrev doesn't always increase
$ hg clone -q -U -r -1 -r -2 -r -3 -r -4 -r -6 orig crossed
$ cd crossed
$ hg debugindex --manifest
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 112 ..... 0 6f105cbb914d 000000000000 000000000000 (re)
- 1 112 56 ..... 3 1b55917b3699 000000000000 000000000000 (re)
- 2 168 123 ..... 1 8f3d04e263e5 000000000000 000000000000 (re)
- 3 291 122 ..... 2 f0ef8726ac4f 000000000000 000000000000 (re)
- 4 413 87 ..... 4 0b76e38b4070 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 112 0 0 6f105cbb914d 000000000000 000000000000
+ 1 112 56 1 3 1b55917b3699 000000000000 000000000000
+ 2 168 123 1 1 8f3d04e263e5 000000000000 000000000000
+ 3 291 122 1 2 f0ef8726ac4f 000000000000 000000000000
+ 4 413 87 4 4 0b76e38b4070 000000000000 000000000000
$ for i in 012 021 102 120 201 210 manifest-file; do
> echo $i
@@ -47,45 +47,45 @@ test stripping of filelogs where the linkrev doesn't always increase
> echo
> done
012
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 1 5d9299349fc0 000000000000 000000000000 (re)
- 2 6 3 ..... 2 2661d26c6496 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
+ 2 6 3 2 2 2661d26c6496 000000000000 000000000000
021
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 0 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 2 5d9299349fc0 000000000000 000000000000 (re)
- 2 6 3 ..... 1 2661d26c6496 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 0 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
+ 2 6 3 2 1 2661d26c6496 000000000000 000000000000
102
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 1 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 0 5d9299349fc0 000000000000 000000000000 (re)
- 2 6 3 ..... 2 2661d26c6496 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 1 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
+ 2 6 3 2 2 2661d26c6496 000000000000 000000000000
120
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 1 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 2 5d9299349fc0 000000000000 000000000000 (re)
- 2 6 3 ..... 0 2661d26c6496 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 1 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 2 5d9299349fc0 000000000000 000000000000
+ 2 6 3 2 0 2661d26c6496 000000000000 000000000000
201
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 2 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 0 5d9299349fc0 000000000000 000000000000 (re)
- 2 6 3 ..... 1 2661d26c6496 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 2 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 0 5d9299349fc0 000000000000 000000000000
+ 2 6 3 2 1 2661d26c6496 000000000000 000000000000
210
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 2 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 1 5d9299349fc0 000000000000 000000000000 (re)
- 2 6 3 ..... 0 2661d26c6496 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 2 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 1 5d9299349fc0 000000000000 000000000000
+ 2 6 3 2 0 2661d26c6496 000000000000 000000000000
manifest-file
- rev offset length ..... linkrev nodeid p1 p2 (re)
- 0 0 3 ..... 3 b8e02f643373 000000000000 000000000000 (re)
- 1 3 3 ..... 4 5d9299349fc0 000000000000 000000000000 (re)
+ rev offset length base linkrev nodeid p1 p2
+ 0 0 3 0 3 b8e02f643373 000000000000 000000000000
+ 1 3 3 1 4 5d9299349fc0 000000000000 000000000000
$ cd ..
$ for i in 0 1 2 3 4; do
diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t
index aa79c87..0e8a60d 100644
--- a/tests/test-subrepo-deep-nested-change.t
+++ b/tests/test-subrepo-deep-nested-change.t
@@ -3,7 +3,7 @@ Preparing the subrepository 'sub2'
$ hg init sub2
$ echo sub2 > sub2/sub2
$ hg add -R sub2
- adding sub2/sub2 (glob)
+ adding sub2/sub2
$ hg commit -R sub2 -m "sub2 import"
Preparing the 'sub1' repo which depends on the subrepo 'sub2'
@@ -15,9 +15,10 @@ Preparing the 'sub1' repo which depends on the subrepo 'sub2'
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg add -R sub1
- adding sub1/.hgsub (glob)
- adding sub1/sub1 (glob)
+ adding sub1/.hgsub
+ adding sub1/sub1
$ hg commit -R sub1 -m "sub1 import"
+ committing subrepository sub2
Preparing the 'main' repo which depends on the subrepo 'sub1'
@@ -29,9 +30,10 @@ Preparing the 'main' repo which depends on the subrepo 'sub1'
cloning subrepo sub2 from $TESTTMP/sub2
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg add -R main
- adding main/.hgsub (glob)
- adding main/main (glob)
+ adding main/.hgsub
+ adding main/main
$ hg commit -R main -m "main import"
+ committing subrepository sub1
Cleaning both repositories, just as a clone -U
@@ -49,7 +51,7 @@ Clone main
$ hg clone main cloned
updating to branch default
cloning subrepo sub1 from $TESTTMP/sub1
- cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
+ cloning subrepo sub1/sub2 from $TESTTMP/sub2
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
Checking cloned repo ids
@@ -75,9 +77,9 @@ debugsub output for main and sub1
Modifying deeply nested 'sub2'
$ echo modified > cloned/sub1/sub2/sub2
- $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned
+ $ hg commit -m "deep nested modif should trigger a commit" -R cloned
committing subrepository sub1
- committing subrepository sub1/sub2 (glob)
+ committing subrepository sub1/sub2
Checking modified node ids
@@ -98,167 +100,3 @@ debugsub output for main and sub1
path sub2
source ../sub2
revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487
-
-Check that deep archiving works
-
- $ cd cloned
- $ echo 'test' > sub1/sub2/test.txt
- $ hg --config extensions.largefiles=! add sub1/sub2/test.txt
- $ mkdir sub1/sub2/folder
- $ echo 'subfolder' > sub1/sub2/folder/test.txt
- $ hg --config extensions.largefiles=! add sub1/sub2/folder/test.txt
- $ hg ci -Sm "add test.txt"
- committing subrepository sub1
- committing subrepository sub1/sub2 (glob)
- $ hg --config extensions.largefiles=! archive -S ../archive_all
- $ find ../archive_all | sort
- ../archive_all
- ../archive_all/.hg_archival.txt
- ../archive_all/.hgsub
- ../archive_all/.hgsubstate
- ../archive_all/main
- ../archive_all/sub1
- ../archive_all/sub1/.hgsub
- ../archive_all/sub1/.hgsubstate
- ../archive_all/sub1/sub1
- ../archive_all/sub1/sub2
- ../archive_all/sub1/sub2/folder
- ../archive_all/sub1/sub2/folder/test.txt
- ../archive_all/sub1/sub2/sub2
- ../archive_all/sub1/sub2/test.txt
-
-Check that archive -X works in deep subrepos
-
- $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude
- $ find ../archive_exclude | sort
- ../archive_exclude
- ../archive_exclude/.hg_archival.txt
- ../archive_exclude/.hgsub
- ../archive_exclude/.hgsubstate
- ../archive_exclude/main
- ../archive_exclude/sub1
- ../archive_exclude/sub1/.hgsub
- ../archive_exclude/sub1/.hgsubstate
- ../archive_exclude/sub1/sub1
- ../archive_exclude/sub1/sub2
- ../archive_exclude/sub1/sub2/sub2
-
- $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include
- $ find ../archive_include | sort
- ../archive_include
- ../archive_include/sub1
- ../archive_include/sub1/sub2
- ../archive_include/sub1/sub2/folder
- ../archive_include/sub1/sub2/folder/test.txt
- ../archive_include/sub1/sub2/test.txt
-
-Check that deep archive works with largefiles (which overrides hgsubrepo impl)
-This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo
-subrepos are archived properly.
-Note that add --large through a subrepo currently adds the file as a normal file
-
- $ echo "large" > sub1/sub2/large.bin
- $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin
- $ echo "large" > large.bin
- $ hg --config extensions.largefiles= add --large large.bin
- $ hg --config extensions.largefiles= ci -S -m "add large files"
- committing subrepository sub1
- committing subrepository sub1/sub2 (glob)
-
- $ hg --config extensions.largefiles= archive -S ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/.hg_archival.txt
- ../archive_lf/.hgsub
- ../archive_lf/.hgsubstate
- ../archive_lf/large.bin
- ../archive_lf/main
- ../archive_lf/sub1
- ../archive_lf/sub1/.hgsub
- ../archive_lf/sub1/.hgsubstate
- ../archive_lf/sub1/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/folder
- ../archive_lf/sub1/sub2/folder/test.txt
- ../archive_lf/sub1/sub2/large.bin
- ../archive_lf/sub1/sub2/sub2
- ../archive_lf/sub1/sub2/test.txt
- $ rm -rf ../archive_lf
-
-Exclude large files from main and sub-sub repo
-
- $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/.hg_archival.txt
- ../archive_lf/.hgsub
- ../archive_lf/.hgsubstate
- ../archive_lf/main
- ../archive_lf/sub1
- ../archive_lf/sub1/.hgsub
- ../archive_lf/sub1/.hgsubstate
- ../archive_lf/sub1/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/folder
- ../archive_lf/sub1/sub2/folder/test.txt
- ../archive_lf/sub1/sub2/sub2
- ../archive_lf/sub1/sub2/test.txt
- $ rm -rf ../archive_lf
-
-Exclude normal files from main and sub-sub repo
-
- $ hg --config extensions.largefiles= archive -S -X '**.txt' ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/.hgsub
- ../archive_lf/.hgsubstate
- ../archive_lf/large.bin
- ../archive_lf/main
- ../archive_lf/sub1
- ../archive_lf/sub1/.hgsub
- ../archive_lf/sub1/.hgsubstate
- ../archive_lf/sub1/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/large.bin
- ../archive_lf/sub1/sub2/sub2
- $ rm -rf ../archive_lf
-
-Include normal files from within a largefiles subrepo
-
- $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/.hg_archival.txt
- ../archive_lf/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/folder
- ../archive_lf/sub1/sub2/folder/test.txt
- ../archive_lf/sub1/sub2/test.txt
- $ rm -rf ../archive_lf
-
-Include large files from within a largefiles subrepo
-
- $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/large.bin
- ../archive_lf/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/large.bin
- $ rm -rf ../archive_lf
-
-Find an exact largefile match in a largefiles subrepo
-
- $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf
- $ find ../archive_lf | sort
- ../archive_lf
- ../archive_lf/sub1
- ../archive_lf/sub1/sub2
- ../archive_lf/sub1/sub2/large.bin
- $ rm -rf ../archive_lf
-
-Find an exact match to a standin (should archive nothing)
- $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
- $ find ../archive_lf 2> /dev/null | sort
-
- $ cd ..
diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t
index 3f06a46..9fbe85e 100644
--- a/tests/test-subrepo-git.t
+++ b/tests/test-subrepo-git.t
@@ -2,8 +2,6 @@
make git commits repeatable
- $ echo "[core]" >> $HOME/.gitconfig
- $ echo "autocrlf = false" >> $HOME/.gitconfig
$ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
$ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
$ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE
@@ -36,6 +34,7 @@ add subrepo clone
$ git clone -q ../gitroot s
$ hg add .hgsub
$ hg commit -m 'new git subrepo'
+ committing subrepository s
$ hg debugsub
path s
source ../gitroot
@@ -56,6 +55,7 @@ record a new commit from upstream from a different branch
$ hg status --subrepos
M s/g
$ hg commit -m 'update git subrepo'
+ committing subrepository s
$ hg debugsub
path s
source ../gitroot
@@ -103,7 +103,7 @@ clone root, make local change
$ echo ggg >> s/g
$ hg status --subrepos
M s/g
- $ hg commit --subrepos -m ggg
+ $ hg commit -m ggg
committing subrepository s
$ hg debugsub
path s
@@ -125,7 +125,7 @@ clone root separately, make different local change
$ hg status --subrepos
A s/f
- $ hg commit --subrepos -m f
+ $ hg commit -m f
committing subrepository s
$ hg debugsub
path s
@@ -135,7 +135,7 @@ clone root separately, make different local change
user b push changes
$ hg push 2>/dev/null
- pushing to $TESTTMP/t (glob)
+ pushing to $TESTTMP/t
pushing branch testing of subrepo s
searching for changes
adding changesets
@@ -147,7 +147,7 @@ user a pulls, merges, commits
$ cd ../ta
$ hg pull
- pulling from $TESTTMP/t (glob)
+ pulling from $TESTTMP/t
searching for changes
adding changesets
adding manifests
@@ -164,7 +164,7 @@ user a pulls, merges, commits
g
gg
ggg
- $ hg commit --subrepos -m 'merge'
+ $ hg commit -m 'merge'
committing subrepository s
$ hg status --subrepos --rev 1:5
M .hgsubstate
@@ -175,7 +175,7 @@ user a pulls, merges, commits
source ../gitroot
revision f47b465e1bce645dbf37232a00574aa1546ca8d3
$ hg push 2>/dev/null
- pushing to $TESTTMP/t (glob)
+ pushing to $TESTTMP/t
pushing branch testing of subrepo s
searching for changes
adding changesets
@@ -207,7 +207,7 @@ make and push changes to hg without updating the subrepo
$ echo aa >> a
$ hg commit -m aa
$ hg push
- pushing to $TESTTMP/t (glob)
+ pushing to $TESTTMP/t
searching for changes
adding changesets
adding manifests
@@ -222,6 +222,7 @@ sync to upstream git, distribute changes
$ git pull -q >/dev/null 2>/dev/null
$ cd ..
$ hg commit -m 'git upstream sync'
+ committing subrepository s
$ hg debugsub
path s
source ../gitroot
@@ -270,16 +271,6 @@ archive subrepos
gg
ggg
- $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null
- $ find ../archive_x | sort | grep -v pax_global_header
- ../archive_x
- ../archive_x/.hg_archival.txt
- ../archive_x/.hgsub
- ../archive_x/.hgsubstate
- ../archive_x/a
- ../archive_x/s
- ../archive_x/s/g
-
create nested repo
$ cd ..
@@ -296,15 +287,16 @@ create nested repo
$ echo inner = inner > .hgsub
$ hg add .hgsub
$ hg commit -m 'nested sub'
+ committing subrepository inner
nested commit
$ echo ffff >> inner/s/f
$ hg status --subrepos
M inner/s/f
- $ hg commit --subrepos -m nested
+ $ hg commit -m nested
committing subrepository inner
- committing subrepository inner/s (glob)
+ committing subrepository inner/s
nested archive
@@ -333,7 +325,7 @@ Don't crash if the subrepo is missing
$ hg push -q
abort: subrepo s is missing
[255]
- $ hg commit --subrepos -qm missing
+ $ hg commit -qm missing
abort: subrepo s is missing
[255]
$ hg update -C
@@ -347,41 +339,27 @@ Don't crash if the .hgsubstate entry is missing
$ hg update 1 -q
$ hg rm .hgsubstate
$ hg commit .hgsubstate -m 'no substate'
- nothing changed
- [1]
+ created new head
$ hg tag -l nosubstate
$ hg manifest
.hgsub
- .hgsubstate
a
$ hg status -S
- R .hgsubstate
$ hg sum | grep commit
- commit: 1 removed, 1 subrepos (new branch head)
+ commit: 1 subrepos
$ hg commit -m 'restore substate'
- nothing changed
- [1]
+ committing subrepository s
$ hg manifest
.hgsub
.hgsubstate
a
$ hg sum | grep commit
- commit: 1 removed, 1 subrepos (new branch head)
+ commit: (clean)
$ hg update -qC nosubstate
$ ls s
- g
-
-issue3109: false positives in git diff-index
-
- $ hg update -q
- $ touch -t 200001010000 s/g
- $ hg status --subrepos
- $ touch -t 200001010000 s/g
- $ hg sum | grep commit
- commit: (clean)
Check hg update --clean
$ cd $TESTTMP/ta
@@ -430,7 +408,7 @@ Sticky subrepositorys, file changes
$ git add f1
$ cd ..
$ hg id -n
- 1+
+ 1
$ cd s
$ git rev-parse HEAD
da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
@@ -487,14 +465,16 @@ Sticky subrepository, file changes and revision updates
l
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg id -n
- 7+
+ 7
$ cd s
$ git rev-parse HEAD
aa84837ccfbdfedcdcdeeedc309d73e6eb069edc
$ cd ..
Sticky repository, update --clean
- $ hg update --clean tip 2>/dev/null
+ $ hg update --clean tip
+ Previous HEAD position was aa84837... f
+ HEAD is now at 32a3438... fff
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg id -n
7
@@ -519,16 +499,3 @@ Test subrepo already at intended revision:
da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7
$ cd ..
-Test forgetting files, not implemented in git subrepo, used to
-traceback
-#if no-windows
- $ hg forget 'notafile*'
- notafile*: No such file or directory
- [1]
-#else
- $ hg forget 'notafile'
- notafile: * (glob)
- [1]
-#endif
-
- $ cd ..
diff --git a/tests/test-subrepo-missing.t b/tests/test-subrepo-missing.t
index fb6bca9..323efe8 100644
--- a/tests/test-subrepo-missing.t
+++ b/tests/test-subrepo-missing.t
@@ -7,26 +7,12 @@
$ echo 'subrepo = subrepo' > .hgsub
$ hg ci -Am addsubrepo
adding .hgsub
+ committing subrepository subrepo
$ echo b > subrepo/b
$ hg -R subrepo ci -Am addb
adding b
$ hg ci -m updatedsub
-
-ignore blanklines in .hgsubstate
-
- >>> file('.hgsubstate', 'wb').write('\n\n \t \n \n')
- $ hg st --subrepos
- M .hgsubstate
- $ hg revert -qC .hgsubstate
-
-abort more gracefully on .hgsubstate parsing error
-
- $ cp .hgsubstate .hgsubstate.old
- >>> file('.hgsubstate', 'wb').write('\ninvalid')
- $ hg st --subrepos
- abort: invalid subrepository revision specifier in .hgsubstate line 2
- [255]
- $ mv .hgsubstate.old .hgsubstate
+ committing subrepository subrepo
delete .hgsub and revert it
@@ -67,5 +53,3 @@ delete .hgsubstate and update
$ hg st
$ ls subrepo
a
-
- $ cd ..
diff --git a/tests/test-subrepo-paths.t b/tests/test-subrepo-paths.t
index fd5c9c9..b3f5931 100644
--- a/tests/test-subrepo-paths.t
+++ b/tests/test-subrepo-paths.t
@@ -1,23 +1,20 @@
$ hg init outer
$ cd outer
- $ echo '[paths]' >> .hg/hgrc
- $ echo 'default = http://example.net/' >> .hg/hgrc
-
hg debugsub with no remapping
- $ echo 'sub = libfoo' > .hgsub
+ $ echo 'sub = http://example.net/libfoo' > .hgsub
$ hg add .hgsub
$ hg debugsub
path sub
- source libfoo
+ source http://example.net/libfoo
revision
hg debugsub with remapping
- $ echo '[subpaths]' >> .hg/hgrc
- $ printf 'http://example.net/lib(.*) = C:\\libs\\\\1-lib\\\n' >> .hg/hgrc # no-check-code
+ $ echo '[subpaths]' > .hg/hgrc
+ $ printf 'http://example.net/lib(.*) = C:\\libs\\\\1-lib\\\n' >> .hg/hgrc
$ hg debugsub
path sub
@@ -33,21 +30,6 @@ test cumulative remapping, the $HGRCPATH file is loaded first
source C:\libs\bar-lib\
revision
-test absolute source path -- testing with a URL is important since
-standard os.path.join wont treat that as an absolute path
-
- $ echo 'abs = http://example.net/abs' > .hgsub
- $ hg debugsub
- path abs
- source http://example.net/abs
- revision
-
- $ echo 'abs = /abs' > .hgsub
- $ hg debugsub
- path abs
- source /abs
- revision
-
test bad subpaths pattern
$ cat > .hg/hgrc <<EOF
@@ -55,7 +37,5 @@ test bad subpaths pattern
> .* = \1
> EOF
$ hg debugsub
- abort: bad subrepository pattern in $TESTTMP/outer/.hg/hgrc:2: invalid group reference (glob)
+ abort: bad subrepository pattern in $TESTTMP/outer/.hg/hgrc:2: invalid group reference
[255]
-
- $ cd ..
diff --git a/tests/test-subrepo-recursion.t b/tests/test-subrepo-recursion.t
index fa419b3..c953cdf 100644
--- a/tests/test-subrepo-recursion.t
+++ b/tests/test-subrepo-recursion.t
@@ -23,10 +23,10 @@ Add files --- .hgsub files must go first to trigger subrepos:
$ hg add -S .hgsub
$ hg add -S foo/.hgsub
$ hg add -S foo/bar
- adding foo/bar/z.txt (glob)
+ adding foo/bar/z.txt
$ hg add -S
adding x.txt
- adding foo/y.txt (glob)
+ adding foo/y.txt
Test recursive status without committing anything:
@@ -58,16 +58,9 @@ Test recursive diff without committing anything:
Commits:
- $ hg commit -m fails
- abort: uncommitted changes in subrepo foo
- (use --subrepos for recursive commit)
- [255]
-
-The --subrepos flag overwrite the config setting:
-
- $ hg commit -m 0-0-0 --config ui.commitsubrepos=No --subrepos
+ $ hg commit -m 0-0-0
committing subrepository foo
- committing subrepository foo/bar (glob)
+ committing subrepository foo/bar
$ cd foo
$ echo y2 >> y.txt
@@ -79,9 +72,11 @@ The --subrepos flag overwrite the config setting:
$ cd ..
$ hg commit -m 0-2-1
+ committing subrepository bar
$ cd ..
$ hg commit -m 1-2-1
+ committing subrepository foo
Change working directory:
@@ -182,26 +177,9 @@ Status with relative path:
Cleanup and final commit:
$ rm -r dir
- $ hg commit --subrepos -m 2-3-2
+ $ hg commit -m 2-3-2
committing subrepository foo
- committing subrepository foo/bar (glob)
-
-Test explicit path commands within subrepos: add/forget
- $ echo z1 > foo/bar/z2.txt
- $ hg status -S
- ? foo/bar/z2.txt
- $ hg add foo/bar/z2.txt
- $ hg status -S
- A foo/bar/z2.txt
- $ hg forget foo/bar/z2.txt
- $ hg status -S
- ? foo/bar/z2.txt
- $ hg forget foo/bar/z2.txt
- not removing foo/bar/z2.txt: file is already untracked (glob)
- [1]
- $ hg status -S
- ? foo/bar/z2.txt
- $ rm foo/bar/z2.txt
+ committing subrepository foo/bar
Log with the relationships between repo and its subrepo:
@@ -260,7 +238,7 @@ Enable progress extension for archive tests:
Test archiving to a directory tree (the doubled lines in the output
only show up in the test output, not in real usage):
- $ hg archive --subrepos ../archive 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg archive --subrepos ../archive 2>&1 | $TESTDIR/filtercr.py
archiving [ ] 0/3
archiving [ ] 0/3
@@ -280,10 +258,10 @@ only show up in the test output, not in real usage):
archiving (foo) [====================================>] 3/3
archiving (foo) [====================================>] 3/3
- archiving (foo/bar) [ ] 0/1 (glob)
- archiving (foo/bar) [ ] 0/1 (glob)
- archiving (foo/bar) [================================>] 1/1 (glob)
- archiving (foo/bar) [================================>] 1/1 (glob)
+ archiving (foo/bar) [ ] 0/1
+ archiving (foo/bar) [ ] 0/1
+ archiving (foo/bar) [================================>] 1/1
+ archiving (foo/bar) [================================>] 1/1
\r (esc)
$ find ../archive | sort
../archive
@@ -300,7 +278,7 @@ only show up in the test output, not in real usage):
Test archiving to zip file (unzip output is unstable):
- $ hg archive --subrepos ../archive.zip 2>&1 | "$TESTDIR/filtercr.py"
+ $ hg archive --subrepos ../archive.zip 2>&1 | $TESTDIR/filtercr.py
archiving [ ] 0/3
archiving [ ] 0/3
@@ -320,80 +298,27 @@ Test archiving to zip file (unzip output is unstable):
archiving (foo) [====================================>] 3/3
archiving (foo) [====================================>] 3/3
- archiving (foo/bar) [ ] 0/1 (glob)
- archiving (foo/bar) [ ] 0/1 (glob)
- archiving (foo/bar) [================================>] 1/1 (glob)
- archiving (foo/bar) [================================>] 1/1 (glob)
+ archiving (foo/bar) [ ] 0/1
+ archiving (foo/bar) [ ] 0/1
+ archiving (foo/bar) [================================>] 1/1
+ archiving (foo/bar) [================================>] 1/1
\r (esc)
-Test archiving a revision that references a subrepo that is not yet
-cloned:
-
- $ hg clone -U . ../empty
- $ cd ../empty
- $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | "$TESTDIR/filtercr.py"
-
- archiving [ ] 0/3
- archiving [ ] 0/3
- archiving [=============> ] 1/3
- archiving [=============> ] 1/3
- archiving [===========================> ] 2/3
- archiving [===========================> ] 2/3
- archiving [==========================================>] 3/3
- archiving [==========================================>] 3/3
-
- archiving (foo) [ ] 0/3
- archiving (foo) [ ] 0/3
- archiving (foo) [===========> ] 1/3
- archiving (foo) [===========> ] 1/3
- archiving (foo) [=======================> ] 2/3
- archiving (foo) [=======================> ] 2/3
- archiving (foo) [====================================>] 3/3
- archiving (foo) [====================================>] 3/3
-
- archiving (foo/bar) [ ] 0/1 (glob)
- archiving (foo/bar) [ ] 0/1 (glob)
- archiving (foo/bar) [================================>] 1/1 (glob)
- archiving (foo/bar) [================================>] 1/1 (glob)
-
- cloning subrepo foo from $TESTTMP/repo/foo
- cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
-
-The newly cloned subrepos contain no working copy:
-
- $ hg -R foo summary
- parent: -1:000000000000 (no revision checked out)
- branch: default
- commit: (clean)
- update: 4 new changesets (update)
-
Disable progress extension and cleanup:
$ mv $HGRCPATH.no-progress $HGRCPATH
-Test archiving when there is a directory in the way for a subrepo
-created by archive:
-
- $ hg clone -U . ../almost-empty
- $ cd ../almost-empty
- $ mkdir foo
- $ echo f > foo/f
- $ hg archive --subrepos -r tip archive
- cloning subrepo foo from $TESTTMP/empty/foo
- abort: destination '$TESTTMP/almost-empty/foo' is not empty (glob)
- [255]
-
Clone and test outgoing:
$ cd ..
$ hg clone repo repo2
updating to branch default
cloning subrepo foo from $TESTTMP/repo/foo
- cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
+ cloning subrepo foo/bar from $TESTTMP/repo/foo/bar
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd repo2
$ hg outgoing -S
- comparing with $TESTTMP/repo (glob)
+ comparing with $TESTTMP/repo
searching for changes
no changes found
comparing with $TESTTMP/repo/foo
@@ -416,10 +341,10 @@ Make nested change:
y2
y3
+y4
- $ hg commit --subrepos -m 3-4-2
+ $ hg commit -m 3-4-2
committing subrepository foo
$ hg outgoing -S
- comparing with $TESTTMP/repo (glob)
+ comparing with $TESTTMP/repo
searching for changes
changeset: 3:2655b8ecc4ee
tag: tip
@@ -449,7 +374,7 @@ Switch to original repo and setup default path:
Test incoming:
$ hg incoming -S
- comparing with $TESTTMP/repo2 (glob)
+ comparing with $TESTTMP/repo2
searching for changes
changeset: 3:2655b8ecc4ee
tag: tip
@@ -490,5 +415,3 @@ The subrepo must sorts after the explicit filename.
$ hg add .hgsub
$ touch a x/a
$ hg add a x/a
-
- $ cd ..
diff --git a/tests/test-subrepo-relative-path.t b/tests/test-subrepo-relative-path.t
index e101511..f3fc8f5 100644
--- a/tests/test-subrepo-relative-path.t
+++ b/tests/test-subrepo-relative-path.t
@@ -1,11 +1,9 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Preparing the subrepository 'sub'
$ hg init sub
$ echo sub > sub/sub
$ hg add -R sub
- adding sub/sub (glob)
+ adding sub/sub
$ hg commit -R sub -m "sub import"
Preparing the 'main' repo which depends on the subrepo 'sub'
@@ -17,9 +15,10 @@ Preparing the 'main' repo which depends on the subrepo 'sub'
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg add -R main
- adding main/.hgsub (glob)
- adding main/main (glob)
+ adding main/.hgsub
+ adding main/main
$ hg commit -R main -m "main import"
+ committing subrepository sub
Cleaning both repositories, just as a clone -U
@@ -29,9 +28,6 @@ Cleaning both repositories, just as a clone -U
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
$ rm -rf main/sub
-hide outer repo
- $ hg init
-
Serving them both using hgweb
$ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
@@ -74,7 +70,9 @@ subrepo debug for 'main' clone
subrepo paths with ssh urls
- $ hg clone -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone
+ $ cp $TESTDIR/dummyssh $BINDIR/ssh
+
+ $ hg clone ssh://user@dummy/cloned sshclone
requesting all changes
adding changesets
adding manifests
@@ -89,17 +87,17 @@ subrepo paths with ssh urls
added 1 changesets with 1 changes to 1 files
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg -R sshclone push -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/`pwd`/cloned
+ $ hg -R sshclone push ssh://user@dummy/$TESTTMP/cloned
pushing to ssh://user@dummy/$TESTTMP/cloned
pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub
searching for changes
no changes found
searching for changes
no changes found
- [1]
$ cat dummylog
Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
Got arguments 1:user@dummy 2:hg -R sub serve --stdio
Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
+ $ rm $BINDIR/ssh
diff --git a/tests/test-subrepo-svn.t b/tests/test-subrepo-svn.t
index ba9611d..97bf860 100644
--- a/tests/test-subrepo-svn.t
+++ b/tests/test-subrepo-svn.t
@@ -1,38 +1,45 @@
- $ "$TESTDIR/hghave" svn15 || exit 80
+ $ "$TESTDIR/hghave" svn || exit 80
- $ SVNREPOPATH=`pwd`/svn-repo
-#if windows
- $ SVNREPOURL=file:///`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#else
- $ SVNREPOURL=file://`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$SVNREPOPATH"`
-#endif
+ $ fix_path()
+ > {
+ > tr '\\' /
+ > }
+
+SVN wants all paths to start with a slash. Unfortunately, Windows ones
+don't. Handle that.
+
+ $ escapedwd=`pwd | fix_path`
+ $ expr "$escapedwd" : '\/' > /dev/null || escapedwd="/$escapedwd"
+ $ escapedwd=`python -c "import urllib, sys; sys.stdout.write(urllib.quote(sys.argv[1]))" "$escapedwd"`
create subversion repo
+ $ SVNREPO="file://$escapedwd/svn-repo"
$ WCROOT="`pwd`/svn-wc"
$ svnadmin create svn-repo
- $ svn co "$SVNREPOURL" svn-wc
+ $ svn co "$SVNREPO" svn-wc
Checked out revision 0.
$ cd svn-wc
$ mkdir src
$ echo alpha > src/alpha
$ svn add src
A src
- A src/alpha (glob)
+ A src/alpha
$ mkdir externals
$ echo other > externals/other
$ svn add externals
A externals
- A externals/other (glob)
+ A externals/other
$ svn ci -m 'Add alpha'
Adding externals
- Adding externals/other (glob)
+ Adding externals/other
Adding src
- Adding src/alpha (glob)
+ Adding src/alpha
Transmitting file data ..
Committed revision 1.
- $ svn up -q
- $ echo "externals -r1 $SVNREPOURL/externals" > extdef
+ $ svn up
+ At revision 1.
+ $ echo "externals -r1 $SVNREPO/externals" > extdef
$ svn propset -F extdef svn:externals src
property 'svn:externals' set on 'src'
$ svn ci -m 'Setting externals'
@@ -56,13 +63,15 @@ first revision, no sub
add first svn sub with leading whitespaces
- $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub
- $ echo "subdir/s = [svn] $SVNREPOURL/src" >> .hgsub
- $ svn co --quiet "$SVNREPOURL"/src s
+ $ echo "s = [svn] $SVNREPO/src" >> .hgsub
+ $ echo "subdir/s = [svn] $SVNREPO/src" >> .hgsub
+ $ svn co --quiet "$SVNREPO"/src s
$ mkdir subdir
- $ svn co --quiet "$SVNREPOURL"/src subdir/s
+ $ svn co --quiet "$SVNREPO"/src subdir/s
$ hg add .hgsub
$ hg ci -m1
+ committing subrepository s
+ committing subrepository subdir/s
make sure we avoid empty commits (issue2445)
@@ -96,13 +105,13 @@ change file in svn and hg, commit
branch: default
commit: 1 modified, 1 subrepos
update: (current)
- $ hg commit --subrepos -m 'Message!' | grep -v Updating
+ $ hg commit -m 'Message!'
committing subrepository s
Sending*s/alpha (glob)
Transmitting file data .
Committed revision 3.
- Fetching external item into '*s/externals'* (glob)
+ Fetching external item into '$TESTTMP/sub/t/s/externals'
External at revision 1.
At revision 3.
@@ -114,22 +123,18 @@ change file in svn and hg, commit
source file://*/svn-repo/src (glob)
revision 2
-missing svn file, commit should fail
-
- $ rm s/alpha
- $ hg commit --subrepos -m 'abort on missing file'
- committing subrepository s
- abort: cannot commit missing svn entries
- [255]
- $ svn revert s/alpha > /dev/null
-
add an unrelated revision in svn and update the subrepo to without
bringing any changes.
- $ svn mkdir "$SVNREPOURL/unrelated" -m 'create unrelated'
+ $ svn mkdir "$SVNREPO/unrelated" -m 'create unrelated'
Committed revision 4.
- $ svn up -q s
+ $ svn up s
+
+ Fetching external item into 's/externals'
+ External at revision 1.
+
+ At revision 4.
$ hg sum
parent: 2:* tip (glob)
Message!
@@ -145,13 +150,20 @@ should be empty despite change to s/a
add a commit from svn
- $ cd "$WCROOT/src"
- $ svn up -q
+ $ cd "$WCROOT"/src
+ $ svn up
+ U alpha
+
+ Fetching external item into 'externals'
+ A externals/other
+ Updated external to revision 1.
+
+ Updated to revision 4.
$ echo xyz >> alpha
$ svn propset svn:mime-type 'text/xml' alpha
property 'svn:mime-type' set on 'alpha'
$ svn ci -m 'amend a from svn'
- Sending *alpha (glob)
+ Sending src/alpha
Transmitting file data .
Committed revision 5.
$ cd ../../sub/t
@@ -159,26 +171,28 @@ add a commit from svn
this commit from hg will fail
$ echo zzz >> s/alpha
- $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date'
+ $ hg ci -m 'amend alpha from hg'
committing subrepository s
- abort: svn:*Commit failed (details follow): (glob)
+ abort: svn: Commit failed (details follow):
+ svn: (Out of date)?.*/src/alpha.*(is out of date)? (re)
[255]
$ svn revert -q s/alpha
this commit fails because of meta changes
$ svn propset svn:mime-type 'text/html' s/alpha
- property 'svn:mime-type' set on 's/alpha' (glob)
- $ (hg ci --subrepos -m 'amend alpha from hg' 2>&1; echo "[$?]") | grep -vi 'out of date'
+ property 'svn:mime-type' set on 's/alpha'
+ $ hg ci -m 'amend alpha from hg'
committing subrepository s
- abort: svn:*Commit failed (details follow): (glob)
+ abort: svn: Commit failed (details follow):
+ svn: (Out of date)?.*/src/alpha.*(is out of date)? (re)
[255]
$ svn revert -q s/alpha
this commit fails because of externals changes
$ echo zzz > s/externals/other
- $ hg ci --subrepos -m 'amend externals from hg'
+ $ hg ci -m 'amend externals from hg'
committing subrepository s
abort: cannot commit svn externals
[255]
@@ -199,8 +213,8 @@ this commit fails because of externals changes
this commit fails because of externals meta changes
$ svn propset svn:mime-type 'text/html' s/externals/other
- property 'svn:mime-type' set on 's/externals/other' (glob)
- $ hg ci --subrepos -m 'amend externals from hg'
+ property 'svn:mime-type' set on 's/externals/other'
+ $ hg ci -m 'amend externals from hg'
committing subrepository s
abort: cannot commit svn externals
[255]
@@ -209,21 +223,21 @@ this commit fails because of externals meta changes
clone
$ cd ..
- $ hg clone t tc
+ $ hg clone t tc | fix_path
updating to branch default
- A tc/s/alpha (glob)
- U tc/s (glob)
+ A tc/s/alpha
+ U tc/s
- Fetching external item into 'tc/s/externals'* (glob)
- A tc/s/externals/other (glob)
+ Fetching external item into 'tc/s/externals'
+ A tc/s/externals/other
Checked out external at revision 1.
Checked out revision 3.
- A tc/subdir/s/alpha (glob)
- U tc/subdir/s (glob)
+ A tc/subdir/s/alpha
+ U tc/subdir/s
- Fetching external item into 'tc/subdir/s/externals'* (glob)
- A tc/subdir/s/externals/other (glob)
+ Fetching external item into 'tc/subdir/s/externals'
+ A tc/subdir/s/externals/other
Checked out external at revision 1.
Checked out revision 2.
@@ -252,39 +266,39 @@ update to nullrev (must delete the subrepo)
$ ls
Check hg update --clean
- $ cd "$TESTTMP/sub/t"
+ $ cd $TESTTMP/sub/t
$ cd s
$ echo c0 > alpha
$ echo c1 > f1
$ echo c1 > f2
$ svn add f1 -q
- $ svn status | sort
-
+ $ svn status
? * a (glob)
+ X * externals (glob)
? * f2 (glob)
- A * f1 (glob)
M * alpha (glob)
- Performing status on external item at 'externals'* (glob)
- X * externals (glob)
+ A * f1 (glob)
+
+ Performing status on external item at 'externals'
$ cd ../..
$ hg -R t update -C
- Fetching external item into 't/s/externals'* (glob)
+ Fetching external item into 't/s/externals'
Checked out external at revision 1.
Checked out revision 3.
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd t/s
- $ svn status | sort
-
+ $ svn status
? * a (glob)
+ X * externals (glob)
? * f1 (glob)
? * f2 (glob)
- Performing status on external item at 'externals'* (glob)
- X * externals (glob)
+
+ Performing status on external item at 'externals'
Sticky subrepositories, no changes
- $ cd "$TESTTMP/sub/t"
+ $ cd $TESTTMP/sub/t
$ hg id -n
2
$ cd s
@@ -292,9 +306,9 @@ Sticky subrepositories, no changes
3
$ cd ..
$ hg update 1
- U *s/alpha (glob)
+ U $TESTTMP/sub/t/s/alpha
- Fetching external item into '*s/externals'* (glob)
+ Fetching external item into '$TESTTMP/sub/t/s/externals'
Checked out external at revision 1.
Checked out revision 2.
@@ -313,7 +327,7 @@ Sticky subrepositorys, file changes
A f1
$ cd ..
$ hg id -n
- 1+
+ 1
$ cd s
$ svnversion
2M
@@ -330,9 +344,9 @@ Sticky subrepositorys, file changes
2M
$ cd ..
$ hg update --clean tip
- U *s/alpha (glob)
+ U $TESTTMP/sub/t/s/alpha
- Fetching external item into '*s/externals'* (glob)
+ Fetching external item into '$TESTTMP/sub/t/s/externals'
Checked out external at revision 1.
Checked out revision 3.
@@ -346,7 +360,14 @@ Sticky subrepository, revision updates
3
$ cd ..
$ cd s
- $ svn update -qr 1
+ $ svn update -r 1
+ U alpha
+ U .
+
+ Fetching external item into 'externals'
+ Updated external to revision 1.
+
+ Updated to revision 1.
$ cd ..
$ hg update 1
subrepository sources for s differ (in checked out version)
@@ -376,18 +397,18 @@ Sticky subrepository, file changes and revision updates
l
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg id -n
- 2+
+ 2
$ cd s
$ svnversion
1M
$ cd ..
Sticky repository, update --clean
- $ hg update --clean tip | grep -v 's[/\]externals[/\]other'
- U *s/alpha (glob)
- U *s (glob)
+ $ hg update --clean tip
+ U $TESTTMP/sub/t/s/alpha
+ U $TESTTMP/sub/t/s
- Fetching external item into '*s/externals'* (glob)
+ Fetching external item into '$TESTTMP/sub/t/s/externals'
Checked out external at revision 1.
Checked out revision 3.
@@ -401,7 +422,13 @@ Sticky repository, update --clean
Test subrepo already at intended revision:
$ cd s
- $ svn update -qr 2
+ $ svn update -r 2
+ U alpha
+
+ Fetching external item into 'externals'
+ Updated external to revision 1.
+
+ Updated to revision 2.
$ cd ..
$ hg update 1
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -415,62 +442,75 @@ Test subrepo already at intended revision:
Test case where subversion would fail to update the subrepo because there
are unknown directories being replaced by tracked ones (happens with rebase).
- $ cd "$WCROOT/src"
+ $ cd $WCROOT/src
$ mkdir dir
$ echo epsilon.py > dir/epsilon.py
$ svn add dir
A dir
- A dir/epsilon.py (glob)
+ A dir/epsilon.py
$ svn ci -m 'Add dir/epsilon.py'
- Adding *dir (glob)
- Adding *dir/epsilon.py (glob)
+ Adding src/dir
+ Adding src/dir/epsilon.py
Transmitting file data .
Committed revision 6.
$ cd ../..
$ hg init rebaserepo
$ cd rebaserepo
- $ svn co -r5 --quiet "$SVNREPOURL"/src s
- $ echo "s = [svn] $SVNREPOURL/src" >> .hgsub
+ $ svn co -r5 --quiet "$SVNREPO"/src s
+ $ echo "s = [svn] $SVNREPO/src" >> .hgsub
$ hg add .hgsub
$ hg ci -m addsub
+ committing subrepository s
$ echo a > a
$ hg ci -Am adda
adding a
$ hg up 0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ svn up -qr6 s
+ $ svn up -r6 s
+ A s/dir
+ A s/dir/epsilon.py
+
+ Fetching external item into 's/externals'
+ Updated external to revision 1.
+
+ Updated to revision 6.
$ hg ci -m updatesub
+ committing subrepository s
created new head
$ echo pyc > s/dir/epsilon.pyc
$ hg up 1
- D *s/dir (glob)
+ D $TESTTMP/rebaserepo/s/dir
- Fetching external item into '*s/externals'* (glob)
+ Fetching external item into '$TESTTMP/rebaserepo/s/externals'
Checked out external at revision 1.
Checked out revision 5.
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg up -q 2
+ $ if "$TESTDIR/hghave" -q svn15; then
+ > hg up 2 >/dev/null 2>&1 || echo update failed
+ > fi
Modify one of the externals to point to a different path so we can
test having obstructions when switching branches on checkout:
$ hg checkout tip
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo "obstruct = [svn] $SVNREPOURL/externals" >> .hgsub
- $ svn co -r5 --quiet "$SVNREPOURL"/externals obstruct
- $ hg commit -m 'Start making obstructed working copy'
+ $ echo "obstruct = [svn] $SVNREPO/externals" >> .hgsub
+ $ svn co -r5 --quiet "$SVNREPO"/externals obstruct
+ $ hg commit -m 'Start making obstructed wc'
+ committing subrepository obstruct
$ hg book other
$ hg co -r 'p1(tip)'
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ echo "obstruct = [svn] $SVNREPOURL/src" >> .hgsub
- $ svn co -r5 --quiet "$SVNREPOURL"/src obstruct
+ $ echo "obstruct = [svn] $SVNREPO/src" >> .hgsub
+ $ svn co -r5 --quiet "$SVNREPO"/src obstruct
$ hg commit -m 'Other branch which will be obstructed'
+ committing subrepository obstruct
created new head
Switching back to the head where we have another path mapped to the
same subrepo should work if the subrepo is clean.
$ hg co other
- A *obstruct/other (glob)
+ A $TESTTMP/rebaserepo/obstruct/other
Checked out revision 1.
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -483,19 +523,19 @@ This is surprising, but is also correct based on the current code:
Point to a Subversion branch which has since been deleted and recreated
First, create that condition in the repository.
- $ hg ci --subrepos -m cleanup | grep -v Updating
+ $ hg ci -m cleanup
committing subrepository obstruct
- Sending obstruct/other (glob)
+ Sending obstruct/other
Transmitting file data .
Committed revision 7.
At revision 7.
- $ svn mkdir -m "baseline" $SVNREPOURL/trunk
+ $ svn mkdir -m "baseline" $SVNREPO/trunk
Committed revision 8.
- $ svn copy -m "initial branch" $SVNREPOURL/trunk $SVNREPOURL/branch
+ $ svn copy -m "initial branch" $SVNREPO/trunk $SVNREPO/branch
Committed revision 9.
- $ svn co --quiet "$SVNREPOURL"/branch tempwc
+ $ svn co --quiet "$SVNREPO"/branch tempwc
$ cd tempwc
$ echo "something old" > somethingold
$ svn add somethingold
@@ -504,13 +544,15 @@ First, create that condition in the repository.
Adding somethingold
Transmitting file data .
Committed revision 10.
- $ svn rm -m "remove branch" $SVNREPOURL/branch
+ $ svn rm -m "remove branch" $SVNREPO/branch
Committed revision 11.
- $ svn copy -m "recreate branch" $SVNREPOURL/trunk $SVNREPOURL/branch
+ $ svn copy -m "recreate branch" $SVNREPO/trunk $SVNREPO/branch
Committed revision 12.
- $ svn up -q
+ $ svn up
+ D somethingold
+ Updated to revision 12.
$ echo "something new" > somethingnew
$ svn add somethingnew
A somethingnew
@@ -520,106 +562,24 @@ First, create that condition in the repository.
Committed revision 13.
$ cd ..
$ rm -rf tempwc
- $ svn co "$SVNREPOURL/branch"@10 recreated
- A recreated/somethingold (glob)
+ $ svn co "$SVNREPO/branch"@10 recreated
+ A recreated/somethingold
Checked out revision 10.
- $ echo "recreated = [svn] $SVNREPOURL/branch" >> .hgsub
+ $ echo "recreated = [svn] $SVNREPO/branch" >> .hgsub
$ hg ci -m addsub
+ committing subrepository recreated
$ cd recreated
- $ svn up -q
+ $ svn up
+ D somethingold
+ A somethingnew
+ Updated to revision 13.
$ cd ..
$ hg ci -m updatesub
+ committing subrepository recreated
$ hg up -r-2
- D *recreated/somethingnew (glob)
- A *recreated/somethingold (glob)
+ D $TESTTMP/rebaserepo/recreated/somethingnew
+ A $TESTTMP/rebaserepo/recreated/somethingold
Checked out revision 10.
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ test -f recreated/somethingold
-
-Test archive
-
- $ hg archive -S ../archive-all --debug
- archiving: 0/2 files (0.00%)
- archiving: .hgsub 1/2 files (50.00%)
- archiving: .hgsubstate 2/2 files (100.00%)
- archiving (obstruct): 0/1 files (0.00%)
- archiving (obstruct): 1/1 files (100.00%)
- archiving (s): 0/2 files (0.00%)
- archiving (s): 1/2 files (50.00%)
- archiving (s): 2/2 files (100.00%)
- archiving (recreated): 0/1 files (0.00%)
- archiving (recreated): 1/1 files (100.00%)
-
- $ hg archive -S ../archive-exclude --debug -X **old
- archiving: 0/2 files (0.00%)
- archiving: .hgsub 1/2 files (50.00%)
- archiving: .hgsubstate 2/2 files (100.00%)
- archiving (obstruct): 0/1 files (0.00%)
- archiving (obstruct): 1/1 files (100.00%)
- archiving (s): 0/2 files (0.00%)
- archiving (s): 1/2 files (50.00%)
- archiving (s): 2/2 files (100.00%)
- archiving (recreated): 0 files
- $ find ../archive-exclude | sort
- ../archive-exclude
- ../archive-exclude/.hg_archival.txt
- ../archive-exclude/.hgsub
- ../archive-exclude/.hgsubstate
- ../archive-exclude/obstruct
- ../archive-exclude/obstruct/other
- ../archive-exclude/s
- ../archive-exclude/s/alpha
- ../archive-exclude/s/dir
- ../archive-exclude/s/dir/epsilon.py
-
-Test forgetting files, not implemented in svn subrepo, used to
-traceback
-
-#if no-windows
- $ hg forget 'notafile*'
- notafile*: No such file or directory
- [1]
-#else
- $ hg forget 'notafile'
- notafile: * (glob)
- [1]
-#endif
-
-Test a subrepo referencing a just moved svn path. Last commit rev will
-be different from the revision, and the path will be different as
-well.
-
- $ cd "$WCROOT"
- $ svn up > /dev/null
- $ mkdir trunk/subdir branches
- $ echo a > trunk/subdir/a
- $ svn add trunk/subdir branches
- A trunk/subdir (glob)
- A trunk/subdir/a (glob)
- A branches
- $ svn ci -m addsubdir
- Adding branches
- Adding trunk/subdir (glob)
- Adding trunk/subdir/a (glob)
- Transmitting file data .
- Committed revision 14.
- $ svn cp -m branchtrunk $SVNREPOURL/trunk $SVNREPOURL/branches/somebranch
-
- Committed revision 15.
- $ cd ..
+ $ test -e recreated/somethingold
- $ hg init repo2
- $ cd repo2
- $ svn co $SVNREPOURL/branches/somebranch/subdir
- A subdir/a (glob)
- Checked out revision 15.
- $ echo "subdir = [svn] $SVNREPOURL/branches/somebranch/subdir" > .hgsub
- $ hg add .hgsub
- $ hg ci -m addsub
- $ hg up null
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
- $ hg up
- A *subdir/a (glob)
- Checked out revision 15.
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ..
diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t
index bb58c2f..dba8278 100644
--- a/tests/test-subrepo.t
+++ b/tests/test-subrepo.t
@@ -1,8 +1,6 @@
-Let commit recurse into subrepos by default to match pre-2.0 behavior:
-
- $ echo "[ui]" >> $HGRCPATH
- $ echo "commitsubrepos = Yes" >> $HGRCPATH
-
+ $ rm -rf sub
+ $ mkdir sub
+ $ cd sub
$ hg init t
$ cd t
@@ -34,21 +32,7 @@ Issue2232: committing a subrepo without .hgsub
commit: 1 added, 1 subrepos
update: (current)
$ hg ci -m1
-
-Revert subrepo and test subrepo fileset keyword:
-
- $ echo b > s/a
- $ hg revert "set:subrepo('glob:s*')"
- reverting subrepo s
- reverting s/a (glob)
- $ rm s/a.orig
-
-Revert subrepo with no backup. The "reverting s/a" line is gone since
-we're really running 'hg update' in the subrepo:
-
- $ echo b > s/a
- $ hg revert --no-backup s
- reverting subrepo s
+ committing subrepository s
Issue2022: update -C
@@ -68,14 +52,6 @@ Issue2022: update -C
commit: (clean)
update: (current)
-commands that require a clean repo should respect subrepos
-
- $ echo b >> s/a
- $ hg backout tip
- abort: uncommitted changes in subrepo s
- [255]
- $ hg revert -C -R s s/a
-
add sub sub
$ echo ss = ss > s/.hgsub
@@ -91,7 +67,7 @@ add sub sub
update: (current)
$ hg ci -m2
committing subrepository s
- committing subrepository s/ss (glob)
+ committing subrepository s/ss
$ hg sum
parent: 2:df30734270ae tip
2
@@ -104,24 +80,18 @@ bump sub rev (and check it is ignored by ui.commitsubrepos)
$ echo b > s/a
$ hg -R s ci -ms1
$ hg --config ui.commitsubrepos=no ci -m3
+ committing subrepository s
leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
$ echo c > s/a
$ hg --config ui.commitsubrepos=no ci -m4
abort: uncommitted changes in subrepo s
- (use --subrepos for recursive commit)
[255]
- $ hg id
- f6affe3fbfaa+ tip
- $ hg -R s ci -mc
- $ hg id
- f6affe3fbfaa+ tip
- $ echo d > s/a
$ hg ci -m4
committing subrepository s
$ hg tip -R s
- changeset: 4:02dcf1d70411
+ changeset: 3:1c833a7a9e3a
tag: tip
user: test
date: Thu Jan 01 00:00:00 1970 +0000
@@ -141,7 +111,7 @@ restore
$ hg debugsub
path s
source s
- revision 02dcf1d704118aee3ee306ccfa1910850d5b05ef
+ revision 1c833a7a9e3a4445c711aaf0f012379cd0d4034e
new branch for merge tests
@@ -151,7 +121,7 @@ new branch for merge tests
$ hg init t
$ echo t > t/t
$ hg -R t add t
- adding t/t (glob)
+ adding t/t
5
@@ -203,16 +173,16 @@ merge tests
$ hg merge 6 --debug # test change
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
- ancestor: 1f14a2e2d3ec, local: f0d2028bf86d+, remote: 1831e14459c4
+ overwrite None partial False
+ ancestor 1f14a2e2d3ec local f0d2028bf86d+ remote 1831e14459c4
.hgsubstate: versions differ -> m
updating: .hgsubstate 1/1 files (100.00%)
subrepo merge f0d2028bf86d+ 1831e14459c4 1f14a2e2d3ec
subrepo t: other changed, get t:6747d179aa9a688023c4b0cad32e4c92bb7f34ad:hg
getting subrepo t
resolving manifests
- overwrite: True, partial: False
- ancestor: 60ca1237c194+, local: 60ca1237c194+, remote: 6747d179aa9a
+ overwrite True partial False
+ ancestor 60ca1237c194+ local 60ca1237c194+ remote 6747d179aa9a
t: remote is newer -> g
updating: t 1/1 files (100.00%)
getting t
@@ -231,8 +201,8 @@ merge tests
$ HGMERGE=internal:merge hg merge --debug 7 # test conflict
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
- ancestor: 1831e14459c4, local: e45c8b14af55+, remote: f94576341bcf
+ overwrite None partial False
+ ancestor 1831e14459c4 local e45c8b14af55+ remote f94576341bcf
.hgsubstate: versions differ -> m
updating: .hgsubstate 1/1 files (100.00%)
subrepo merge e45c8b14af55+ f94576341bcf 1831e14459c4
@@ -240,8 +210,8 @@ merge tests
merging subrepo t
searching for copies back to rev 2
resolving manifests
- overwrite: False, partial: False
- ancestor: 6747d179aa9a, local: 20a0db6fbf6c+, remote: 7af322bc1198
+ overwrite None partial False
+ ancestor 6747d179aa9a local 20a0db6fbf6c+ remote 7af322bc1198
t: versions differ -> m
preserving t for resolve of t
updating: t 1/1 files (100.00%)
@@ -249,7 +219,7 @@ merge tests
merging t
my t@20a0db6fbf6c+ other t@7af322bc1198 ancestor t@6747d179aa9a
warning: conflicts during merge.
- merging t incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging t failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -269,9 +239,9 @@ clone
$ cd ..
$ hg clone t tc
updating to branch default
- cloning subrepo s from $TESTTMP/t/s (glob)
- cloning subrepo s/ss from $TESTTMP/t/s/ss (glob)
- cloning subrepo t from $TESTTMP/t/t (glob)
+ cloning subrepo s from $TESTTMP/sub/t/s
+ cloning subrepo s/ss from $TESTTMP/sub/t/s/ss
+ cloning subrepo t from $TESTTMP/sub/t/t
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd tc
$ hg debugsub
@@ -288,14 +258,14 @@ push
$ hg ci -m11
committing subrepository t
$ hg push
- pushing to $TESTTMP/t (glob)
- pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
+ pushing to $TESTTMP/sub/t
+ pushing subrepo s/ss to $TESTTMP/sub/t/s/ss
searching for changes
no changes found
- pushing subrepo s to $TESTTMP/t/s (glob)
+ pushing subrepo s to $TESTTMP/sub/t/s
searching for changes
no changes found
- pushing subrepo t to $TESTTMP/t/t (glob)
+ pushing subrepo t to $TESTTMP/sub/t/t
searching for changes
adding changesets
adding manifests
@@ -313,27 +283,27 @@ push -f
$ hg ci -m12
committing subrepository s
$ hg push
- pushing to $TESTTMP/t (glob)
- pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
+ pushing to $TESTTMP/sub/t
+ pushing subrepo s/ss to $TESTTMP/sub/t/s/ss
searching for changes
no changes found
- pushing subrepo s to $TESTTMP/t/s (glob)
+ pushing subrepo s to $TESTTMP/sub/t/s
searching for changes
abort: push creates new remote head 12a213df6fa9!
(did you forget to merge? use push -f to force)
[255]
$ hg push -f
- pushing to $TESTTMP/t (glob)
- pushing subrepo s/ss to $TESTTMP/t/s/ss (glob)
+ pushing to $TESTTMP/sub/t
+ pushing subrepo s/ss to $TESTTMP/sub/t/s/ss
searching for changes
no changes found
- pushing subrepo s to $TESTTMP/t/s (glob)
+ pushing subrepo s to $TESTTMP/sub/t/s
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
- pushing subrepo t to $TESTTMP/t/t (glob)
+ pushing subrepo t to $TESTTMP/sub/t/t
searching for changes
no changes found
searching for changes
@@ -355,7 +325,7 @@ pull
$ cd ../tc
$ hg pull
- pulling from $TESTTMP/t (glob)
+ pulling from $TESTTMP/sub/t
searching for changes
adding changesets
adding manifests
@@ -366,7 +336,7 @@ pull
should pull t
$ hg up
- pulling subrepo t from $TESTTMP/t/t (glob)
+ pulling subrepo t from $TESTTMP/sub/t/t
searching for changes
adding changesets
adding manifests
@@ -411,7 +381,6 @@ shouldn't need merging
adding a
$ hg branch br
marked working directory as branch br
- (branches are permanent and global, did you want a bookmark?)
$ echo a >> a
$ hg ci -m1
$ hg up default
@@ -459,14 +428,15 @@ shouldn't need merging
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg ci -Am1
adding .hgsub
+ committing subrepository s
$ hg branch br
marked working directory as branch br
- (branches are permanent and global, did you want a bookmark?)
$ echo b > b
$ hg -R s up 3
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg ci -Am1
adding b
+ committing subrepository s
$ hg up default
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo c > c
@@ -485,6 +455,7 @@ shouldn't need merging
$ echo d > d
$ hg ci -Am1
adding d
+ committing subrepository s
$ hg up 3
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg -R s up 5
@@ -492,6 +463,7 @@ shouldn't need merging
$ echo e > e
$ hg ci -Am1
adding e
+ committing subrepository s
$ hg up 5
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -509,16 +481,18 @@ test subrepo delete from .hgsubstate
$ echo test > testdelete/nested/foo
$ echo test > testdelete/nested2/foo
$ hg -R testdelete/nested add
- adding testdelete/nested/foo (glob)
+ adding testdelete/nested/foo
$ hg -R testdelete/nested2 add
- adding testdelete/nested2/foo (glob)
+ adding testdelete/nested2/foo
$ hg -R testdelete/nested ci -m test
$ hg -R testdelete/nested2 ci -m test
$ echo nested = nested > testdelete/.hgsub
$ echo nested2 = nested2 >> testdelete/.hgsub
$ hg -R testdelete add
- adding testdelete/.hgsub (glob)
+ adding testdelete/.hgsub
$ hg -R testdelete ci -m "nested 1 & 2 added"
+ committing subrepository nested
+ committing subrepository nested2
$ echo nested = nested > testdelete/.hgsub
$ hg -R testdelete ci -m "nested 2 deleted"
$ cat testdelete/.hgsubstate
@@ -534,20 +508,22 @@ test repository cloning
$ hg init nested_absolute
$ echo test > nested_absolute/foo
$ hg -R nested_absolute add
- adding nested_absolute/foo (glob)
+ adding nested_absolute/foo
$ hg -R nested_absolute ci -mtest
$ cd mercurial
$ hg init nested_relative
$ echo test2 > nested_relative/foo2
$ hg -R nested_relative add
- adding nested_relative/foo2 (glob)
+ adding nested_relative/foo2
$ hg -R nested_relative ci -mtest2
$ hg init main
$ echo "nested_relative = ../nested_relative" > main/.hgsub
$ echo "nested_absolute = `pwd`/nested_absolute" >> main/.hgsub
$ hg -R main add
- adding main/.hgsub (glob)
+ adding main/.hgsub
$ hg -R main ci -m "add subrepos"
+ committing subrepository nested_absolute
+ committing subrepository nested_relative
$ cd ..
$ hg clone mercurial/main mercurial2/main
updating to branch default
@@ -555,9 +531,9 @@ test repository cloning
$ cat mercurial2/main/nested_absolute/.hg/hgrc \
> mercurial2/main/nested_relative/.hg/hgrc
[paths]
- default = $TESTTMP/mercurial/nested_absolute
+ default = $TESTTMP/sub/mercurial/nested_absolute
[paths]
- default = $TESTTMP/mercurial/nested_relative
+ default = $TESTTMP/sub/mercurial/nested_relative
$ rm -rf mercurial mercurial2
Issue1977: multirepo push should fail if subrepo push fails
@@ -570,9 +546,10 @@ Issue1977: multirepo push should fail if subrepo push fails
$ echo s = s > repo/.hgsub
$ hg -R repo ci -Am1
adding .hgsub
+ committing subrepository s
$ hg clone repo repo2
updating to branch default
- cloning subrepo s from $TESTTMP/repo/s (glob)
+ cloning subrepo s from $TESTTMP/sub/repo/s
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -q -R repo2 pull -u
$ echo 1 > repo2/s/a
@@ -584,6 +561,7 @@ Issue1977: multirepo push should fail if subrepo push fails
$ hg -R repo2/s ci -m3
created new head
$ hg -R repo2 ci -m3
+ committing subrepository s
$ hg -q -R repo2 push
abort: push creates new remote head 9d66565e64e1!
(did you forget to merge? use push -f to force)
@@ -605,10 +583,10 @@ Prepare a repo with subrepo
$ echo sub/repo = sub/repo > .hgsub
$ hg add .hgsub
$ hg ci -mtest
- committing subrepository sub/repo (glob)
+ committing subrepository sub/repo
$ echo test >> sub/repo/foo
$ hg ci -mtest
- committing subrepository sub/repo (glob)
+ committing subrepository sub/repo
$ cd ..
Create repo without default path, pull top repo, and see what happens on update
@@ -623,7 +601,7 @@ Create repo without default path, pull top repo, and see what happens on update
added 2 changesets with 3 changes to 2 files
(run 'hg update' to get a working copy)
$ hg -R issue1852b update
- abort: default path for subrepository sub/repo not found (glob)
+ abort: default path for subrepository sub/repo not found
[255]
Pull -u now doesn't help
@@ -642,14 +620,14 @@ Try the same, but with pull -u
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files
- cloning subrepo sub/repo from issue1852a/sub/repo (glob)
+ cloning subrepo sub/repo from issue1852a/sub/repo
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Try to push from the other side
$ hg -R issue1852a push `pwd`/issue1852c
- pushing to $TESTTMP/issue1852c
- pushing subrepo sub/repo to $TESTTMP/issue1852c/sub/repo (glob)
+ pushing to $TESTTMP/sub/issue1852c
+ pushing subrepo sub/repo to $TESTTMP/sub/issue1852c/sub/repo
searching for changes
no changes found
searching for changes
@@ -693,11 +671,12 @@ subrepository:
$ echo subrepo-2 = subrepo-2 >> .hgsub
$ hg add .hgsub
$ hg ci -m 'Added subrepos'
+ committing subrepository subrepo-1
committing subrepository subrepo-2
$ hg st subrepo-2/file
Check hg update --clean
- $ cd $TESTTMP/t
+ $ cd $TESTTMP/sub/t
$ rm -r t/t.orig
$ hg status -S --all
C .hgsub
@@ -725,7 +704,7 @@ Check hg update --clean
? s/c
Sticky subrepositories, no changes
- $ cd $TESTTMP/t
+ $ cd $TESTTMP/sub/t
$ hg id
925c17564ef8 tip
$ hg -R s id
@@ -747,7 +726,7 @@ Sticky subrepositorys, file changes
$ hg add -S s/f1
$ hg add -S t/f1
$ hg id
- 365661e5936a+
+ 365661e5936a
$ hg -R s id
fc627a69481f+
$ hg -R t id
@@ -791,7 +770,7 @@ Sticky subrepository, revision updates
$ hg id
e45c8b14af55+
$ hg -R s id
- 02dcf1d70411
+ 1c833a7a9e3a
$ hg -R t id
7af322bc1198
@@ -803,21 +782,21 @@ Sticky subrepository, file changes and revision updates
$ hg id
e45c8b14af55+
$ hg -R s id
- 02dcf1d70411+
+ 1c833a7a9e3a+
$ hg -R t id
7af322bc1198+
$ hg update tip
subrepository sources for s differ
- use (l)ocal source (02dcf1d70411) or (r)emote source (12a213df6fa9)?
+ use (l)ocal source (1c833a7a9e3a) or (r)emote source (12a213df6fa9)?
l
subrepository sources for t differ
use (l)ocal source (7af322bc1198) or (r)emote source (52c0adc0515a)?
l
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg id
- 925c17564ef8+ tip
+ 925c17564ef8 tip
$ hg -R s id
- 02dcf1d70411+
+ 1c833a7a9e3a+
$ hg -R t id
7af322bc1198+
@@ -850,16 +829,17 @@ Test that removing .hgsubstate doesn't break anything:
$ hg rm -f .hgsubstate
$ hg ci -mrm
- nothing changed
- [1]
+ committing subrepository s
+ committing subrepository t
+ created new head
$ hg log -vr tip
- changeset: 13:925c17564ef8
+ changeset: 14:3941e0aa5236
tag: tip
+ parent: 11:365661e5936a
user: test
date: Thu Jan 01 00:00:00 1970 +0000
- files: .hgsubstate
description:
- 13
+ rm
@@ -867,11 +847,9 @@ Test that removing .hgsub removes .hgsubstate:
$ hg rm .hgsub
$ hg ci -mrm2
- created new head
$ hg log -vr tip
- changeset: 14:2400bccd50af
+ changeset: 15:8b31de9d13d1
tag: tip
- parent: 11:365661e5936a
user: test
date: Thu Jan 01 00:00:00 1970 +0000
files: .hgsub .hgsubstate
@@ -879,145 +857,3 @@ Test that removing .hgsub removes .hgsubstate:
rm2
-Test issue3153: diff -S with deleted subrepos
-
- $ hg diff --nodates -S -c .
- diff -r 365661e5936a -r 2400bccd50af .hgsub
- --- a/.hgsub
- +++ /dev/null
- @@ -1,2 +0,0 @@
- -s = s
- -t = t
- diff -r 365661e5936a -r 2400bccd50af .hgsubstate
- --- a/.hgsubstate
- +++ /dev/null
- @@ -1,2 +0,0 @@
- -fc627a69481fcbe5f1135069e8a3881c023e4cf5 s
- -e95bcfa18a358dc4936da981ebf4147b4cad1362 t
-
-Test behavior of add for explicit path in subrepo:
- $ cd ..
- $ hg init explicit
- $ cd explicit
- $ echo s = s > .hgsub
- $ hg add .hgsub
- $ hg init s
- $ hg ci -m0
-Adding with an explicit path in a subrepo adds the file
- $ echo c1 > f1
- $ echo c2 > s/f2
- $ hg st -S
- ? f1
- ? s/f2
- $ hg add s/f2
- $ hg st -S
- A s/f2
- ? f1
- $ hg ci -R s -m0
- $ hg ci -Am1
- adding f1
-Adding with an explicit path in a subrepo with -S has the same behavior
- $ echo c3 > f3
- $ echo c4 > s/f4
- $ hg st -S
- ? f3
- ? s/f4
- $ hg add -S s/f4
- $ hg st -S
- A s/f4
- ? f3
- $ hg ci -R s -m1
- $ hg ci -Ama2
- adding f3
-Adding without a path or pattern silently ignores subrepos
- $ echo c5 > f5
- $ echo c6 > s/f6
- $ echo c7 > s/f7
- $ hg st -S
- ? f5
- ? s/f6
- ? s/f7
- $ hg add
- adding f5
- $ hg st -S
- A f5
- ? s/f6
- ? s/f7
- $ hg ci -R s -Am2
- adding f6
- adding f7
- $ hg ci -m3
-Adding without a path or pattern with -S also adds files in subrepos
- $ echo c8 > f8
- $ echo c9 > s/f9
- $ echo c10 > s/f10
- $ hg st -S
- ? f8
- ? s/f10
- ? s/f9
- $ hg add -S
- adding f8
- adding s/f10 (glob)
- adding s/f9 (glob)
- $ hg st -S
- A f8
- A s/f10
- A s/f9
- $ hg ci -R s -m3
- $ hg ci -m4
-Adding with a pattern silently ignores subrepos
- $ echo c11 > fm11
- $ echo c12 > fn12
- $ echo c13 > s/fm13
- $ echo c14 > s/fn14
- $ hg st -S
- ? fm11
- ? fn12
- ? s/fm13
- ? s/fn14
- $ hg add 'glob:**fm*'
- adding fm11
- $ hg st -S
- A fm11
- ? fn12
- ? s/fm13
- ? s/fn14
- $ hg ci -R s -Am4
- adding fm13
- adding fn14
- $ hg ci -Am5
- adding fn12
-Adding with a pattern with -S also adds matches in subrepos
- $ echo c15 > fm15
- $ echo c16 > fn16
- $ echo c17 > s/fm17
- $ echo c18 > s/fn18
- $ hg st -S
- ? fm15
- ? fn16
- ? s/fm17
- ? s/fn18
- $ hg add -S 'glob:**fm*'
- adding fm15
- adding s/fm17 (glob)
- $ hg st -S
- A fm15
- A s/fm17
- ? fn16
- ? s/fn18
- $ hg ci -R s -Am5
- adding fn18
- $ hg ci -Am6
- adding fn16
-
-Test behavior of forget for explicit path in subrepo:
-Forgetting an explicit path in a subrepo untracks the file
- $ echo c19 > s/f19
- $ hg add s/f19
- $ hg st -S
- A s/f19
- $ hg forget s/f19
- $ hg st -S
- ? s/f19
- $ rm s/f19
- $ cd ..
diff --git a/tests/test-symlink-os-yes-fs-no.py b/tests/test-symlink-os-yes-fs-no.py
index e122d60..ea736e8 100644
--- a/tests/test-symlink-os-yes-fs-no.py
+++ b/tests/test-symlink-os-yes-fs-no.py
@@ -5,14 +5,11 @@ TESTDIR = os.environ["TESTDIR"]
BUNDLEPATH = os.path.join(TESTDIR, 'bundles', 'test-no-symlinks.hg')
# only makes sense to test on os which supports symlinks
-if not getattr(os, "symlink", False):
+if not hasattr(os, "symlink"):
sys.exit(80) # SKIPPED_STATUS defined in run-tests.py
-u = ui.ui()
-# hide outer repo
-hg.peer(u, {}, '.', create=True)
-
# clone with symlink support
+u = ui.ui()
hg.clone(u, {}, BUNDLEPATH, 'test0')
repo = hg.repository(u, 'test0')
diff --git a/tests/test-symlink-placeholder.t b/tests/test-symlink-placeholder.t
deleted file mode 100644
index 501b62b..0000000
--- a/tests/test-symlink-placeholder.t
+++ /dev/null
@@ -1,72 +0,0 @@
- $ "$TESTDIR/hghave" symlink || exit 80
-
-Create extension that can disable symlink support:
-
- $ cat > nolink.py <<EOF
- > from mercurial import extensions, util
- > def setflags(orig, f, l, x):
- > pass
- > def checklink(orig, path):
- > return False
- > def extsetup(ui):
- > extensions.wrapfunction(util, 'setflags', setflags)
- > extensions.wrapfunction(util, 'checklink', checklink)
- > EOF
-
- $ hg init unix-repo
- $ cd unix-repo
- $ echo foo > a
- $ ln -s a b
- $ hg ci -Am0
- adding a
- adding b
- $ cd ..
-
-Simulate a checkout shared on NFS/Samba:
-
- $ hg clone -q unix-repo shared
- $ cd shared
- $ rm b
- $ echo foo > b
- $ hg --config extensions.n=$TESTTMP/nolink.py status --debug
- ignoring suspect symlink placeholder "b"
-
-Make a clone using placeholders:
-
- $ hg --config extensions.n=$TESTTMP/nolink.py clone . ../win-repo
- updating to branch default
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ../win-repo
- $ cat b
- a (no-eol)
- $ hg --config extensions.n=$TESTTMP/nolink.py st --debug
-
-Write binary data to the placeholder:
-
- >>> open('b', 'w').write('this is a binary\0')
- $ hg --config extensions.n=$TESTTMP/nolink.py st --debug
- ignoring suspect symlink placeholder "b"
-
-Write a long string to the placeholder:
-
- >>> open('b', 'w').write('this' * 1000)
- $ hg --config extensions.n=$TESTTMP/nolink.py st --debug
- ignoring suspect symlink placeholder "b"
-
-Commit shouldn't succeed:
-
- $ hg --config extensions.n=$TESTTMP/nolink.py ci -m1
- nothing changed
- [1]
-
-Write a valid string to the placeholder:
-
- >>> open('b', 'w').write('this')
- $ hg --config extensions.n=$TESTTMP/nolink.py st --debug
- M b
- $ hg --config extensions.n=$TESTTMP/nolink.py ci -m1
- $ hg manifest tip --verbose
- 644 a
- 644 @ b
-
- $ cd ..
diff --git a/tests/test-symlinks.t b/tests/test-symlinks.t
index 660ab91..9d35c80 100644
--- a/tests/test-symlinks.t
+++ b/tests/test-symlinks.t
@@ -168,12 +168,11 @@ now addremove should remove old files
? foo
$ hg status ../link
? foo
- $ hg add foo
- $ hg cp foo "$TESTTMP/link/bar"
- foo has not been committed yet, so no copy data will be stored for bar.
$ cd ..
+
+
$ hg init b
$ cd b
$ ln -s nothing dangling
@@ -195,13 +194,13 @@ now addremove should remove old files
$ hg manifest --debug
2564acbe54bbbedfbf608479340b359f04597f80 644 @ dangling
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> nothing
$ rm dangling
$ ln -s void dangling
$ hg commit -m 'change symlink'
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> void
@@ -209,7 +208,7 @@ modifying link
$ rm dangling
$ ln -s empty dangling
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> empty
@@ -217,13 +216,13 @@ reverting to rev 0:
$ hg revert -r 0 -a
reverting dangling
- $ "$TESTDIR/readlink.py" dangling
+ $ $TESTDIR/readlink.py dangling
dangling -> nothing
backups:
- $ "$TESTDIR/readlink.py" *.orig
+ $ $TESTDIR/readlink.py *.orig
dangling.orig -> empty
$ rm *.orig
$ hg up -C
@@ -236,7 +235,7 @@ copies
$ hg st -Cmard
A dangling2
dangling
- $ "$TESTDIR/readlink.py" dangling dangling2
+ $ $TESTDIR/readlink.py dangling dangling2
dangling -> void
dangling2 -> void
@@ -253,4 +252,3 @@ Issue995: hg copy -A incorrectly handles symbolic links
$ mv dirlink newdir/dirlink
$ hg mv -A dirlink newdir/dirlink
- $ cd ..
diff --git a/tests/test-tag.t b/tests/test-tag.t
index 3731802..d087d18 100644
--- a/tests/test-tag.t
+++ b/tests/test-tag.t
@@ -205,18 +205,19 @@ tag and branch using same name
$ hg branch tag-and-branch-same-name
marked working directory as branch tag-and-branch-same-name
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m"discouraged"
$ hg tag tag-and-branch-same-name
warning: tag tag-and-branch-same-name conflicts with existing branch name
test custom commit messages
- $ cat > editor.sh << '__EOF__'
+ $ cat > editor << '__EOF__'
+ > #!/bin/sh
> echo "custom tag message" > "$1"
> echo "second line" >> "$1"
> __EOF__
- $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e
+ $ chmod +x editor
+ $ HGEDITOR="'`pwd`'"/editor hg tag custom-tag -e
$ hg log -l1 --template "{desc}\n"
custom tag message
second line
@@ -231,7 +232,7 @@ local tag with .hgtags modified
$ hg st
M .hgtags
? .hgtags.orig
- ? editor.sh
+ ? editor
$ hg tag --local baz
$ hg revert --no-backup .hgtags
@@ -248,6 +249,7 @@ tagging when at named-branch-head that's not a topo-head
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg tag new-topo-head
+
tagging on null rev
$ hg up null
@@ -258,12 +260,6 @@ tagging on null rev
$ hg init empty
$ hg tag -R empty nullrev
- abort: null revision specified
- [255]
-
- $ hg tag -R empty -r 00000000000 -f nulltag
- abort: null revision specified
- [255]
$ cd ..
@@ -280,7 +276,6 @@ tagging on an uncommitted merge (issue2542)
$ hg co -q 0
$ hg branch b1
marked working directory as branch b1
- (branches are permanent and global, did you want a bookmark?)
$ hg ci -m2
$ hg up default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -301,19 +296,3 @@ tagging on an uncommitted merge (issue2542)
t3 1:c3adabd1a5f4 local
$ cd ..
-
-commit hook on tag used to be run without write lock - issue3344
-
- $ hg init repo-tag
- $ touch repo-tag/test
- $ hg -R repo-tag commit -A -m "test"
- adding test
- $ hg init repo-tag-target
- $ hg -R repo-tag --config hooks.commit="\"hg\" push \"`pwd`/repo-tag-target\"" tag tag
- pushing to $TESTTMP/repo-tag-target
- searching for changes
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
-
diff --git a/tests/test-tags.t b/tests/test-tags.t
index 557c076..798fd01 100644
--- a/tests/test-tags.t
+++ b/tests/test-tags.t
@@ -75,13 +75,11 @@ Repeat with cold tag cache:
And again, but now unable to write tag cache:
-#if unix-permissions
$ rm -f .hg/cache/tags
$ chmod 555 .hg
$ hg identify
b9154636be93 tip
$ chmod 755 .hg
-#endif
Create a branch:
@@ -137,6 +135,8 @@ Add invalid tags:
$ echo >> .hgtags
$ echo "foo bar" >> .hgtags
$ echo "a5a5 invalid" >> .hg/localtags
+ $ echo "committing .hgtags:"
+ committing .hgtags:
$ cat .hgtags
acb14030fe0a21b60322c440ad2d20cf7685a376 first
spam
@@ -380,5 +380,3 @@ to remove a tag of type X which actually only exists as a type Y:
tip 1:a0b6fe111088
localtag 0:bbd179dfa0a7 local
globaltag 0:bbd179dfa0a7
-
- $ cd ..
diff --git a/tests/test-template-engine.t b/tests/test-template-engine.t
index 9dafebf..1eb7c78 100644
--- a/tests/test-template-engine.t
+++ b/tests/test-template-engine.t
@@ -35,5 +35,3 @@
adding mymap
$ hg log --style=./mymap
0 97e5f848f0936960273bbf75be6388cd0350a32b test
-
- $ cd ..
diff --git a/tests/test-transplant.t b/tests/test-transplant.t
index 36a61f7..d2545f3 100644
--- a/tests/test-transplant.t
+++ b/tests/test-transplant.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
$ cat <<EOF >> $HGRCPATH
> [extensions]
> transplant=
@@ -83,87 +81,6 @@ test tranplanted keyword
1
0
-test destination() revset predicate with a transplant of a transplant; new
-clone so subsequent rollback isn't affected
- $ hg clone -q . ../destination
- $ cd ../destination
- $ hg up -Cq 0
- $ hg branch -q b4
- $ hg ci -qm "b4"
- $ hg transplant 7
- applying ffd6818a3975
- ffd6818a3975 transplanted to 502236fa76bb
-
-
- $ hg log -r 'destination()'
- changeset: 5:e234d668f844
- parent: 1:d11e3596cc1a
- user: test
- date: Thu Jan 01 00:00:00 1970 +0000
- summary: b1
-
- changeset: 6:539f377d78df
- user: test
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: b2
-
- changeset: 7:ffd6818a3975
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: b3
-
- changeset: 9:502236fa76bb
- branch: b4
- tag: tip
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: b3
-
- $ hg log -r 'destination(a53251cdf717)'
- changeset: 7:ffd6818a3975
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: b3
-
- changeset: 9:502236fa76bb
- branch: b4
- tag: tip
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: b3
-
-
-test subset parameter in reverse order
- $ hg log -r 'reverse(all()) and destination(a53251cdf717)'
- changeset: 9:502236fa76bb
- branch: b4
- tag: tip
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: b3
-
- changeset: 7:ffd6818a3975
- user: test
- date: Thu Jan 01 00:00:02 1970 +0000
- summary: b3
-
-
-back to the original dir
- $ cd ../rebase
-
-rollback the transplant
- $ hg rollback
- repository tip rolled back to revision 4 (undo transplant)
- working directory now based on revision 1
- $ hg tip -q
- 4:a53251cdf717
- $ hg parents -q
- 1:d11e3596cc1a
- $ hg status
- ? b1
- ? b2
- ? b3
-
$ hg clone ../t ../prune
updating to branch default
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -188,25 +105,7 @@ rebase b onto r1, skipping b2
1 r2
0 r1
-test same-parent transplant with --log
- $ hg clone -r 1 ../t ../sameparent
- adding changesets
- adding manifests
- adding file changes
- added 2 changesets with 2 changes to 2 files
- updating to branch default
- 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ../sameparent
- $ hg transplant --log -s ../prune 5
- searching for changes
- applying e234d668f844
- e234d668f844 transplanted to e07aea8ecf9c
- $ hg log --template '{rev} {parents} {desc}\n'
- 2 b1
- (transplanted from e234d668f844e1b1a765f01db83a32c0c7bfa170)
- 1 r2
- 0 r1
remote transplant
$ hg clone -r 1 ../t ../remote
@@ -298,9 +197,7 @@ transplant --continue
> baz
> EOF
$ echo toremove > toremove
- $ echo baz > baz
$ hg ci -Amfoo
- adding baz
adding foo
adding toremove
$ cat <<EOF > foo
@@ -314,22 +211,17 @@ transplant --continue
adding added
removing toremove
$ echo bar > bar
- $ cat > baz <<EOF
- > before baz
- > baz
- > after baz
- > EOF
$ hg ci -Ambar
adding bar
$ echo bar2 >> bar
$ hg ci -mbar2
$ hg up 0
- 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
$ echo foobar > foo
$ hg ci -mfoobar
created new head
$ hg transplant 1:3
- applying 46ae92138f3c
+ applying a1e30dd1b8e7
patching file foo
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file foo.rej
@@ -343,7 +235,7 @@ transplant -c shouldn't use an old changeset
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm added
$ hg transplant 1
- applying 46ae92138f3c
+ applying a1e30dd1b8e7
patching file foo
Hunk #1 FAILED at 0
1 out of 1 hunks FAILED -- saving rejects to file foo.rej
@@ -351,41 +243,17 @@ transplant -c shouldn't use an old changeset
abort: fix up the merge and run hg transplant --continue
[255]
$ hg transplant --continue
- 46ae92138f3c transplanted as 9159dada197d
+ a1e30dd1b8e7 transplanted as f1563cf27039
$ hg transplant 1:3
- skipping already applied revision 1:46ae92138f3c
- applying 9d6d6b5a8275
- 9d6d6b5a8275 transplanted to 2d17a10c922f
- applying 1dab759070cf
- 1dab759070cf transplanted to e06a69927eb0
+ skipping already applied revision 1:a1e30dd1b8e7
+ applying 1739ac5f6139
+ 1739ac5f6139 transplanted to d649c221319f
+ applying 0282d5fbbe02
+ 0282d5fbbe02 transplanted to 77418277ccb3
$ hg locate
added
bar
- baz
foo
-
-test multiple revisions and --continue
-
- $ hg up -qC 0
- $ echo bazbaz > baz
- $ hg ci -Am anotherbaz baz
- created new head
- $ hg transplant 1:3
- applying 46ae92138f3c
- 46ae92138f3c transplanted to 1024233ea0ba
- applying 9d6d6b5a8275
- patching file baz
- Hunk #1 FAILED at 0
- 1 out of 1 hunks FAILED -- saving rejects to file baz.rej
- patch failed to apply
- abort: fix up the merge and run hg transplant --continue
- [255]
- $ echo fixed > baz
- $ hg transplant --continue
- 9d6d6b5a8275 transplanted as d80c49962290
- applying 1dab759070cf
- 1dab759070cf transplanted to aa0ffe6bd5ae
-
$ cd ..
Issue1111: Test transplant --merge
@@ -424,8 +292,6 @@ test transplant into empty repository
$ cd ..
-#if unix-permissions system-sh
-
test filter
$ hg init filter
@@ -511,10 +377,6 @@ test transplant with filter handles invalid changelog
filtering * (glob)
abort: filter corrupted changeset (no user or date)
[255]
- $ cd ..
-
-#endif
-
test with a win32ext like setup (differing EOLs)
@@ -547,88 +409,3 @@ test with a win32ext like setup (differing EOLs)
a\r (esc)
b\r (esc)
$ cd ..
-
-test transplant with merge changeset is skipped
-
- $ hg init merge1a
- $ cd merge1a
- $ echo a > a
- $ hg ci -Am a
- adding a
- $ hg branch b
- marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -m branchb
- $ echo b > b
- $ hg ci -Am b
- adding b
- $ hg update default
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg merge b
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m mergeb
- $ cd ..
-
- $ hg init merge1b
- $ cd merge1b
- $ hg transplant -s ../merge1a tip
- $ cd ..
-
-test transplant with merge changeset accepts --parent
-
- $ hg init merge2a
- $ cd merge2a
- $ echo a > a
- $ hg ci -Am a
- adding a
- $ hg branch b
- marked working directory as branch b
- (branches are permanent and global, did you want a bookmark?)
- $ hg ci -m branchb
- $ echo b > b
- $ hg ci -Am b
- adding b
- $ hg update default
- 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
- $ hg merge b
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- (branch merge, don't forget to commit)
- $ hg ci -m mergeb
- $ cd ..
-
- $ hg init merge2b
- $ cd merge2b
- $ hg transplant -s ../merge2a --parent 0 tip
- applying be9f9b39483f
- be9f9b39483f transplanted to 9959e51f94d1
- $ cd ..
-
-test transplanting a patch turning into a no-op
-
- $ hg init binarysource
- $ cd binarysource
- $ echo a > a
- $ hg ci -Am adda a
- >>> file('b', 'wb').write('\0b1')
- $ hg ci -Am addb b
- >>> file('b', 'wb').write('\0b2')
- $ hg ci -m changeb b
- $ cd ..
-
- $ hg clone -r0 binarysource binarydest
- adding changesets
- adding manifests
- adding file changes
- added 1 changesets with 1 changes to 1 files
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd binarydest
- $ cp ../binarysource/b b
- $ hg ci -Am addb2 b
- $ hg transplant -s ../binarysource 2
- searching for changes
- applying 7a7d57e15850
- skipping emptied changeset 7a7d57e15850
- $ cd ..
-
diff --git a/tests/test-treediscovery-legacy.t b/tests/test-treediscovery-legacy.t
index bc3563c..b31e574 100644
--- a/tests/test-treediscovery-legacy.t
+++ b/tests/test-treediscovery-legacy.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Tests discovery against servers without getbundle support:
$ cat >> $HGRCPATH <<EOF
@@ -15,13 +13,6 @@ Tests discovery against servers without getbundle support:
$ cp $HGRCPATH $HGRCPATH-nocap
$ cp $HGRCPATH-withcap $HGRCPATH
-Prep for test server without branchmap support
-
- $ CAP="branchmap"
- $ . "$TESTDIR/notcapable"
- $ cp $HGRCPATH $HGRCPATH-nocap-branchmap
- $ cp $HGRCPATH-withcap $HGRCPATH
-
Setup HTTP server control:
$ remote=http://localhost:$HGPORT/
@@ -58,7 +49,6 @@ Both are empty:
$ hg push -R empty1 $remote
pushing to http://localhost:$HGPORT/
no changes found
- [1]
$ tstop
Base repo:
@@ -118,7 +108,6 @@ Full clone:
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
- [1]
$ cd ..
Local is empty:
@@ -149,7 +138,6 @@ Local is empty:
$ hg push $remote
pushing to http://localhost:$HGPORT/
no changes found
- [1]
$ hg pull $remote
pulling from http://localhost:$HGPORT/
requesting all changes
@@ -194,7 +182,6 @@ Local is subset:
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
- [1]
$ hg pull $remote
pulling from http://localhost:$HGPORT/
searching for changes
@@ -321,51 +308,3 @@ Partial pull:
$ tstop
-Exercise pushing to server without branchmap capability
-
- $ cp $HGRCPATH-nocap-branchmap $HGRCPATH-nocap
- $ hg init rlocal
- $ cd rlocal
- $ echo A > A
- $ hg ci -Am A
- adding A
- $ cd ..
- $ hg clone rlocal rremote
- updating to branch default
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd rlocal
- $ echo B > B
- $ hg ci -Am B
- adding B
- $ cd ..
- $ tstart rremote
-
- $ cd rlocal
- $ hg incoming $remote
- comparing with http://localhost:$HGPORT/
- searching for changes
- no changes found
- [1]
- $ hg outgoing $remote
- comparing with http://localhost:$HGPORT/
- searching for changes
- 1 27547f69f254: B
- $ hg pull $remote
- pulling from http://localhost:$HGPORT/
- searching for changes
- no changes found
- $ hg push $remote
- pushing to http://localhost:$HGPORT/
- searching for changes
- remote: adding changesets
- remote: adding manifests
- remote: adding file changes
- remote: added 1 changesets with 1 changes to 1 files
- $ hg outgoing $remote
- comparing with http://localhost:$HGPORT/
- searching for changes
- no changes found
- [1]
- $ cd ..
-
- $ tstop
diff --git a/tests/test-treediscovery.t b/tests/test-treediscovery.t
index 1f59d0b..499ad6e 100644
--- a/tests/test-treediscovery.t
+++ b/tests/test-treediscovery.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
-
Tests discovery against servers without getbundle support:
$ CAP=getbundle
@@ -45,7 +43,6 @@ Both are empty:
$ hg push -R empty1 $remote
pushing to http://localhost:$HGPORT/
no changes found
- [1]
$ tstop
Base repo:
@@ -105,7 +102,6 @@ Full clone:
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
- [1]
$ cd ..
Local is empty:
@@ -132,7 +128,6 @@ Local is empty:
$ hg push $remote
pushing to http://localhost:$HGPORT/
no changes found
- [1]
$ hg pull $remote
pulling from http://localhost:$HGPORT/
requesting all changes
@@ -175,7 +170,6 @@ Local is subset:
pushing to http://localhost:$HGPORT/
searching for changes
no changes found
- [1]
$ hg pull $remote
pulling from http://localhost:$HGPORT/
searching for changes
diff --git a/tests/test-trusted.py.out b/tests/test-trusted.py.out
index 8774db3..371bf37 100644
--- a/tests/test-trusted.py.out
+++ b/tests/test-trusted.py.out
@@ -15,7 +15,7 @@ untrusted
. . local = /another/path
# different user, same group
-not trusting file .hg/hgrc from untrusted user abc, group bar
+Not trusting file .hg/hgrc from untrusted user abc, group bar
trusted
global = /some/path
untrusted
@@ -31,7 +31,7 @@ untrusted
. . local = /another/path
# different user, different group
-not trusting file .hg/hgrc from untrusted user abc, group def
+Not trusting file .hg/hgrc from untrusted user abc, group def
trusted
global = /some/path
untrusted
@@ -91,7 +91,7 @@ untrusted
# we don't get confused by users and groups with the same name
# different user, different group
-not trusting file .hg/hgrc from untrusted user abc, group def
+Not trusting file .hg/hgrc from untrusted user abc, group def
trusted
global = /some/path
untrusted
@@ -118,7 +118,7 @@ untrusted
# Can't figure out the name of the user running this process
# different user, different group
-not trusting file .hg/hgrc from untrusted user abc, group def
+Not trusting file .hg/hgrc from untrusted user abc, group def
trusted
global = /some/path
untrusted
@@ -127,7 +127,7 @@ untrusted
# prints debug warnings
# different user, different group
-not trusting file .hg/hgrc from untrusted user abc, group def
+Not trusting file .hg/hgrc from untrusted user abc, group def
trusted
ignoring untrusted configuration option paths.local = /another/path
global = /some/path
@@ -146,7 +146,7 @@ untrusted
# report_untrusted enabled with debug shows warnings
# different user, different group
-not trusting file .hg/hgrc from untrusted user abc, group def
+Not trusting file .hg/hgrc from untrusted user abc, group def
trusted
ignoring untrusted configuration option paths.local = /another/path
global = /some/path
@@ -159,7 +159,7 @@ untrusted
quux
# read trusted, untrusted, new ui, trusted
-not trusting file foobar from untrusted user abc, group def
+Not trusting file foobar from untrusted user abc, group def
trusted:
ignoring untrusted configuration option foobar.baz = quux
None
@@ -173,7 +173,7 @@ quux
# parse error
# different user, different group
-not trusting file .hg/hgrc from untrusted user abc, group def
+Not trusting file .hg/hgrc from untrusted user abc, group def
('foo', '.hg/hgrc:1')
# same user, same group
('foo', '.hg/hgrc:1')
diff --git a/tests/test-unbundlehash.t b/tests/test-unbundlehash.t
index e55e1b7..a386cde 100644
--- a/tests/test-unbundlehash.t
+++ b/tests/test-unbundlehash.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
Test wire protocol unbundle with hashed heads (capability: unbundlehash)
diff --git a/tests/test-unrelated-pull.t b/tests/test-unrelated-pull.t
index 5779905..f9ae036 100644
--- a/tests/test-unrelated-pull.t
+++ b/tests/test-unrelated-pull.t
@@ -41,5 +41,3 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: b
-
- $ cd ..
diff --git a/tests/test-up-local-change.t b/tests/test-up-local-change.t
index 815f9fb..f41e461 100644
--- a/tests/test-up-local-change.t
+++ b/tests/test-up-local-change.t
@@ -44,8 +44,8 @@
unmatched files in other:
b
resolving manifests
- overwrite: False, partial: False
- ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
+ overwrite False partial False
+ ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb
a: versions differ -> m
b: remote created -> g
preserving a for resolve of a
@@ -65,8 +65,8 @@
$ hg --debug up 0
resolving manifests
- overwrite: False, partial: False
- ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a
+ overwrite False partial False
+ ancestor 1e71731e6fbb local 1e71731e6fbb+ remote c19d34741b0a
a: versions differ -> m
b: other deleted -> r
preserving a for resolve of a
@@ -84,8 +84,7 @@
summary: 1
$ hg --debug merge
- abort: nothing to merge
- (use 'hg update' instead)
+ abort: there is nothing to merge - use "hg update" instead
[255]
$ hg parents
changeset: 0:c19d34741b0a
@@ -98,8 +97,8 @@
unmatched files in other:
b
resolving manifests
- overwrite: False, partial: False
- ancestor: c19d34741b0a, local: c19d34741b0a+, remote: 1e71731e6fbb
+ overwrite False partial False
+ ancestor c19d34741b0a local c19d34741b0a+ remote 1e71731e6fbb
a: versions differ -> m
b: remote created -> g
preserving a for resolve of a
@@ -170,14 +169,13 @@ create a second head
abort: crosses branches (merge branches or use --clean to discard changes)
[255]
$ hg --debug merge
- abort: outstanding uncommitted changes
- (use 'hg status' to list changes)
+ abort: outstanding uncommitted changes (use 'hg status' to list changes)
[255]
$ hg --debug merge -f
searching for copies back to rev 1
resolving manifests
- overwrite: False, partial: False
- ancestor: c19d34741b0a, local: 1e71731e6fbb+, remote: 83c51d0caff4
+ overwrite False partial False
+ ancestor c19d34741b0a local 1e71731e6fbb+ remote 83c51d0caff4
a: versions differ -> m
b: versions differ -> m
preserving a for resolve of a
@@ -234,5 +232,3 @@ test a local add
added 1 changesets with 1 changes to 1 files
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg st
-
- $ cd ..
diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
index e6a578e..d900037 100644
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -15,11 +15,6 @@
$ hg init
$ echo foo > foo
$ echo zero > a
- $ hg init sub
- $ echo suba > sub/suba
- $ hg --cwd sub ci -Am addsuba
- adding suba
- $ echo 'sub = sub' > .hgsub
$ hg ci -qAm0
$ echo one > a ; hg ci -m1
$ echo two > a ; hg ci -m2
@@ -34,46 +29,44 @@ Initial repo state:
$ hg --config 'extensions.graphlog=' \
> glog --template '{rev}:{node|short} {parents} {branches}\n'
- @ 5:ff252e8273df b1
+ @ 5:e1bb631146ca b1
|
- o 4:d047485b3896 0:60829823a42a b1
+ o 4:a4fdb3b883c4 0:b608b9236435 b1
|
- | o 3:6efa171f091b 1:0786582aa4b1
+ | o 3:4b57d2520816 1:44592833ba9f
| |
- | | o 2:bd10386d478c
+ | | o 2:063f31070f65
| |/
- | o 1:0786582aa4b1
+ | o 1:44592833ba9f
|/
- o 0:60829823a42a
+ o 0:b608b9236435
Test helper functions:
$ revtest () {
> msg=$1
- > dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub'
+ > dirtyflag=$2 # 'clean' or 'dirty'
> startrev=$3
> targetrev=$4
> opt=$5
> hg up -qC $startrev
> test $dirtyflag = dirty && echo dirty > foo
- > test $dirtyflag = dirtysub && echo dirty > sub/suba
> hg up $opt $targetrev
> hg parent --template 'parent={rev}\n'
- > hg stat -S
+ > hg stat
> }
$ norevtest () {
> msg=$1
- > dirtyflag=$2 # 'clean', 'dirty' or 'dirtysub'
+ > dirtyflag=$2 # 'clean' or 'dirty'
> startrev=$3
> opt=$4
> hg up -qC $startrev
> test $dirtyflag = dirty && echo dirty > foo
- > test $dirtyflag = dirtysub && echo dirty > sub/suba
> hg up $opt
> hg parent --template 'parent={rev}\n'
- > hg stat -S
+ > hg stat
> }
Test cases are documented in a table in the update function of merge.py.
@@ -106,30 +99,16 @@ Cases are run as shown in that table, row by row.
parent=2
M foo
- $ revtest 'none dirtysub linear' dirtysub 1 2
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- parent=2
- M sub/suba
-
$ revtest 'none dirty same' dirty 2 3
abort: crosses branches (merge branches or use --clean to discard changes)
parent=2
M foo
- $ revtest 'none dirtysub same' dirtysub 2 3
- abort: crosses branches (merge branches or use --clean to discard changes)
- parent=2
- M sub/suba
-
$ revtest 'none dirty cross' dirty 3 4
abort: crosses branches (merge branches or use --clean to discard changes)
parent=3
M foo
- $ revtest 'none dirtysub cross' dirtysub 3 4
- abort: crosses branches (merge branches or use --clean to discard changes)
- parent=3
- M sub/suba
$ revtest '-C dirty linear' dirty 1 2 -C
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -140,11 +119,6 @@ Cases are run as shown in that table, row by row.
parent=1
M foo
- $ revtest '-c dirtysub linear' dirtysub 1 2 -c
- abort: uncommitted local changes
- parent=1
- M sub/suba
-
$ norevtest '-c clean same' clean 2 -c
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
parent=3
diff --git a/tests/test-update-issue1456.t b/tests/test-update-issue1456.t
index e6c8f23..afce859 100644
--- a/tests/test-update-issue1456.t
+++ b/tests/test-update-issue1456.t
@@ -1,5 +1,3 @@
- $ "$TESTDIR/hghave" execbit || exit 80
-
$ rm -rf a
$ hg init a
$ cd a
@@ -33,4 +31,3 @@ Validate update of standalone execute bit change:
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg st
- $ cd ..
diff --git a/tests/test-update-renames.t b/tests/test-update-renames.t
index 829317a..8008e4b 100644
--- a/tests/test-update-renames.t
+++ b/tests/test-update-renames.t
@@ -21,7 +21,10 @@ Update with local changes across a file rename
$ hg up
merging a and b to b
warning: conflicts during merge.
- merging b incomplete! (edit conflicts, then use 'hg resolve --mark')
+ merging b failed!
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges
[1]
+
+ $ cd ..
+
diff --git a/tests/test-update-reverse.t b/tests/test-update-reverse.t
index 4d1dd26..2aa997d 100644
--- a/tests/test-update-reverse.t
+++ b/tests/test-update-reverse.t
@@ -66,8 +66,8 @@
$ hg update --debug -C 1
resolving manifests
- overwrite: True, partial: False
- ancestor: 91ebc10ed028+, local: 91ebc10ed028+, remote: 71a760306caf
+ overwrite True partial False
+ ancestor 91ebc10ed028+ local 91ebc10ed028+ remote 71a760306caf
side2: other deleted -> r
side1: other deleted -> r
main: remote created -> g
diff --git a/tests/test-url-rev.t b/tests/test-url-rev.t
index 517b83b..f6b05c0 100644
--- a/tests/test-url-rev.t
+++ b/tests/test-url-rev.t
@@ -6,7 +6,6 @@ Test basic functionality of url#rev syntax
$ hg ci -qAm 'add a'
$ hg branch foo
marked working directory as branch foo
- (branches are permanent and global, did you want a bookmark?)
$ echo >> a
$ hg ci -m 'change a'
$ cd ..
@@ -42,7 +41,7 @@ Test basic functionality of url#rev syntax
$ cat clone/.hg/hgrc
[paths]
- default = $TESTTMP/repo#foo (glob)
+ default = $TESTTMP/repo#foo
Changing original repo:
@@ -103,6 +102,7 @@ Changing original repo:
$ cd clone
$ hg rollback
repository tip rolled back to revision 1 (undo push)
+ working directory now based on revision 1
$ hg -q incoming
2:faba9097cad4
@@ -147,6 +147,10 @@ No new revs, no update:
$ hg rollback
repository tip rolled back to revision 1 (undo pull)
+ working directory now based on revision 1
+
+ $ hg up -C 0
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg parents -q
0:1f0dee641bb7
@@ -201,10 +205,4 @@ Pull -u takes us back to branch foo:
date: Thu Jan 01 00:00:00 1970 +0000
summary: new head of branch foo
-Test handling of invalid urls
- $ hg id http://foo/?bar
- abort: unsupported URL component: "bar"
- [255]
-
- $ cd ..
diff --git a/tests/test-url.py b/tests/test-url.py
index 0cf2ad6..6abe553 100644
--- a/tests/test-url.py
+++ b/tests/test-url.py
@@ -1,4 +1,4 @@
-import os
+import sys
def check(a, b):
if a != b:
@@ -219,15 +219,7 @@ def test_url():
>>> u
<url scheme: 'file', path: 'f:oo/bar/baz'>
>>> str(u)
- 'file:///f:oo/bar/baz'
- >>> u.localpath()
- 'f:oo/bar/baz'
-
- >>> u = url('file://localhost/f:oo/bar/baz')
- >>> u
- <url scheme: 'file', host: 'localhost', path: 'f:oo/bar/baz'>
- >>> str(u)
- 'file://localhost/f:oo/bar/baz'
+ 'file:f%3Aoo/bar/baz'
>>> u.localpath()
'f:oo/bar/baz'
@@ -240,7 +232,4 @@ def test_url():
'foo/bar/baz'
"""
-if 'TERM' in os.environ:
- del os.environ['TERM']
-
doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)
diff --git a/tests/test-verify.t b/tests/test-verify.t
index 5f3d7a7..b900a5a 100644
--- a/tests/test-verify.t
+++ b/tests/test-verify.t
@@ -58,7 +58,6 @@ introduce some bugs in repo
(first damaged changeset appears to be 0)
[1]
- $ cd ../../..
$ cd ..
test revlog corruption
@@ -100,4 +99,3 @@ test revlog format 0
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
- $ cd ..
diff --git a/tests/test-walk.t b/tests/test-walk.t
index 52de65e..0829376 100644
--- a/tests/test-walk.t
+++ b/tests/test-walk.t
@@ -12,6 +12,7 @@
$ echo fennel > fennel
$ echo fenugreek > fenugreek
$ echo fiddlehead > fiddlehead
+ $ echo glob:glob > glob:glob
$ hg addremove
adding beans/black
adding beans/borlotti
@@ -22,10 +23,12 @@
adding fennel
adding fenugreek
adding fiddlehead
+ adding glob:glob
adding mammals/Procyonidae/cacomistle
adding mammals/Procyonidae/coatimundi
adding mammals/Procyonidae/raccoon
adding mammals/skunk
+ warning: filename contains ':', which is reserved on Windows: 'glob:glob'
$ hg commit -m "commit #0"
$ hg debugwalk
@@ -38,6 +41,7 @@
f fennel fennel
f fenugreek fenugreek
f fiddlehead fiddlehead
+ f glob:glob glob:glob
f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
@@ -52,6 +56,7 @@
f fennel fennel
f fenugreek fenugreek
f fiddlehead fiddlehead
+ f glob:glob glob:glob
f mammals/Procyonidae/cacomistle mammals/Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi mammals/Procyonidae/coatimundi
f mammals/Procyonidae/raccoon mammals/Procyonidae/raccoon
@@ -68,6 +73,7 @@
f fennel ../fennel
f fenugreek ../fenugreek
f fiddlehead ../fiddlehead
+ f glob:glob ../glob:glob
f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
f mammals/Procyonidae/raccoon Procyonidae/raccoon
@@ -76,6 +82,7 @@
f fennel ../fennel
f fenugreek ../fenugreek
f fiddlehead ../fiddlehead
+ f glob:glob ../glob:glob
f mammals/Procyonidae/cacomistle Procyonidae/cacomistle
f mammals/Procyonidae/coatimundi Procyonidae/coatimundi
f mammals/Procyonidae/raccoon Procyonidae/raccoon
@@ -105,7 +112,7 @@
f beans/navy ../beans/navy
f beans/pinto ../beans/pinto
f beans/turtle ../beans/turtle
- $ hg debugwalk -I 'relpath:detour/../../beans'
+ $ hg debugwalk -I 'relpath:../beans'
f beans/black ../beans/black
f beans/borlotti ../beans/borlotti
f beans/kidney ../beans/kidney
@@ -152,10 +159,10 @@
f mammals/Procyonidae/raccoon Procyonidae/raccoon
f mammals/skunk skunk
$ hg debugwalk .hg
- abort: path 'mammals/.hg' is inside nested repo 'mammals' (glob)
+ abort: path 'mammals/.hg' is inside nested repo 'mammals'
[255]
$ hg debugwalk ../.hg
- abort: path contains illegal component: .hg (glob)
+ abort: path contains illegal component: .hg
[255]
$ cd ..
@@ -187,16 +194,16 @@
abort: beans/../.. not under root
[255]
$ hg debugwalk .hg
- abort: path contains illegal component: .hg (glob)
+ abort: path contains illegal component: .hg
[255]
$ hg debugwalk beans/../.hg
- abort: path contains illegal component: .hg (glob)
+ abort: path contains illegal component: .hg
[255]
$ hg debugwalk beans/../.hg/data
- abort: path contains illegal component: .hg/data (glob)
+ abort: path contains illegal component: .hg/data
[255]
$ hg debugwalk beans/.hg
- abort: path 'beans/.hg' is inside nested repo 'beans' (glob)
+ abort: path 'beans/.hg' is inside nested repo 'beans'
[255]
Test absolute paths:
@@ -218,26 +225,7 @@ Test patterns:
f fennel fennel
f fenugreek fenugreek
f fiddlehead fiddlehead
-#if eol-in-paths
- $ echo glob:glob > glob:glob
- $ hg addremove
- adding glob:glob
- warning: filename contains ':', which is reserved on Windows: 'glob:glob'
- $ hg debugwalk glob:\*
- f fennel fennel
- f fenugreek fenugreek
- f fiddlehead fiddlehead
f glob:glob glob:glob
- $ hg debugwalk glob:glob
- glob: No such file or directory
- $ hg debugwalk glob:glob:glob
- f glob:glob glob:glob exact
- $ hg debugwalk path:glob:glob
- f glob:glob glob:glob exact
- $ rm glob:glob
- $ hg addremove
- removing glob:glob
-#endif
$ hg debugwalk 'glob:**e'
f beans/turtle beans/turtle
@@ -246,6 +234,7 @@ Test patterns:
$ hg debugwalk 're:.*[kb]$'
f beans/black beans/black
f fenugreek fenugreek
+ f glob:glob glob:glob
f mammals/skunk mammals/skunk
$ hg debugwalk path:beans/black
@@ -283,13 +272,11 @@ Test patterns:
f mammals/skunk mammals/skunk
$ hg debugwalk 'glob:j*'
$ hg debugwalk NOEXIST
- NOEXIST: * (glob)
+ NOEXIST: No such file or directory
-#if fifo
$ mkfifo fifo
$ hg debugwalk fifo
fifo: unsupported file type (type is fifo)
-#endif
$ rm fenugreek
$ hg debugwalk fenugreek
@@ -310,12 +297,12 @@ Test patterns:
Test listfile and listfile0
- $ python -c "file('listfile0', 'wb').write('fenugreek\0new\0')"
- $ hg debugwalk -I 'listfile0:listfile0'
+ $ python -c "file('../listfile0', 'wb').write('fenugreek\0new\0')"
+ $ hg debugwalk -I 'listfile0:../listfile0'
f fenugreek fenugreek
f new new
- $ python -c "file('listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
- $ hg debugwalk -I 'listfile:listfile'
+ $ python -c "file('../listfile', 'wb').write('fenugreek\nnew\r\nmammals/skunk\n')"
+ $ hg debugwalk -I 'listfile:../listfile'
f fenugreek fenugreek
f mammals/skunk mammals/skunk
f new new
@@ -329,5 +316,3 @@ Test listfile and listfile0
f mammals/skunk ../t/mammals/skunk exact
$ hg debugwalk --cwd ../t mammals/skunk
f mammals/skunk mammals/skunk exact
-
- $ cd ..
diff --git a/tests/test-walkrepo.py b/tests/test-walkrepo.py
index bbeebd4..0cb3501 100644
--- a/tests/test-walkrepo.py
+++ b/tests/test-walkrepo.py
@@ -1,12 +1,11 @@
import os
from mercurial import hg, ui
from mercurial.scmutil import walkrepos
-from mercurial.util import checklink
from os import mkdir, chdir
from os.path import join as pjoin
u = ui.ui()
-sym = checklink('.')
+sym = hasattr(os, 'symlink') and hasattr(os.path, 'samestat')
hg.repository(u, 'top1', create=1)
mkdir('subdir')
@@ -24,12 +23,10 @@ def runtest():
reposet = frozenset(walkrepos('.', followsym=True))
if sym and (len(reposet) != 3):
print "reposet = %r" % (reposet,)
- print ("Found %d repositories when I should have found 3"
- % (len(reposet),))
+ print "Found %d repositories when I should have found 3" % (len(reposet),)
if (not sym) and (len(reposet) != 2):
print "reposet = %r" % (reposet,)
- print ("Found %d repositories when I should have found 2"
- % (len(reposet),))
+ print "Found %d repositories when I should have found 2" % (len(reposet),)
sub1set = frozenset((pjoin('.', 'sub1'),
pjoin('.', 'circle', 'subdir', 'sub1')))
if len(sub1set & reposet) != 1:
@@ -43,7 +40,7 @@ def runtest():
print "reposet = %r" % (reposet,)
print "sub1set and reposet should have exactly one path in common."
sub3 = pjoin('.', 'circle', 'top1')
- if sym and sub3 not in reposet:
+ if sym and not (sub3 in reposet):
print "reposet = %r" % (reposet,)
print "Symbolic links are supported and %s is not in reposet" % (sub3,)
diff --git a/tests/test-win32text.t b/tests/test-win32text.t
index edbe842..386b6f3 100644
--- a/tests/test-win32text.t
+++ b/tests/test-win32text.t
@@ -16,14 +16,16 @@
[hooks]
pretxncommit.crlf = python:hgext.win32text.forbidcrlf
pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
-
+ $ echo
+
$ echo hello > f
$ hg add f
commit should succeed
$ hg ci -m 1
-
+ $ echo
+
$ hg clone . ../zoz
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -33,13 +35,14 @@ commit should succeed
commit should fail
$ hg ci -m 2.1
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in f583ea08d42a: f
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
[255]
-
+ $ echo
+
$ mv .hg/hgrc .hg/hgrc.bak
commits should succeed
@@ -47,6 +50,8 @@ commits should succeed
$ hg ci -m 2
$ hg cp f g
$ hg ci -m 2.2
+ $ echo
+
push should fail
@@ -57,7 +62,7 @@ push should fail
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in bc2d09796734: g
in b1aa5cde7ff4: f
@@ -79,7 +84,8 @@ push should fail
rollback completed
abort: pretxnchangegroup.crlf hook failed
[255]
-
+ $ echo
+
$ mv .hg/hgrc.bak .hg/hgrc
$ echo hello > f
$ hg rm g
@@ -87,6 +93,8 @@ push should fail
commit should succeed
$ hg ci -m 2.3
+ $ echo
+
push should succeed
@@ -97,6 +105,8 @@ push should succeed
adding manifests
adding file changes
added 3 changesets with 3 changes to 2 files
+ $ echo
+
and now for something completely different
@@ -105,19 +115,21 @@ and now for something completely different
$ python unix2dos.py d/f2
$ hg add d/f2
$ hg ci -m 3
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in 053ba1a3035a: d/f2
transaction abort!
rollback completed
abort: pretxncommit.crlf hook failed
[255]
$ hg revert -a
- forgetting d/f2 (glob)
+ forgetting d/f2
$ rm d/f2
-
+ $ echo
+
$ hg rem f
$ hg ci -m 4
-
+ $ echo
+
$ python -c 'file("bin", "wb").write("hello\x00\x0D\x0A")'
$ hg add bin
$ hg ci -m 5
@@ -171,16 +183,19 @@ and now for something completely different
1
+ $ echo
+
$ hg clone . dupe
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-
+ $ echo
+
$ for x in a b c d; do echo content > dupe/$x; done
$ hg -R dupe add
- adding dupe/a (glob)
- adding dupe/b (glob)
- adding dupe/c (glob)
- adding dupe/d (glob)
+ adding dupe/a
+ adding dupe/b
+ adding dupe/c
+ adding dupe/d
$ python unix2dos.py dupe/b dupe/c dupe/d
$ hg -R dupe ci -m a dupe/a
$ hg -R dupe ci -m b/c dupe/[bc]
@@ -259,6 +274,8 @@ and now for something completely different
1
+ $ echo
+
$ hg pull dupe
pulling from dupe
searching for changes
@@ -266,7 +283,7 @@ and now for something completely different
adding manifests
adding file changes
added 3 changesets with 4 changes to 4 files
- attempt to commit or push text file(s) using CRLF line endings
+ Attempt to commit or push text file(s) using CRLF line endings
in 67ac5962ab43: d
in 68c127d1834e: b
in 68c127d1834e: c
@@ -289,7 +306,8 @@ and now for something completely different
rollback completed
abort: pretxnchangegroup.crlf hook failed
[255]
-
+ $ echo
+
$ hg log -v
changeset: 5:f0b1c8d75fce
tag: tip
@@ -340,6 +358,8 @@ and now for something completely different
1
+ $ echo
+
$ rm .hg/hgrc
$ (echo some; echo text) > f3
$ python -c 'file("f4.bat", "wb").write("rem empty\x0D\x0A")'
@@ -352,7 +372,8 @@ and now for something completely different
text
$ cat f4.bat
rem empty\r (esc)
-
+ $ echo
+
$ echo '[extensions]' >> .hg/hgrc
$ echo 'win32text = ' >> .hg/hgrc
$ echo '[decode]' >> .hg/hgrc
@@ -385,7 +406,7 @@ Disable warning:
WARNING: f4.bat already has CRLF line endings
and does not need EOL conversion by the win32text plugin.
Before your next commit, please reconsider your encode/decode settings in
- Mercurial.ini or $TESTTMP/t/.hg/hgrc. (glob)
+ Mercurial.ini or $TESTTMP/t/.hg/hgrc.
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cat bin
hello\x00\r (esc)
@@ -394,7 +415,8 @@ Disable warning:
text\r (esc)
$ cat f4.bat
rem empty\r (esc)
-
+ $ echo
+
$ python -c 'file("f5.sh", "wb").write("# empty\x0D\x0A")'
$ hg add f5.sh
$ hg ci -m 7
@@ -422,5 +444,3 @@ Disable warning:
$ hg st -q
$ cat linefeed
% just linefeed\r (esc)
-
- $ cd ..
diff --git a/tests/test-wireproto.py b/tests/test-wireproto.py
index 82f7f0b..ab6db19 100644
--- a/tests/test-wireproto.py
+++ b/tests/test-wireproto.py
@@ -9,7 +9,7 @@ class proto(object):
names = spec.split()
return [args[n] for n in names]
-class clientpeer(wireproto.wirepeer):
+class clientrepo(wireproto.wirerepository):
def __init__(self, serverrepo):
self.serverrepo = serverrepo
def _call(self, cmd, **args):
@@ -36,7 +36,7 @@ def greet(repo, proto, name):
wireproto.commands['greet'] = (greet, 'name',)
srv = serverrepo()
-clt = clientpeer(srv)
+clt = clientrepo(srv)
print clt.greet("Foobar")
b = clt.batch()
diff --git a/tests/test-wireproto.t b/tests/test-wireproto.t
index c8a81ea..204ab49 100644
--- a/tests/test-wireproto.t
+++ b/tests/test-wireproto.t
@@ -1,4 +1,3 @@
- $ "$TESTDIR/hghave" serve || exit 80
Test wire protocol argument passing
diff --git a/tests/tinyproxy.py b/tests/tinyproxy.py
index 044eba2..88f5688 100755
--- a/tests/tinyproxy.py
+++ b/tests/tinyproxy.py
@@ -12,7 +12,7 @@ Any help will be greatly appreciated. SUZUKI Hisao
__version__ = "0.2.1"
-import BaseHTTPServer, select, socket, SocketServer, urlparse, os
+import BaseHTTPServer, select, socket, SocketServer, urlparse
class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
__base = BaseHTTPServer.BaseHTTPRequestHandler
@@ -23,8 +23,7 @@ class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
def handle(self):
(ip, port) = self.client_address
- allowed = getattr(self, 'allowed_clients', None)
- if allowed is not None and ip not in allowed:
+ if hasattr(self, 'allowed_clients') and ip not in self.allowed_clients:
self.raw_requestline = self.rfile.readline()
if self.parse_request():
self.send_error(403)
@@ -47,7 +46,7 @@ class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
try: soc.connect(host_port)
except socket.error, arg:
try: msg = arg[1]
- except (IndexError, TypeError): msg = arg
+ except: msg = arg
self.send_error(404, msg)
return 0
return 1
@@ -122,12 +121,7 @@ class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
do_DELETE = do_GET
class ThreadingHTTPServer (SocketServer.ThreadingMixIn,
- BaseHTTPServer.HTTPServer):
- def __init__(self, *args, **kwargs):
- BaseHTTPServer.HTTPServer.__init__(self, *args, **kwargs)
- a = open("proxy.pid", "w")
- a.write(str(os.getpid()) + "\n")
- a.close()
+ BaseHTTPServer.HTTPServer): pass
if __name__ == '__main__':
from sys import argv