Opened 19 years ago
Last modified 10 years ago
#3236 new enhancement
Support for a merge change type in version control API
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | version control | Version: | devel |
Severity: | normal | Keywords: | merge |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Trac currently supports add, edit, delete, copy and move change types for files in a changeset. However, it would also be nice if Trac supported some of the merge change type for changes that involve merging changes from other files.
I realise that Subversion doesn't currently implement merge tracking natively (yet), but I have been working on a Perforce plugin for Trac (similar to the one described in #257 but based on PyPerforce) and would like to be able to get Perforce's merge/integration information displayed through Trac.
Perforce supports a number of different merge/integration types:
- branch from - An exact copy of a file to a new location. Equivalent to Trac's copy or move depending on whether the source file was also deleted in the same changeset.
- add from - A copy of a file to a new location that has been modified before checkin (related to #3172).
- copy from - A merge operation that ignores any changes in the target file, effectively replacing the target with the source.
- ignore from - A merge operation that ignores any changes in the source file, keeping the target file's changes.
- merge from - A merge operation that merges the changes from both source and target files.
- edit from - A merge operation that merges the changes from both source and target files and contains original user edits.
- delete from - A merge of a deleted source file into the target file, deleting the target file. Basically a delete operation with an associated source file.
See the p4 integrated documentation for more info on the Perforce integration model.
Attachments (0)
Change History (9)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Milestone: | → 0.11 |
---|---|
Owner: | changed from | to
While the Changeset.MERGE type is probably a good idea, the rest seems too specific to Perforce to be worth adding in the generic interface as such.
Probably a better way would be a possibility to extend the file information (that would be also interesting for systems supporting file specific comment).
Btw, perhaps you could already do that by using the properties API, and generate a special integrated property?
comment:3 by , 18 years ago
I think that in order to support a Changeset.MERGE
type you need to be able to specify a list of node revision ranges that were merged as part of the change. Whether this is part of the Changeset.get_changes()
or Node.get_history()
APIs or as a Changeset
or Node
property is an implementation detail, I guess.
However, it would be best if there was a well-known place to retrieve this info so that the web_ui
module is able to display this information in similar way to the copied from <path> information in the changeset and log views.
comment:4 by , 18 years ago
Milestone: | 0.11 → 0.12 |
---|
Not for 0.11, but a hot topic for 0.12 and the many vc improvements that will happen there ;-)
comment:5 by , 15 years ago
Keywords: | merge added |
---|---|
Milestone: | next-major-0.1X → 0.13 |
Goes together with #1492.
comment:6 by , 14 years ago
Milestone: | 0.13 → next-major-0.1X |
---|---|
Resolution: | → worksforme |
Status: | new → closed |
comment:7 by , 14 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
I assume closing wasn't intentional?
comment:8 by , 14 years ago
Right, this ticket should be used for extending the changeset rendering to display 3-way diffs.
comment:9 by , 10 years ago
Owner: | removed |
---|---|
Status: | reopened → new |
This could be implemented by adding a new merge type to the
Changeset
class at source:trunk/trac/versioncontrol/api.py@3294#L306 and modifying theChangeset.get_changes()
method to yield(path, kind, change, integrations)
tuples whereintegrations
is a list of(base_path, base_rev, merge_type)
tuples andmerge_type
is one of copy, ignore, merge, edit or delete.