bugmonotone - Bugs: bug #12043, function to calculate changeset...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #12043: function to calculate changeset between arbitrary revisions

Submitted by:  Nathaniel Smith <njs>
Submitted on:  Sun 20 Feb 2005 05:46:19 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: code cleanupStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed
mtn version --full: 

Wed 26 Apr 2006 12:05:18 AM UTC, comment #2:

Invalidated by the rosters rewrite.

Timothy Brownawell <tbrownaw>
Project Member
Sun 20 Feb 2005 05:48:57 AM UTC, comment #1:

Oh, "update" is another command that should use this.

Nathaniel Smith <njs>
Project Member
Sun 20 Feb 2005 05:46:19 AM UTC, original submission:

Right now, there are a pile of different commands that calculate the changeset between two arbitrary revisions -- diff, explicit_merge, etc. They do this by cut-and-paste of code. It's very silly. Refactor all this out into a single function that does this.

This will make implementing "cherrypick"/"cherrypatch" trivial.

The algorithm is basically, calculate a common (preferably the least) ancestor between the two revisions. Calculate changesets from that ancestor down to each revision by concatenation. Reverse one of the changesets and concatenate it with the other.

There isn't really any need to have special cases, like for when one revision is actually an ancestor of the other; the path traversed via the LCA will never be more than twice as long as the optimal path.

We do want to only use common ancestors -- while in principle, given a graph like A -> C, B -> C, it would be possible to calculate a changeset from A to B via C, it is a bad idea. When dealing with A and B, we can trust ancestors, that's implicit in A and B's immutable chained-sha1 reference to their full history; but who knows what kind of mess someone might have made of any given descendent.

Nathaniel Smith <njs>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 26 Apr 2006 12:05:18 AM UTCtbrownawStatusNone=>Invalid
  Open/ClosedOpen=>Closed
Sun 20 Feb 2005 05:47:48 AM UTCnjsDependencies-=>bugs #5677 is dependent

Back to the top


Powered by Savane 3.1-cleanup1