From 65f8272013ba25e86d22c561071ca70893013d0c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 16 Nov 2014 08:32:27 -0500 Subject: [PATCH] Revert "src ls removed, it's redundant with src status -a." --- src | 16 ++++++++++++++++ src.asc | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src b/src index 28812d2..3cb6b11 100755 --- a/src +++ b/src @@ -394,6 +394,9 @@ src diff ['revision-range'] ['file'...] diffs the working copy against that stored revision; with a range, diff between the beginning and end of the range. +src ls + List all registered files. + src move 'old' 'new' Rename a workfile and its history. Refuses to step on existing workfiles or histories. 'mv' and 'rename' are synonyms. @@ -1257,6 +1260,18 @@ def release_method(*args): with backend.lifter(arg): backend.release(arg) +def ls_method(*args): + "List registered files." + if args: + croak("ls cannot accept arguments") + try: + masters = os.listdir(repodir) + except OSError: + croak("repo directory %s does not exist" % repodir) + masters.sort() + for master in masters: + sys.stdout.write(backend.workfile(master) + "\n") + def fast_export_method(*args): "Dump revision content to standard output." ctx = CommandContext("fast-export", args) @@ -1357,6 +1372,7 @@ dispatch = { "di": diff_method, "tag": tag_method, "branch": branch_method, + "ls": ls_method, "move": move_method, "mv": move_method, "rename": move_method, diff --git a/src.asc b/src.asc index 6f2f0c6..6d2d6e8 100644 --- a/src.asc +++ b/src.asc @@ -103,7 +103,10 @@ src diff ['revision-range'] ['file'...]:: diff between the beginning and end of the range. "di" is a synonym for "diff". -src move 'old' 'new':: +src ls:: + List all registered files. + +src rename 'old' 'new':: Rename a workfile and its history. Refuses to step on existing workfiles or histories. 'mv' and 'rename' are synonyms. -- 2.43.0