From d899b1402aff93b4af501b8dc7250af6ffafb001 Mon Sep 17 00:00:00 2001 From: Micha Schmierer <17273004+mr-scrawley@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:08:24 +0200 Subject: [PATCH 1/2] stop ignoring defcomp transaction types This ensures that elements excluded from a stream via `accurev excl` will also be excluded in git starting from the associated commit. --- ac2git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ac2git.py b/ac2git.py index 7657f3a..717272a 100755 --- a/ac2git.py +++ b/ac2git.py @@ -36,7 +36,7 @@ logger = None -ignored_transaction_types = [ "archive", "compress", "defcomp", "dispatch", "unarchive" ] +ignored_transaction_types = [ "archive", "compress", "dispatch", "unarchive" ] # Taken from this StackOverflow answer: http://stackoverflow.com/a/19238551 # Compulsary quote: https://twitter.com/codinghorror/status/712467615780708352 From 526f8d9b701b57136cc4fe61b30831ff3340afd2 Mon Sep 17 00:00:00 2001 From: Micha Schmierer <17273004+mr-scrawley@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:13:36 +0200 Subject: [PATCH 2/2] include pass-through streams during deep-hist Pass-through streams may contain transactions relevant for the source code, e.g. if `accurev excl` is used on such a stream. --- accurev.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/accurev.py b/accurev.py index 837157f..645f64c 100755 --- a/accurev.py +++ b/accurev.py @@ -2622,20 +2622,6 @@ def deep_hist(depot=None, stream=None, timeSpec='now', ignoreTimelocks=False, us else: ts.start = mkstreamTr.id - # Special case: Accurev pass-through stream - # ----------------------------------------- - # Here we will only restrict the timeSpec to be after the pass-through stream was created and return the history of the parent - # stream instead with an early return. - if streamInfo.Type == "passthrough": - if streamInfo.basisStreamNumber is None: - return [] - - rv = ext.deep_hist(depot=depot, stream=streamInfo.basis, timeSpec=ts, ignoreTimelocks=ignoreTimelocks, useCache=useCache) - if not isAsc: - rv.reverse() - - return rv - #print('{0}:{1}'.format(stream, ts)) # debug info # Perform deep-hist algorithm