Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with blackbox extension #14

Closed
ajansveld opened this issue Jun 12, 2017 · 8 comments
Closed

Conflict with blackbox extension #14

ajansveld opened this issue Jun 12, 2017 · 8 comments
Assignees

Comments

@ajansveld
Copy link

Turning on the Mercurial blackbox logging extension causes vscode to run its hg status* commands in a tight loop, noticeable by the flashing blue badge on the Source Control icon in the Activity Bar.

The extension writes its log files in the repo's .hg folder, perhaps that triggers this behavior?

*
hg status -C
hg cat <filename> (multiple times)
hg summary -q
hg bookmarks

@ajansveld
Copy link
Author

This doesn't seem to be resolved completely, there are still multiple hg cat calls when the blackbox extension is enabled. Not sure if you saw my comment here.

@mrcrowl mrcrowl self-assigned this Jun 28, 2017
@mrcrowl
Copy link
Owner

mrcrowl commented Jun 28, 2017

@ajansveld can you provide me with a small repro? I've tried enabling blackbox and can't see the behaviour you're describing.

@mrcrowl mrcrowl reopened this Jun 28, 2017
@ajansveld
Copy link
Author

Sure:

  • Enable the blackbox extension through the TortoiseHg UI or by setting this in your .hgrc or Mercurial.ini:
[extensions]
blackbox = 
  • Open vscode in a local clone, e.g. code C:\temp\test\sandbox\local\
  • Open a file in that repo, e.g. abd.txt
  • Run the Hg: Show hg output command from the Command Palette
  • See the "hg cat abcd.txt" commands scroll by

Closing the file tab will stop the hg cat commands.

Hope this helps,
Arnoud

@ajansveld
Copy link
Author

I think this is caused by the blackbox extension creation log files with multiple extensions, e.g.

.hg\.blackbox.log-ji0kbu
.hg\.blackbox.log-ji7eat
.hg\.blackbox.log-msyu4j
.hg\.blackbox.log-wbymm5
.hg\blackbox.log

Suggestion for a fix: change (in src/model.ts)

const isRelevant = !/[\\\/]\.hg[\\\/](\w?lock.*|.*\.log)$/.test(uri.fsPath);

to:

const isRelevant = !/[\\\/]\.hg[\\\/](\w?lock.*|.*\.log(-\w+)?)$/.test(uri.fsPath);

Thanks!

@mrcrowl
Copy link
Owner

mrcrowl commented Jul 30, 2017

@ajansveld Thanks for investigating further. Could you try installing this version manually?

mrcrowl pushed a commit that referenced this issue Jul 30, 2017
@mrcrowl mrcrowl closed this as completed Jul 30, 2017
@ajansveld
Copy link
Author

Bummer, 1.1.5 still exhibits the issue. Procmon shows that the blackbox extension writes two more temporary files to .hg (sorry, should have checked this before):

.hg\blackbox.log.hgtmp1
.hg\blackbox.log.hgtmp2

These are not excluded by the suggested code, can you change it to const isRelevant = !/[\\\/]\.hg[\\\/](\w?lock.*|.*\.log([-\.]\w+)?)$/.test(uri.fsPath);?

mrcrowl pushed a commit that referenced this issue Aug 1, 2017
@mrcrowl
Copy link
Owner

mrcrowl commented Aug 1, 2017

Bugger! Try this one instead.

@mrcrowl mrcrowl reopened this Aug 1, 2017
@ajansveld
Copy link
Author

Winner! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants