Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-21 15:37:05

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

$HeadURL 4.0.4 and beyond

This is the $HeadURL in index.php:

4.0.3:
<code>/*
$HeadURL: http://svn.textpattern.com/development/4.0/index.php $
$LastChangedRevision: 804 $
*/</code>

4.0.4:
<code>/*
$HeadURL: http://svn.textpattern.com/releases/4.0.4/source/index.php $
$LastChangedRevision: 1925 $
*/</code>

Now when you do a source comparison on the two releases, every file is different cause of these lines. Makes it very hard to know what really changed from release to release, even if you follow the 4.0.4 standard, cause it will say 4.0.5 the next time.

This makes it very hard to generate a changed files list which we could use to update our sites with, rather than having to overwrite the whole /textpattern directory on every release.

Should releases have this in the header of every file, is it necessary?

Offline

#2 2006-10-21 16:52:36

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: $HeadURL 4.0.4 and beyond

This makes it very hard to generate a changed files list which we could use to update our sites with, rather than having to overwrite the whole /textpattern directory on every release.

This is completely unecessary for users. It doesn’t get any easier than copying one directory over the other, it’s not like it has to be done seperately/manuallyfor each file.

If you are a developer and maintain your own private branch with modifications, it should be trivial to either simply use the correct revision of /development/4.0 instead of the /releases/ branch (look at which revision the release branch was created). Or to alternatively whip up a one-iner shell script that removes those lines, before doing the comparison.

Should releases have this in the header of every file,

Yes, it’s incredibly helpful for diagnostics.

Offline

#3 2006-10-21 17:04:10

hcgtv
Archived Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: $HeadURL 4.0.4 and beyond

Sencer wrote:

This is completely unecessary for users. It doesn’t get any easier than copying one directory over the other, it’s not like it has to be done seperately/manually for each file.

Ok, I’m not going to argue this but keep in mind what happens with incremental revisions.

Between 4.0.3 and 4.0.4, 11 months went by and a lot of changes came to pass. Let’s say you decide to release a 4.0.5 to address some bugs that have cropped up. 4.0.5, or whatever you’d like to call it, will only affect a small number of files, but all files will look to have been changed.

For those small updates, a changed files zip would be in order, at least that’s my thinking.

Yes, it’s incredibly helpful for diagnostics.

# Find the highest revision number
	$file_revs = array();
	$rev = 0;
	foreach ($files as $f) {
		$lines = @file(txpath . $f);
		if ($lines) {
			foreach ($lines as $line) {
				if (preg_match('/^\$'.'LastChangedRevision: (\w+) \$/', $line, $match)) {
					$file_revs[$f] = $match[1];
					if (intval($match[1]) > $rev)
						$rev = intval($match[1]);
				}
			}
		}
	}

The revision line would be fine, if it changes so would the file.

Last edited by hcgtv (2006-10-21 18:06:46)

Offline

#4 2006-10-21 22:24:27

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: $HeadURL 4.0.4 and beyond

svn diff is what you’re looking for.


Alex

Offline

Board footer

Powered by FluxBB