copy commits from a different location
Use Sapling's merge logic to copy individual commits from other locations without making merge commits. This is sometimes known as 'backporting' or 'cherry-picking'. By default, graft will also copy user and description from the source commits. If you want to keep the date of the source commits, you can add below config to your configuration file:
graftkeepdate = True
Source commits will be skipped if they are ancestors of the current commit, have already been grafted, or are merges.
--log is specified, commit messages will have a comment appended
of the form:
(grafted from COMMITHASH)
--force is specified, commits will be grafted even if they
are already ancestors of, or have been grafted to, the destination.
This is useful when the commits have since been backed out.
If a graft results in conflicts, the graft process is interrupted
so that the current merge can be manually resolved. Once all
conflicts are resolved, the graft process can be continued with
-c/--continue operation does not remember options from
the original invocation, except for
- copy a single change to the stable branch and edit its description:
sl goto stable
sl graft --edit ba7e89595
- graft a range of changesets with one exception, updating dates:
sl graft -D "0e13e529c::224010e02 and not 85c0535a4"
- continue a graft after resolving conflicts:
sl graft -c
- abort an interrupted graft:
sl graft --abort
- show the source of a grafted changeset:
sl log --debug -r .
sl help revisions for more about specifying revisions.
Returns 0 on success.
|revisions to graft|
|resume interrupted graft|
|abort an interrupted graft|
|invoke editor on commit messages|
|append graft info to log message|
|record the current date as commit date|
|record the current user as committer|
|record the specified date as commit date|
|record the specified user as committer|
|specify merge tool|
|do not perform actions, just print output|