##// END OF EJS Templates
On Sat, Jul 02, 2005 at 02:11:34PM -0700, Matt Mackall wrote:...
Alecs King -
r612:9cd74543 default
parent child Browse files
Show More
@@ -183,7 +183,7 b' import [-p <n> -b <base> -q] <patches>::'
183 init::
183 init::
184 Initialize a new repository in the current directory.
184 Initialize a new repository in the current directory.
185
185
186 log [-r revision ...] [file]::
186 log [-r revision ...] [-p] [file]::
187 Print the revision history of the specified file or the entire project.
187 Print the revision history of the specified file or the entire project.
188
188
189 By default this command outputs: changeset id and hash, tags,
189 By default this command outputs: changeset id and hash, tags,
@@ -191,10 +191,13 b' log [-r revision ...] [file]::'
191 -v switch adds some more detail, such as changed files, manifest
191 -v switch adds some more detail, such as changed files, manifest
192 hashes or message signatures.
192 hashes or message signatures.
193
193
194 When a revision argument is given, only this file or changelog revision
194 options:
195 is displayed. With two revision arguments all revisions in this range
195 -r, --rev <A>, ... When a revision argument is given, only this file or
196 are listed. Additional revision arguments may be given repeating the above
196 changelog revision is displayed. With two revision
197 cycle.
197 arguments all revisions in this range are listed.
198 Additional revision arguments may be given repeating
199 the above cycle.
200 -p, --patch show patch
198
201
199 aliases: history
202 aliases: history
200
203
@@ -635,10 +635,12 b' def init(ui, source=None):'
635 def log(ui, repo, f=None, **opts):
635 def log(ui, repo, f=None, **opts):
636 """show the revision history of the repository or a single file"""
636 """show the revision history of the repository or a single file"""
637 if f:
637 if f:
638 filelog = repo.file(relpath(repo, [f])[0])
638 files = relpath(repo, [f])
639 filelog = repo.file(files[0])
639 log = filelog
640 log = filelog
640 lookup = filelog.lookup
641 lookup = filelog.lookup
641 else:
642 else:
643 files = None
642 filelog = None
644 filelog = None
643 log = repo.changelog
645 log = repo.changelog
644 lookup = repo.lookup
646 lookup = repo.lookup
@@ -655,6 +657,15 b' def log(ui, repo, f=None, **opts):'
655
657
656 for i in revlist or range(log.count() - 1, -1, -1):
658 for i in revlist or range(log.count() - 1, -1, -1):
657 show_changeset(ui, repo, filelog=filelog, rev=i)
659 show_changeset(ui, repo, filelog=filelog, rev=i)
660 if opts['patch']:
661 if filelog:
662 filenode = filelog.node(i)
663 i = filelog.linkrev(filenode)
664 changenode = repo.changelog.node(i)
665 prev, other = repo.changelog.parents(changenode)
666 dodiff(sys.stdout, ui, repo, files, prev, changenode)
667 ui.write("\n")
668 ui.write("\n")
658
669
659 def manifest(ui, repo, rev = []):
670 def manifest(ui, repo, rev = []):
660 """output the latest or given revision of the project manifest"""
671 """output the latest or given revision of the project manifest"""
@@ -977,8 +988,9 b' table = {'
977 "hg import [options] <patches>"),
988 "hg import [options] <patches>"),
978 "^init": (init, [], 'hg init'),
989 "^init": (init, [], 'hg init'),
979 "^log|history": (log,
990 "^log|history": (log,
980 [('r', 'rev', [], 'revision')],
991 [('r', 'rev', [], 'revision'),
981 'hg log [-r A] [-r B] [file]'),
992 ('p', 'patch', None, 'show patch')],
993 'hg log [-r A] [-r B] [-p] [file]'),
982 "manifest": (manifest, [], 'hg manifest [rev]'),
994 "manifest": (manifest, [], 'hg manifest [rev]'),
983 "parents": (parents, [], 'hg parents [node]'),
995 "parents": (parents, [], 'hg parents [node]'),
984 "^pull": (pull,
996 "^pull": (pull,
General Comments 0
You need to be logged in to leave comments. Login now