[Request] [+ ] D9555: docs: prefer `hg diff --from/--to` over `-r`
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Thu Dec 10 03:10:40 UTC 2020
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
This patch includes updating away from the broken `hg diff -r
'date(...)'` (see not in previous patch).
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D9555
AFFECTED FILES
mercurial/commands.py
CHANGE DETAILS
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2509,11 +2509,11 @@
- compare two historical versions of a directory, with rename info::
- hg diff --git -r 1.0:1.2 lib/
+ hg diff --git --from 1.0 --to 1.2 lib/
- get change stats relative to the last change on some date::
- hg diff --stat -r "date('may 2')"
+ hg diff --stat --from "date('may 2')"
- diff all newly-added files that contain a keyword::
@@ -2521,9 +2521,9 @@
- compare a revision and its parents::
- hg diff -c 9353 # compare against first parent
- hg diff -r 9353^:9353 # same using revset syntax
- hg diff -r 9353^2:9353 # compare against the second parent
+ hg diff -c 9353 # compare against first parent
+ hg diff --from 9353 --to 9353 # same using revset syntax
+ hg diff --from 9353^2 --to 9353 # compare against the second parent
Returns 0 on success.
"""
@@ -2962,7 +2962,7 @@
is thus pretty much the same as::
- hg diff -r 234 -r 345 | hg import
+ hg diff --from 234 --to 345 | hg import
but using merge to resolve conflicts and track moved files.
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20201210/caaae3d8/attachment.html>
More information about the Mercurial-patches
mailing list