[pmwiki-users] Merging and moving

Patrick R. Michaud pmichaud at pobox.com
Fri Nov 24 14:46:54 CST 2006


On Thu, Nov 16, 2006 at 09:56:30AM +0100, Jiri Hladůvka / OBUTEX wrote:
> H. Fox napsal(a):
> > ...
> > Just rename the page's file from GroupA.PageX to GroupB.PageX.  If you
> > do this, I recommend deleting the .pageindex file and letting PmWiki
> > rebuild the index. ...
>
> is it really so easy ?
> Should be the page manually edited after renamed ?
> If you have a look into the page file you can see some headers before Text=
> like
> 
> version=pmwiki-2.1.26 ordered=1 urlencoded=1
> agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.8.0.7) 
> Gecko/20060909 Firefox/1.5.0.7
> ...
> name=Site.Kontakt
> ...
> 
> I think the name= should be adjusted properly let the page is consistent.

PmWiki doesn't currently use the 'name=' field for anything,
it's simply there as a backup of the file's name.  So yes,
simply renaming the file is sufficient (and PmWiki is designed
to accommodate this.)

Background:  I once worked on a system where the name of the
file was the primary key for an index.  Then one day a script came
through and renamed all of the files to be 00001.txt, 00002.txt, 
00003.txt, etc.  Since the files themselves didn't contain a copy of
the key, it was a major pain to try to put everything back in
order.  The lesson I learned from this was to always keep a copy 
of any important meta information *in* the file itself, and not
assume that the filesystem is reliable.  Then, if anything happens
to the filename (or timestamp or whatever), it's an easy script
to get things back fairly close to where they belong.

Pm




More information about the pmwiki-users mailing list