Jun

17

I think this is the 5th time I've had to figure this out in the past few years, so this time I'm going to preserve it here for posterity :)

The problem is usually one or more of:

  • You have files missing from your workspace that need replaced.
  • You have locally modified (i.e. not opened for edit) files that need replaced.
  • These files are large in either size or number, and on a slow or remote server, so a complete force-sync is not an appealing option.

Normally this could easily be solved with something like p4 diff -sd/-se //depot/path/.. | p4 -x – sync -f, which finds all the missing/outdated files and then force-syncs them.

The problem with this approach comes when you need the files from a specific revision or label. While you can pass in a label/revision to 'p4 diff', the sync part will always retrieve the latest version of a file. To fix this we need to save the list of files we need to a temporary location, then postfix each line with the version we want, then feed that new list back to p4 sync.

But there's one final catch. If your filenames are local paths instead of Perforce paths, you cannot specify a label, only revisions. E.g. c:\temp\foo.dat@SOME_LABEL will not work, but c:\temp\foo.dat#999 will. Fortunately we can use the pseudo revision 'have' for our purposes.

@echo off

REM Could optionally pass these as %1 and %2 from the cmd line
set LABEL=@SOME_LABEL
set BASE_DIR=//depot/path/…

del p4sync.txt

echo Setting 'have' to %LABEL% for %BASE_DIR%
REM do a nop sync that sets our 'have' version to the label we want
p4 sync -k %BASE_DIR%%LABEL%

echo Finding modified files..
p4 diff -se %BASE_DIR%%LABEL% > p4diff.txt

echo Finding missing files..
p4 diff -sd %BASE_DIR%%LABEL% >> p4diff.txt

echo Building sync commands
REM Append #have to each filename and put them all in a list of files to sync
for /f %%i in (p4diff.txt) Do echo %%i#have>> p4sync.txt

REM Now sync everything
if exist p4sync.txt (
    echo Syncing..
    p4 -x p4sync.txt sync -f
)else (
    echo It seems no files need updated!
)

Voila!

Posted via email from Andrew Live!

Apr

8

Testing publishing via the WordPress app for iPad… :)

It’s very buggy, and you can forget about including any images or formatting :(

Feb

12

So that’s where my hard disk space is going these days…

image

Ho hum.

Jan

27

While I still really want one, in some ways I’m a little disappointed in some aspects of the iPad.

Pros:

  • Price is way lower than I was expecting.
  • If you can (as was implied) start/stop the 3G plan on a monthly basis that would be pretty neat if you suddenly found a need while travelling.
  • Assuming there are sensible ways to work with documents, E.g. send/receive/download/edit, then the iWork apps and the keyboard make this a great substitute for a notebook when travelling.
  • At 1.5 pounds it’s half the weight of the Macbook Air, which already is super-light.
  • If the figures are correct, 10 hours of battery life while watching movies is remarkable.

Cons:

  • 4:3 is a horrible aspect ratio that really is a step back for a device where video is a key feature.
  • While the keyboard accessory is nice, why couldn’t it have worked with the existing Apple Bluetooth keyboards? Or the stand feature a USB socket that could accept any keyboard?
  • No multi-tasking. The device clearly has the power and battery life, and not being able to listen to Pandora while working on email, or edit an image for a document, is a big disappointment on a device purported to be more than a phone. At this point Apple are beginning to look simply stubborn.
  • The handling of existing iPhone apps is disappointing. I would have liked to see them act like widgets that could be moved around the screen and resized. With multiple widgets allowed at once.
  • Despite what the press and Apple say, until there is a way to play games using a physical controller, these devices will struggle to really compete as games devices. While some games can work fantastically with a touch interface, many others range from “ok” to “mediocre”. (Most action/shooter games fall into this latter category).

I still want one though.

Oct

27

Is now fixed :)

Thanks to all who emailed and pointed out the problem.

Sep

23

Last night Liz and I discovered that for some reason the first episode of the new Bing Bang Theory, our premium "watch together" show, hadn't been recorded. No problem, we just flicked on AppleTV, went to the TV section and…. couldn't find it anywhere.

Infact there was no sign of season two either, just season one. Very odd. (next-day googling reveals that Warner Bros are withholding it from online distribution to try and increase the value of the show for syndication).

This of course led to a small dilemma. Missed show, no scheduled repeats, no way to buy it online or watch it in Hulu/CBS.com. Hmm. In this day and age do content providers REALLY think people will wait for the repeats/syndication/dvd? I mean really?

No of course not. Instead they* head over to somewhere like The Pirate Bay or the other zillion torrent sites and grab the episode for free. The content owners lose out on the money people were willing to pay (or advertisements to watch), and viewers have to go through a bit of hassle to obtain a copy of variable quality (although one that's almost always better than SDTV).

Nobody wins, aside from the torrent sites with all the advertising. It's quite sad really.

*(by they I mean everyone else, and this is not at all what I did…)

Posted via email from Andrew Live!

Sep

22

Since upgrading to 10.6.1 (and possibly before) Snow Leopard has consistently failed to perform Time Machine backups to the Time Capsule on my network. The backup starts but quickly fails with the message “The backup was not performed because an error occurred while copying files to the backup disk.”

After rebooting both my laptop and Time Capsule, and even trying to create a fresh time machine image I finally discovered a way to fix this issue – downgrading to 7.4.1 of the Airport Extreme / Time Capsule firmware.

To do this open Airport Utility, hold down the “option” key on the keyboard and choose “BaseStation->Upload Firmware…” from the menu bar. You should now be able to downgrade your Time Capsule / Airport Extreme to previous firmware versions, and 7.4.1 works flawlessly with Time Machine / Snow Leopard 10.6.1 for me.

Hopefully this will save others from lots of head scratching :)

Sep

3

Dear AT&T,

Instead of sending me spam email advertising your new GPS service, how about pulling your finger out and providing the MMS service that Apple have been dubiously promoting for around six months now? (“Late Summer” my arse).

The moment I can get an iPhone on Verizon, you guys are toast.

Bests,

Andrew

image

Aug

20

See the full gallery on posterous

Posted via web from Andrew Live!

Aug

20

Testing posterous… The view from my office :)

Posted via email from Andrew Live!

Next Page »