Show More
@@ -394,6 +394,24 def filelog(repo, subset, x): | |||||
394 | return [r for r in subset if r in s] |
|
394 | return [r for r in subset if r in s] | |
395 |
|
395 | |||
396 | def follow(repo, subset, x): |
|
396 | def follow(repo, subset, x): | |
|
397 | """``follow([file])`` | |||
|
398 | An alias for ``::.`` (ancestors of the working copy's first parent). | |||
|
399 | If a filename is specified, the history of the given file is followed, | |||
|
400 | including copies. | |||
|
401 | """ | |||
|
402 | # i18n: "follow" is a keyword | |||
|
403 | l = getargs(x, 0, 1, _("follow takes no arguments or a filename")) | |||
|
404 | p = repo['.'].rev() | |||
|
405 | if l: | |||
|
406 | x = getstring(l[0], "follow expected a filename") | |||
|
407 | s = set(ctx.rev() for ctx in repo['.'][x].ancestors()) | |||
|
408 | else: | |||
|
409 | s = set(repo.changelog.ancestors(p)) | |||
|
410 | ||||
|
411 | s |= set([p]) | |||
|
412 | return [r for r in subset if r in s] | |||
|
413 | ||||
|
414 | def followfile(repo, subset, f): | |||
397 | """``follow()`` |
|
415 | """``follow()`` | |
398 | An alias for ``::.`` (ancestors of the working copy's first parent). |
|
416 | An alias for ``::.`` (ancestors of the working copy's first parent). | |
399 | """ |
|
417 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now