From: Pete Wyckoff <hidden> Date: 2016-06-15 22:46:03
When a particular changeset affects multiple depot paths, it
will appear multiple times in the output of "p4 changes".
Filter out the duplicates to avoid the extra empty commits that
this would otherwise create.
Signed-off-by: Pete Wyckoff <redacted>
---
contrib/fast-import/git-p4 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
From: Simon Hausmann <hidden> Date: 2016-06-15 22:46:06
On Wednesday 28 January 2009 Pete Wyckoff, wrote:
quoted hunk
When a particular changeset affects multiple depot paths, it
will appear multiple times in the output of "p4 changes".
Filter out the duplicates to avoid the extra empty commits that
this would otherwise create.
Signed-off-by: Pete Wyckoff <redacted>
---
contrib/fast-import/git-p4 | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
@@ -444,8 +444,9 @@ def p4ChangesForPaths(depotPaths, changeRange): changes = [] for line in output:- changeNum = line.split(" ")[1]- changes.append(int(changeNum))+ changeNum = int(line.split(" ")[1])+ if changeNum not in changes:+ changes.append(changeNum)
Hmm, isn't this a potentially quadratic operation?
I agree about the problem in general though.
Simon
From: Pete Wyckoff <hidden> Date: 2016-06-15 22:46:14
When a particular changeset affects multiple depot paths, it
will appear multiple times in the output of "p4 changes".
Filter out the duplicates to avoid the extra empty commits that
this otherwise would create.
Signed-off-by: Pete Wyckoff <redacted>
---
Switched to a dictionary to avoid the quadratic behavior,
as pointed out by Simon.
contrib/fast-import/git-p4 | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
From: Simon Hausmann <hidden> Date: 2016-06-15 22:46:16
On Wednesday 18 February 2009 Pete Wyckoff, wrote:
When a particular changeset affects multiple depot paths, it
will appear multiple times in the output of "p4 changes".
Filter out the duplicates to avoid the extra empty commits that
this otherwise would create.
Signed-off-by: Pete Wyckoff <redacted>
Acked-by: Simon Hausmann <redacted>
Nice patch, thanks :)
Simon
quoted hunk
Switched to a dictionary to avoid the quadratic behavior,
as pointed out by Simon.
contrib/fast-import/git-p4 | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)