diff --git a/tests/test-help b/tests/test-help --- a/tests/test-help +++ b/tests/test-help @@ -6,4 +6,6 @@ hg help hg add -h hg help diff hg help foo +hg commands +exit 0 \ No newline at end of file diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -43,3 +43,36 @@ hg diff [-r A] [-r B] [files] diff working directory (or selected files) + hg help foo hg: unknown command foo ++ hg commands +hg: unknown command 'commands' +hg commands: + + add add the specified files on the next commit + addremove add all new files, delete all missing files + annotate show changeset information per file line + cat output the latest or given revision of a file + commit commit the specified files or all outstanding changes + diff diff working directory (or selected files) + export dump the changeset header and diffs for a revision + forget don't add the specified files on the next commit + heads show current repository heads + help show help for a given command or all commands + history show the changelog history + init create a new repository or copy an existing one + log show the revision history of a single file + manifest output the latest or given revision of the project manifest + parents show the parents of the current working dir + patch import an ordered set of patches + pull pull changes from the specified source + push push changes to the specified destination + rawcommit raw commit interface + recover roll back an interrupted transaction + remove remove the specified files on the next commit + serve export the repository via HTTP + status show changed files in the working directory + tags list repository tags + tip show the tip revision + undo undo the last transaction + update update or merge working directory + verify verify the integrity of the repository ++ exit 0 diff --git a/tests/test-pull b/tests/test-pull new file mode 100755 --- /dev/null +++ b/tests/test-pull @@ -0,0 +1,24 @@ +#!/bin/bash + +set -e + +mkdir test +cd test +echo foo>foo +hg init +hg addremove +hg commit -t "1" +hg verify +hg serve 2>/dev/null & +C=$! +cd .. + +mkdir copy +cd copy +hg init http://localhost:8000/ +hg verify +hg co +cat foo +hg manifest + +kill $C diff --git a/tests/test-pull.out b/tests/test-pull.out new file mode 100644 --- /dev/null +++ b/tests/test-pull.out @@ -0,0 +1,18 @@ +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +1 files, 1 changesets, 1 total revisions +requesting all changes +adding changesets +adding manifests +adding file revisions +modified 1 files, added 1 changesets and 1 new revisions +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +1 files, 1 changesets, 1 total revisions +foo +2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo +killed! diff --git a/tests/test-undo b/tests/test-undo new file mode 100755 --- /dev/null +++ b/tests/test-undo @@ -0,0 +1,16 @@ +#!/bin/bash + +set -x +mkdir t +cd t +hg init +echo a > a +hg add a +hg commit -t "test" -u test -d "0 0" +hg verify +hg parents +hg status +hg undo +hg verify +hg parents +hg status diff --git a/tests/test-undo.out b/tests/test-undo.out new file mode 100644 --- /dev/null +++ b/tests/test-undo.out @@ -0,0 +1,30 @@ ++ mkdir t ++ cd t ++ hg init ++ echo a ++ hg add a ++ hg commit -t test -u test -d '0 0' ++ hg verify +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +1 files, 1 changesets, 1 total revisions ++ hg parents +changeset: 0:acb14030fe0a21b60322c440ad2d20cf7685a376 +user: test +date: Wed Dec 31 16:00:00 1969 +summary: test + ++ hg status ++ hg undo +attempting to rollback last transaction ++ hg verify +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +0 files, 0 changesets, 0 total revisions ++ hg parents ++ hg status +A a