##// END OF EJS Templates
Make log --follow revision range start default to working dir parent.
Brendan Cully -
r2783:2e0cd25f default
parent child Browse files
Show More
@@ -130,7 +130,17 b' def walkchangerevs(ui, repo, pats, opts)'
130 if repo.changelog.count() == 0:
130 if repo.changelog.count() == 0:
131 return [], False, matchfn
131 return [], False, matchfn
132
132
133 revs = map(int, revrange(ui, repo, opts['rev'] or ['tip:0']))
133 if follow:
134 p = repo.dirstate.parents()[0]
135 if p == nullid:
136 ui.warn(_('No working directory revision; defaulting to tip\n'))
137 start = 'tip'
138 else:
139 start = repo.changelog.rev(p)
140 defrange = '%s:0' % start
141 else:
142 defrange = 'tip:0'
143 revs = map(int, revrange(ui, repo, opts['rev'] or [defrange]))
134 wanted = {}
144 wanted = {}
135 slowpath = anypats
145 slowpath = anypats
136 fncache = {}
146 fncache = {}
@@ -2017,6 +2027,10 b' def log(ui, repo, *pats, **opts):'
2017 renames and copies. --follow without a file name will only show
2027 renames and copies. --follow without a file name will only show
2018 ancestors or descendants of the starting revision.
2028 ancestors or descendants of the starting revision.
2019
2029
2030 If no revision range is specified, the default is tip:0 unless
2031 --follow is set, in which case the working directory parent is
2032 used as the starting revision.
2033
2020 By default this command outputs: changeset id and hash, tags,
2034 By default this command outputs: changeset id and hash, tags,
2021 non-trivial parents, user, date and time, and a summary for each
2035 non-trivial parents, user, date and time, and a summary for each
2022 commit. When the -v/--verbose switch is used, the list of changed
2036 commit. When the -v/--verbose switch is used, the list of changed
General Comments 0
You need to be logged in to leave comments. Login now