How to display a cli mercurial opération using zenity - bash

I'm trying to display the advancement of a mercurial pull using zenity.
The command I want to display is the following hg pull -ufb develop, using zenity --no-cancel --progress --auto-close --auto-kill --title="Mercurial"
Thank for your help.
Edit 1 :
Here is a sample of an hg pull :
searching for changes
adding changesets
adding manifests
adding file changes
files [============> ] 3281/13321 23s
I would like to display the number of object already downloaded (here, 3281) / objects to download (here, 13321), and the estimated time to completion (here, 23s), with the progress bar following the amount of object already downloaded (3281/13321*100).
The objective is to build an auto-updater for a small game project, in order to make the game automatically download the latest ressources from our mercurial repository (and showing a nice little gtk window instead of an ugly bash window).

Related

XCTest & GPX Files: Can Location Updates Be Started Automatically?

I have added a gpx file to my project; its name is TrailOfHistory.gpx. I have edited my project's scheme so that this file will be used by Xcode 9 to perform locations updates.
Here are screen shots of the scheme's Run and Test configurations wherein I have designated that the gpx file should be used:
When I run my application, user location updates (as given by the gpx file) begin automatically. I can watch this happening on my application's MKMapView.
In contrast, when I run one of my unit tests, user location updates do not begin automatically. I must instead perform the manual step of clicking the debug toolbar's Simulate Location button and choosing the gpx file; as shown in the following screen shot:
My ultimate goal is to arrive at a set of tests that can be executed by a continuous integration system. So, clicking on Xcode buttons is not going to fly.
Can anyone provide insight on this? In particular, can anyone say that he/she has had the experience of creating an XCTest wherein location updates began automatically (if so then I'll proceed with hope; currently I am unclear what expectations I should have)?
Note: I found this very similar question, over a year old. Hopefully I can generate some renewed interest.
I have managed to get this working using the following approach;
Go to the relevant scheme and select 'Edit Scheme...'
Select the 'Tests' for that scheme on the left hand side, and then click the 'Options' button for the UnitTest target.
Set the 'Location' variable to your GPX trail.
These steps are allowing me to test my CoreLocation functions as expected.
I feel like these options may have not been available when this question was written, but just incase this helps people with this issue going forwards I thought I would answer here.

Tortoise SVN Log messages does not update

SVN repository keeps the log messages as properties attached to each revision. these properties are kept in db/revprops folder of repository with same numbering as revision. I needed to change format of the log messages and include some extra information. Format of the prop files (at least for version 7 uncompressed) is just key value in text format. I wrote a small program to do this and successfully edited the log messages.
Running SVN Log verifies the command line and shows updated log messages
Problem
Opening TortoiseSVN in dev computers does not show the updated messages in list; however if developer right click on the revision item in list and select Edit log message the edited message will show up. Even checkout of whole repository to new folder still shows the old message.
Question
Above observation makes me believe that TortoiseSVN somehow caches the log messages in client computers. Where is this information stored?
Yes, TortoiseSVN caches the log messages and changed paths. You should be able to clear the cache via TortoiseSVN Settings | Log Caching | Cached Repositories.
Read TortoiseSVN Manual | Log Caching & Cached Repositories for further information.
NOTE: Log caching is a very helpful feature. Don't disable it and be careful when you enter log messages.
On the SVN setting go to log caching, and under tab 'global setting' untick the checkbox 'enable log caching'.
click 'ok' .
it shall solve your problem

Does Angular CLI prevent timestamp update for *.TS files?

After setting up an Angular 2 program using Angular CLI (following the procedure at https://angular.io/guide/quickstart) and using VS Code (https://code.visualstudio.com/) to work with the files I've noticed that the file timestamps for *.TS files do not get updated. Testing on Windows 10, the problem occurs even if I make a change to a TS file with Notepad and do so immediately after reboot. However, if I copy the TS files to another folder, they show updated timestamps.
When opening other folders, there is an instant display of files, but when opening the app folders with the TS files, there is a delay of several seconds, with a message "Working on it..."
The TS files had been associated with a video processing program ("transport stream" file), but I shifted the association to VS Code, but that didn't fix the problem.
I opened a bug report at https://github.com/Microsoft/vscode/issues/25569 but the VS Code folks could not reproduce the problem, suggesting that it is not seen for many VS Code users. That report is now is some sort of limbo in which it is listed as closed but one can still comment.
So I'm wondering whether the Angular CLI environment prevents timestamp update for the TS files.
Any suggestions on how to get the TS files in an Angular 2 project to show the current timestamp?
Addendum: the problem is not just for ts files. It extends to css files as well, as illustrated in this image in which the file system lists 19 April as the file date for styles.css, but the ToolTip for the file gives the more recent (correct) date:
Clearly some part of this environment is overruling one of 2 displays of the file date.
The problem is not the timestamp; it is the column displayed in Windows Explorer. Instead of the usual "Date Modified" column, "Date" was displayed. I don't think problem is caused by Angular CLI or VSCode. It looks like it is created by the video processing program ("transport stream") file type assignment; removing that file association and assigning *.ts to VSCode prevents the problem from occurring. However, this doesn't fix instances in which it occurred already; here is how to fix those:
In Windows Explorer click View on the menu, then "Add Columns". Uncheck "Date" and check "Date Modified". You may want to remove "Length" as well.

Test in cloud button has gone

I made a 'Xamarin UI Test' Project to test my app.
I was able to click in the button like this: Run in Test Cloud button.
But now i made my test using the Repl() and want to run it in the cloud the button has gone away.
What i have to do to fix it?
Cause of the Issue
It looks like you are hitting this bug: Bug 52372 - "Run in Test Cloud" option no longer appears in menu on C9
That issue is reported on this version for Xamarin 4.3.0.636. Note that it may happen in other versions but this is the initial version the bug was reported against. You can track the status of that issue either directly in the report on Xamarin's bugzilla, and/or you can watch for a release announcement on the Xamarin Releases Blog.
Workarounds
Downgrading Xamarin
While waiting for a fix to become available, you can downgrade to the previous Cycle 8 version of Xamarin by going to “Get the latest stable version of Cycle 8” section on your account page: https://store.xamarin.com/account/my/subscription/downloads#cycle8.
Uploading to Test Cloud via the Command Line
Alternatively, you can upload tests to the Test Cloud through the command line. To do this log into https://testcloud.xamarin.com & click "New Test Run" at the top. (Note this option is only visible if you have a currently valid Test Cloud account or trial.)
This launches a wizard which will have you pick some options (like whether you want to use Android or iOS; etc.), and at the end will generate a prototype command line. Below is an example for Android:
packages\Xamarin.UITest.[version]\tools\test-cloud.exe submit yourAppFile.apk [API_KEY] --devices [DEVICE_HASH] --series "master" --locale "en_US" --user [EMAIL] --assembly-dir pathToTestDllFolder
Note: I have removed the [API_KEY], [DEVICE_HASH] & [EMAIL] values for privacy reasons, however these will automatically be included when you generate the prototype from the wizard in Test Cloud.
You will still have to manually update the Xamarin.UITest.[version] as well as the actual names and relative paths of yourAppFile.apk & pathToTestDllFolder for this approach to work.

Visual Studio Installer: How to make app.config a hidden file if I choose to add primary output instead of individual files?

Basically, I created a Visual Studio Installer project. I added a primary output to my project, which was great because it loaded in the dependencies and files automatically for me. The problem I'm facing is that I want to be able to mark my config file as a hidden file, but can't seem to figure out how.
When I go to View>File System it lists:
MyExternalAssembly.dll
Primary output from MyProject (Active)
So, is there a way to actually mark my config file as hidden during installation if I add a primary output project instead of the individual files?
I'm not sure if you really want to make it hidden. If you're worried about users looking at it, a more than average user will know how to un-hide things and pilfer around. So, that being said, if you want to keep users from seeing what's in the config you will need to encrypt the config. A good example of that can be found here:
http://www.davidhayden.com/blog/dave/archive/2005/11/17/2572.aspx
If you still want to hide the config, then you could try hiding it once the application is run for the first time.
Using: ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun with a click once application you can tell if this is the first time an application is run.
You could then use File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden); to actually hide the app.config.
Which would result in:
if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.IsFirstRun)
{
File.SetAttributes(path, File.GetAttributes(path) | FileAttributes.Hidden);
}

Resources