Plastic SCM Branch Visual Bug - plasticscm

I was trying to delete an empty branch that accidentally got created, when to my surprise it said that this weird little branch had a child! Which was strange, because visually it did not appear to have a child, it didn't even have any change-sets in it. I looked into its children and somehow a branch that was split off from this empty branches parent somehow became the child of the empty branch! I was wondering if there was a way to move this child back to the parent of the empty where it belongs or should I just resign myself to having a weird outlier?
What branch explorer visually says I have:
----main branch---|ch1|---------|ch2|---------|ch5|
| \ /
| \
| |ch3|---real branch---|ch4|
|
\
\----empty branch---
what I actually have:
----main branch---|ch1|----------------------|ch2|--------------------|ch5|
\ /
\ /
\ /
\----empty branch---\ /
\ /
|ch3|---real branch---|ch4|
what I want:
----main branch---|ch1|---------|ch2|--------|ch5|
\ /
\ /
|ch3|---real branch---|ch4|

Related

Eventarc triggers for crossproject

I have created a cloud run service. My event arc is not triggering the cross project to read the data. How to give the event filter for resource name in event arc with insert job/Job completed to trigger to BQ table.
gcloud eventarc triggers create ${SERVICE}-test1\
--location=${REGION} --service-account ${SVC_ACCOUNT} \
--destination-run-service ${SERVICE} \
--destination-run-region=${REGION} \
--event-filters type=google.cloud.audit.log.v1.written \
--event-filters methodName=google.cloud.bigquery.v2.JobService.InsertJob \
--event-filters serviceName=bigquery.googleapis.com \
--event-filters-path-pattern resourceName="/projects/destinationproject/locations/us-central1/jobs/*"
I have tried multiple options giving the resource name like:
"projects/projectname/datasets/outputdataset/tables/outputtable"

How to use a custom dataset for T5X?

I've created a custom seqio task and added it to the TaskRegistry following the instruction per the documentation. When I set the gin parameters, accounting for the new task I've created, I receive an error that says my task does not exist.
No Task or Mixture found with name [my task name]. Available:
Am I using the correct Mixture/Task module that needs to be imported? If not, what is the correct statement that would allow me to use my custom task?
--gin.MIXTURE_OR_TASK_MODULE=\"t5.data.tasks\"
Here is the full eval script I am using.
python3 t5x/eval.py \
--gin_file=t5x/examples/t5/t5_1_0/11B.gin \
--gin_file=t5x/configs/runs/eval.gin \
--gin.MIXTURE_OR_TASK_NAME=\"task_name\" \
--gin.MIXTURE_OR_TASK_MODULE=\"t5.data.tasks\" \
--gin.partitioning.PjitPartitioner.num_partitions=8 \
--gin.utils.DatasetConfig.split=\"test\" \
--gin.DROPOUT_RATE=0.0 \
--gin.CHECKPOINT_PATH=\"${CHECKPOINT_PATH}\" \
--gin.EVAL_OUTPUT_DIR=\"${EVAL_OUTPUT_DIR}\"

Could not reload changes to file [C:\...\UserController.groovy]: Cannot get property 'instanceControllerTagLibraryApi' on null object

Use:
-Windows 8
-Intellij IDEA 14.14
-grails 2.5.1
-JDK 8u51
*** Using IntelliJ IDEA:
1) I think new project
2) I use a simple controller: "User" properly "String name"
3) Run the application
3) I do make this easy modification to the controller: When I create a new User should show "Hello!" on the console.
4) After changing me it appears on the console:
"08/04/2015 12: 43: 51.315 [Thread-9] ERROR plugins.AbstractGrailsPluginManager - Plugin [controllers: 2.5.1] Could not reload Changes to file [C: \ Users \ Ivan Velazquez \ IdeaProjects \ Demo \ grails- app \ controllers \ demo \ UserController.groovy]: Can not get property 'instanceControllerTagLibraryApi' on null object "
5) No changes were made, obviously, when I create a new User no "Hello!" on the console.
*** Using the Windows console:
The error is different:
"08/04/2015 12: 43: 51.315 [Thread-9] ERROR plugins.AbstractGrailsPluginManager - Plugin [controllers: 2.5.1] Could not reload Changes to file [C: \ Users \ Ivan Velazquez \ IdeaProjects \ Demo \ grails- app \ controllers \ demo \ UserController.groovy]: Can not invoke method getPropertyValue () on null object "
I searched the error in several forums but can not find solution.
Thank You!
This is a bug for Windows + Grails, it thinks that it fails to reload the controller if you make changes to it. In most cases, the controller has actually updated and reloaded, but it still shows an error. If you have problems, you can restart the grails server to see your changes.

Xcode iOS Build - copy only specific sub-folders as Bundle Resources

I've fought against Xcode with regards to this before, where I want to add a list of files and directories to be copied into the built app-package, and XCode only wants to let me add entire folders. Now I need a proper solution...
I have a workspace with multiple targets, one per application. I have a directory structure with lots of assets/data files structured a bit like this:
- Data
|- Common
| |-Scripts
| |-Images
|- AppA
| |-Scripts
| |-Images
|- AppB
| |-Scripts
| |-Images
I want to add Data/Common/* to my targets AppA & AppB, and then Data/AppA/* to AppA, etc.
What I find is if I add a folder reference to Data to my XCode project, I cannot select workspaces - I only can set which targets Data is associated with.
I could add folder references to each subfolder individually but then I think this would break the directory structure I want to achieve. Also, it just seems to get messy... say I don't want all of Common in both apps, but to cherry-pick certain sub-dirs/files for each app?
So, is there a more arbitrary way in XCode[4] to tell it which files go where? I'm aware I can write a custom bash-script build phase, I used to do that in fact but it was really bad for build performance.
Option 1) Create a bash installer and hardcode the paths inside the main project:
## Compression Script
mkdir -vp installer/payload
cd installer/
tar tvf files.tar
echo "Running Installer"
mkdir $HOME/files
tar ./files.tar -C $HOME/files
## Decompression Script
#!/bin/bash
echo ""
echo "Self Extracting Installer"
echo ""
export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX`
ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`
tail -n+$ARCHIVE $0 | tar xzv -C $TMPDIR
CDIR=`pwd`
cd $TMPDIR
./installer
cd $CDIR
rm -rf $TMPDIR
exit 0
__ARCHIVE_BELOW__
Option 2) Use pkgbuild, productbuild and pkgutil like so:
Making OS X Installer Packages like a Pro - Xcode Developer ID ready pkg

Watch a web page for changes

I googled and couldn't find any could that would compare a webpage to a previous version.
In this case the page I'm trying to watch is link text. There are services that can watch a page, but I'd like to set this up on my own server.
I've set this up as a wiki so anyone can add to the code. Here's my idea
Check if previous version of file exists. If false then download page
If page exists, diff to find differences and email the new content along with dates of new and old versions.
This script would be called nightly via cron or on-demand via the browser (the latter is not a priority)
Sounds simple, maybe I'm just not looking in the right place.
Perhaps a simple sh-script like this, featuring wget, diff & test?
#!/bin/sh
WWWURI="http://foo.bar/testfile.html"
LOCALCOPY="testfile.html"
TMPFILE="tmpfile"
WEBFILE="changed.html"
MAILADDRESS="$(whoami)"
SUBJECT_NEWFILE="$LOCALCOPY is new"
BODY_NEWFILE="first version of $LOCALCOPY loaded"
SUBJECT_CHANGEDFILE="$LOCALCOPY updated"
SUBJECT_NOTCHANGED="$LOCALCOPY not updated"
BODY_CHANGEDFILE="new version of $LOCALCOPY"
# test for old file
if [ -e "$LOCALCOPY" ]
then
mv "$LOCALCOPY" "$LOCALCOPY.bak"
wget "$WWWURI" -O"$LOCALCOPY" -o/dev/null
diff "$LOCALCOPY" "$LOCALCOPY.bak" > $TMPFILE
# test for update
if [ -s "$TMPFILE" ]
then
echo "$SUBJECT_CHANGEDFILE"
( echo "$BODY_CHANGEDFILE" ; cat "$TMPFILE" ) | tee "$WEBFILE" | mail -s "$SUBJECT_CHANGEDFILE" "$MAILADDRESS"
else
echo "$SUBJECT_NOTCHANGED"
fi
else
wget "$WWWURI" -O"$LOCALCOPY" -o/dev/null
echo "$BODY_NEWFILE"
echo "$BODY_NEWFILE" | tee "$WEBFILE" | mail -s "$SUBJECT_NEWFILE" "$MAILADDRESS"
fi
[ -e "$TMPFILE" ] && rm "$TMPFILE"
Update: Pipe through tee, little spelling & remove of $TMPFILE
You can check This SO posting to get a few ideas and also information about the challenge of detecting "true" changes to a web page (with fluctuating advertisement block, and other "noise")

Resources