Re: messing with CVS_LOCAL_BRANCH_NUM

2003-08-03 Thread Brian Reichert
On Sat, Aug 02, 2003 at 03:22:06PM -0700, John Polstra wrote:
 In article [EMAIL PROTECTED],
 Brian Reichert  [EMAIL PROTECTED] wrote:
  I'm exploring the 'local repository' tactics as described in:
  
http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html
  
  which makes use of the CVS_LOCAL_BRANCH_NUM evironment variable.
 [...]
  Any advice?
 
 Yes: look for a different approach, or at least backup your local
 repository frequently.  There are known bugs in CVSup which can cause
 it to throw away your local branch under certain circumstances.  I
 won't have time to fix those issues any time soon.  So my advice is,
 don't use the CVS_LOCAL_BRANCH_NUM feature.

Darn. :/

I had asked about this topic back in early March, search for message
ID [EMAIL PROTECTED], if you care.  I wanted to
learn about maintaining a private repository, and the above URL was
the sole concrete pointer.

(Well, not true: someone else in that thread responded about a
makefile patch, but no one else had any good ideas.)

So, can the 'certain circumstances' be described, so that I might
avoid them?  Or is that just due to inherent wierdness in the whole
CVSup process?

Thanks for the feedback, in any case...

 
 John
 -- 
   John Polstra
   John D. Polstra  Co., Inc.Seattle, Washington USA
   Two buttocks cannot avoid friction. -- Malawi saying

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA BSD admin/developer at large
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: messing with CVS_LOCAL_BRANCH_NUM

2003-08-03 Thread John Polstra
In article [EMAIL PROTECTED],
Brian Reichert  [EMAIL PROTECTED] wrote:
 On Sat, Aug 02, 2003 at 03:22:06PM -0700, John Polstra wrote:
  Yes: look for a different approach, or at least backup your local
  repository frequently.  There are known bugs in CVSup which can cause
  it to throw away your local branch under certain circumstances.  I
  won't have time to fix those issues any time soon.  So my advice is,
  don't use the CVS_LOCAL_BRANCH_NUM feature.
 
 Darn. :/
[...]
 So, can the 'certain circumstances' be described, so that I might
 avoid them?  Or is that just due to inherent wierdness in the whole
 CVSup process?

The main situation in which it will occur is when somebody has
directly manipulated or replaced an RCS file in the master CVS
repository.  CVSup notices that the client and server have entirely
different RCS files, so it does a full replace instead of trying to
send just deltas.  Ideally this situation should never arise, but in
the real world it happens all the time.

That's actually the only scenario I know of where the problem should
crop up.  But on the other hand, I've had some suspicious-sounding
reports of CVS_LOCAL_BRANCH_NUM lossage that can't be explained by
this alone.  Bottom line is, if you value your local branch then you
should back it up before every update.

John
-- 
  John Polstra
  John D. Polstra  Co., Inc.Seattle, Washington USA
  Two buttocks cannot avoid friction. -- Malawi saying
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


messing with CVS_LOCAL_BRANCH_NUM

2003-08-02 Thread Brian Reichert
I'm exploring the 'local repository' tactics as described in:

  http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html

which makes use of the CVS_LOCAL_BRANCH_NUM evironment variable.

This is all under 4.7-RELEASE.

My general method is:

  setenv CVS_LOCAL_BRANCH_NUM 1000
  setenv MYBRANCH just_testing
  setenv RELEASE RELENG_4_7
  setenv CVSROOT /annex/cvs/FreeBSD

  cvs rtag -b -r $RELEASE $MYBRANCH src
  cd /usr
  cvs checkout -r $MYBRANCH src/UPDATING
  cvs status src/UPDATING # check to see that this really is my branch
  vi src/UPDATING

When I try to commit, though:

   cvs ci src
  cvs commit: Examining src
  You are committing on the wrong repository!
  cvs commit: Pre-commit check failed
  cvs [commit aborted]: correct above errors first!

Where is this 'wrong repository' concept coming from?  My CVSROOT
hasn't changed.  A google search for that disgnostic message yeilds
no hits...

Any advice?

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA BSD admin/developer at large
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: messing with CVS_LOCAL_BRANCH_NUM

2003-08-02 Thread Simon L. Nielsen
On 2003.08.02 15:35:48 -0400, Brian Reichert wrote:

 I'm exploring the 'local repository' tactics as described in:
 
   http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html
[snip]
cvs ci src
   cvs commit: Examining src
   You are committing on the wrong repository!
   cvs commit: Pre-commit check failed
   cvs [commit aborted]: correct above errors first!
 
 Where is this 'wrong repository' concept coming from?  My CVSROOT
 hasn't changed.  A google search for that disgnostic message yeilds
 no hits...

The problem is the file CVSROOT/nocommits.sh, which is used as a
safeguard in the FreeBSD tree.  I replace the file every time I run
cvsup with the following version:

nocommits.sh
#! /bin/sh
# $FreeBSD$
#
# This is just some basic anti-foot-shooting to avoid accidental commits
# to cvsup'ed copies of the repository etc.
OKUSER=simonln
if [ x`/usr/bin/id -un` = x${OKUSER} ]; then
  exit 0
fi
echo I should only commit as ${OKUSER}!
exit 1
/nocommits.sh

You could just make a simple script which call 'exit 0' (or perhaps
remove the file; I haven't tried that), but the above version fits
better into my rather odd setup :-).

I have started some work on documenting the CVS_LOCAL_BRANCH_NUM use,
but unfortunatly there are only 24 hours in a day, so I have no idea
when I will get around to finishing it.

-- 
Simon L. Nielsen
FreeBSD Documentation Team


pgp0.pgp
Description: PGP signature


Re: messing with CVS_LOCAL_BRANCH_NUM

2003-08-02 Thread Brian Reichert
On Sat, Aug 02, 2003 at 09:49:00PM +0200, Simon L. Nielsen wrote:
 On 2003.08.02 15:35:48 -0400, Brian Reichert wrote:
 
  I'm exploring the 'local repository' tactics as described in:
  
http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html
 [snip]
 cvs ci src
cvs commit: Examining src
You are committing on the wrong repository!
cvs commit: Pre-commit check failed
cvs [commit aborted]: correct above errors first!
  
  Where is this 'wrong repository' concept coming from?  My CVSROOT
  hasn't changed.  A google search for that disgnostic message yeilds
  no hits...
 
 The problem is the file CVSROOT/nocommits.sh, which is used as a
 safeguard in the FreeBSD tree.  I replace the file every time I run
 cvsup with the following version:

Cool!  Thanks for the pointer.  Off I go...

 I have started some work on documenting the CVS_LOCAL_BRANCH_NUM use,
 but unfortunatly there are only 24 hours in a day, so I have no idea
 when I will get around to finishing it.

Heh. :)  Good luck...

 -- 
 Simon L. Nielsen
 FreeBSD Documentation Team

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA BSD admin/developer at large
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: messing with CVS_LOCAL_BRANCH_NUM

2003-08-02 Thread Brian Reichert
On Sat, Aug 02, 2003 at 04:04:41PM -0400, Brian Reichert wrote:
 On Sat, Aug 02, 2003 at 09:49:00PM +0200, Simon L. Nielsen wrote:
  The problem is the file CVSROOT/nocommits.sh, which is used as a
  safeguard in the FreeBSD tree.  I replace the file every time I run
  cvsup with the following version:
 
 Cool!  Thanks for the pointer.  Off I go...

So - removing the file chokes (it's expressly looked for), but 'exit
0' is sufficent for my little sandbox.  Thanks for the help, off
to play more...

-- 
Brian 'you Bastard' Reichert[EMAIL PROTECTED]
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA BSD admin/developer at large
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: messing with CVS_LOCAL_BRANCH_NUM

2003-08-02 Thread John Polstra
In article [EMAIL PROTECTED],
Brian Reichert  [EMAIL PROTECTED] wrote:
 I'm exploring the 'local repository' tactics as described in:
 
   http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html
 
 which makes use of the CVS_LOCAL_BRANCH_NUM evironment variable.
[...]
 Any advice?

Yes: look for a different approach, or at least backup your local
repository frequently.  There are known bugs in CVSup which can cause
it to throw away your local branch under certain circumstances.  I
won't have time to fix those issues any time soon.  So my advice is,
don't use the CVS_LOCAL_BRANCH_NUM feature.

John
-- 
  John Polstra
  John D. Polstra  Co., Inc.Seattle, Washington USA
  Two buttocks cannot avoid friction. -- Malawi saying
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: CVS_LOCAL_BRANCH_NUM?

2002-12-11 Thread Peter Pentchev
On Tue, Dec 10, 2002 at 11:56:26AM -0800, Lamont Granquist wrote:
 
 
 On Tue, 10 Dec 2002, Dmitry Morozovsky wrote:
  On Tue, 10 Dec 2002, Lamont Granquist wrote:
  LG From the man page, I'm not really sure where it makes a difference other
  LG than when someone is playing with IFS, but $@ seems to be more of what I
  LG intended...
 
  Please note quotes explicitly, $@ is really needed where your parameters
  contain spaces (bad practice in filenames, yeah, but don't make yourself
  another one PITA you can avoid ;-P )
 
 got it.

Mmm.. I am not really sure if we need quotes in this particular case.
In my experience, the CVS invocation in the server or pserver case
almost always has more than one argument (at the very least, the
'server' or 'pserver' keyword and one 'allow-root' option).  The quotes
around $@ would make the whole param string be passed as a single
parameter to the real CVS binary, which might not be quite the desired
result...

G'luck,
Peter

-- 
Peter Pentchev  [EMAIL PROTECTED][EMAIL PROTECTED]
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
This sentence claims to be an Epimenides paradox, but it is lying.



msg38615/pgp0.pgp
Description: PGP signature


Re: CVS_LOCAL_BRANCH_NUM?

2002-12-11 Thread Stijn Hoop
On Wed, Dec 11, 2002 at 10:59:55AM +0200, Peter Pentchev wrote:
 On Tue, Dec 10, 2002 at 11:56:26AM -0800, Lamont Granquist wrote:
  On Tue, 10 Dec 2002, Dmitry Morozovsky wrote:
   Please note quotes explicitly, $@ is really needed where your parameters
   contain spaces (bad practice in filenames, yeah, but don't make yourself
   another one PITA you can avoid ;-P )
  
  got it.
 
 Mmm.. I am not really sure if we need quotes in this particular case.
 In my experience, the CVS invocation in the server or pserver case
 almost always has more than one argument (at the very least, the
 'server' or 'pserver' keyword and one 'allow-root' option).  The quotes
 around $@ would make the whole param string be passed as a single
 parameter to the real CVS binary, which might not be quite the desired
 result...

No, that's not the behaviour with /bin/sh, from the man page:

 @   Expands to the positional parameters, starting from one.  When
 the expansion occurs within double-quotes, each positional param-
 eter expands as a separate argument.  If there are no positional
 parameters, the expansion of @ generates zero arguments, even
 when @ is double-quoted.  What this basically means, for example,
 is if $1 is ``abc'' and $2 is ``def ghi'', then $@ expands to
 the two arguments:

   abc   def ghi

I think $@ (with the quotes) is ok.

--Stijn

-- 
Help Wanted: Telepath. You know where to apply.



msg38616/pgp0.pgp
Description: PGP signature


Re: CVS_LOCAL_BRANCH_NUM?

2002-12-11 Thread Peter Pentchev
On Wed, Dec 11, 2002 at 10:40:04AM +0100, Stijn Hoop wrote:
 On Wed, Dec 11, 2002 at 10:59:55AM +0200, Peter Pentchev wrote:
  On Tue, Dec 10, 2002 at 11:56:26AM -0800, Lamont Granquist wrote:
   On Tue, 10 Dec 2002, Dmitry Morozovsky wrote:
Please note quotes explicitly, $@ is really needed where your parameters
contain spaces (bad practice in filenames, yeah, but don't make yourself
another one PITA you can avoid ;-P )
   
   got it.
  
  Mmm.. I am not really sure if we need quotes in this particular case.
  In my experience, the CVS invocation in the server or pserver case
  almost always has more than one argument (at the very least, the
  'server' or 'pserver' keyword and one 'allow-root' option).  The quotes
  around $@ would make the whole param string be passed as a single
  parameter to the real CVS binary, which might not be quite the desired
  result...
 
 No, that's not the behaviour with /bin/sh, from the man page:
 
  @   Expands to the positional parameters, starting from one.  When
  the expansion occurs within double-quotes, each positional param-
  eter expands as a separate argument.  If there are no positional
  parameters, the expansion of @ generates zero arguments, even
  when @ is double-quoted.  What this basically means, for example,
  is if $1 is ``abc'' and $2 is ``def ghi'', then $@ expands to
  the two arguments:
 
abc   def ghi
 
 I think $@ (with the quotes) is ok.

Oops.  Thanks for the clarification.  Never had to deal with $@ before,
actually.

/me crawls back into his hole.

G'luck,
Peter

-- 
Peter Pentchev  [EMAIL PROTECTED][EMAIL PROTECTED]
PGP key:http://people.FreeBSD.org/~roam/roam.key.asc
Key fingerprint FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
No language can express every thought unambiguously, least of all this one.



msg38617/pgp0.pgp
Description: PGP signature


Re: CVS_LOCAL_BRANCH_NUM?

2002-12-10 Thread Dmitry Morozovsky
On Mon, 9 Dec 2002, Lamont Granquist wrote:

LG I finally figured this out.  To use CVS_LOCAL_BRANCH_NUM with a cvs
LG pserver you need to have the environment variable set server-side.  That
LG means something like invoking a wrapper from inetd which sets the
LG environment variable and the calls cvs.
LG
LG Completely undocumented behavior and not terribly transparent.
LG
LG I'm working on some instructions at:
LG
LG http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html

A little comment:

- 8 - wrapper
#!/bin/sh

export CVS_LOCAL_BRANCH_NUM=1000
/usr/bin/cvs $*
- 8 -


Don't you think the last parameter should be $@ ?

Sincerely,
D.Marck   [DM5020, DM268-RIPE, DM3-RIPN]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: CVS_LOCAL_BRANCH_NUM?

2002-12-10 Thread Lamont Granquist

From the man page, I'm not really sure where it makes a difference other
than when someone is playing with IFS, but $@ seems to be more of what I
intended...

And in case anyone is still reading this now, I'd like to throw out the
suggestion that CVS_LOCAL_BRANCH_NUM should really be an option to cvs
rtag and should thereby be settable in one's .cvsrc file and the option
should get transmitted to the cvs pserver, eliminating the kind of
asymmetry I just documented.

On Tue, 10 Dec 2002, Dmitry Morozovsky wrote:
 On Mon, 9 Dec 2002, Lamont Granquist wrote:

 LG I finally figured this out.  To use CVS_LOCAL_BRANCH_NUM with a cvs
 LG pserver you need to have the environment variable set server-side.  That
 LG means something like invoking a wrapper from inetd which sets the
 LG environment variable and the calls cvs.
 LG
 LG Completely undocumented behavior and not terribly transparent.
 LG
 LG I'm working on some instructions at:
 LG
 LG http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html

 A little comment:

 - 8 - wrapper
 #!/bin/sh

 export CVS_LOCAL_BRANCH_NUM=1000
 /usr/bin/cvs $*
 - 8 -


 Don't you think the last parameter should be $@ ?

 Sincerely,
 D.Marck   [DM5020, DM268-RIPE, DM3-RIPN]
 
 *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***
 




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: CVS_LOCAL_BRANCH_NUM?

2002-12-10 Thread Dmitry Morozovsky
On Tue, 10 Dec 2002, Lamont Granquist wrote:

LG From the man page, I'm not really sure where it makes a difference other
LG than when someone is playing with IFS, but $@ seems to be more of what I
LG intended...

Please note quotes explicitly, $@ is really needed where your parameters
contain spaces (bad practice in filenames, yeah, but don't make yourself
another one PITA you can avoid ;-P )

LG And in case anyone is still reading this now, I'd like to throw out the
LG suggestion that CVS_LOCAL_BRANCH_NUM should really be an option to cvs
LG rtag and should thereby be settable in one's .cvsrc file and the option
LG should get transmitted to the cvs pserver, eliminating the kind of
LG asymmetry I just documented.

I do agree; however, as cvs is a contributed software, this should be discussed
and/or reported via cvsbug(8).

[snip]

Sincerely,
D.Marck   [DM5020, DM268-RIPE, DM3-RIPN]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- [EMAIL PROTECTED] ***


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: CVS_LOCAL_BRANCH_NUM?

2002-12-10 Thread Lamont Granquist


On Tue, 10 Dec 2002, Dmitry Morozovsky wrote:
 On Tue, 10 Dec 2002, Lamont Granquist wrote:
 LG From the man page, I'm not really sure where it makes a difference other
 LG than when someone is playing with IFS, but $@ seems to be more of what I
 LG intended...

 Please note quotes explicitly, $@ is really needed where your parameters
 contain spaces (bad practice in filenames, yeah, but don't make yourself
 another one PITA you can avoid ;-P )

got it.

 LG And in case anyone is still reading this now, I'd like to throw out the
 LG suggestion that CVS_LOCAL_BRANCH_NUM should really be an option to cvs
 LG rtag and should thereby be settable in one's .cvsrc file and the option
 LG should get transmitted to the cvs pserver, eliminating the kind of
 LG asymmetry I just documented.

 I do agree; however, as cvs is a contributed software, this should be discussed
 and/or reported via cvsbug(8).

Actually CVS_LOCAL_BRANCH_NUM is a local hack in FreeBSD, and which
originated with FreeBSD, so freebsd-hackers is as good a place as any to
bitch about it...


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: CVS_LOCAL_BRANCH_NUM?

2002-12-09 Thread Lamont Granquist

I finally figured this out.  To use CVS_LOCAL_BRANCH_NUM with a cvs
pserver you need to have the environment variable set server-side.  That
means something like invoking a wrapper from inetd which sets the
environment variable and the calls cvs.

Completely undocumented behavior and not terribly transparent.

I'm working on some instructions at:

http://www.scriptkiddie.org/freebsd/setting_up_local_repo.html

On Sun, 8 Dec 2002, Lamont Granquist wrote:
 I've been struggling all weekend to setup a local CVS repo mirror, and I
 guess I've done that successfully, but I can't figure out what is going on
 with CVS_LOCAL_BRANCH_NUM.  My understanding is that if I set it to a
 large number 63000 that it should tag branches that I make with values
 roughly that large.  You can see from below that what I'm getting though
 is low-numbered branches.  I'm confused.  This is what I did on both
 -current and 4.6-release:

 setenv CVS_LOCAL_BRANCH_NUM 63000
 cvs rtag -b -r RELENG_4_7 RELENG_4_LCG src

 And this is what I get -- shouldn't that be something like 1.229.63000?

 cvs status UPDATING
 ===
 File: UPDATING  Status: Up-to-date

Working revision:1.229
Repository revision: 1.229   /cvs/src/UPDATING,v
Sticky Tag:  RELENG_4_LCG (branch: 1.229.4)
Sticky Date: (none)
Sticky Options:  (none)




 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-hackers in the body of the message




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



CVS_LOCAL_BRANCH_NUM?

2002-12-08 Thread Lamont Granquist

I've been struggling all weekend to setup a local CVS repo mirror, and I
guess I've done that successfully, but I can't figure out what is going on
with CVS_LOCAL_BRANCH_NUM.  My understanding is that if I set it to a
large number 63000 that it should tag branches that I make with values
roughly that large.  You can see from below that what I'm getting though
is low-numbered branches.  I'm confused.  This is what I did on both
-current and 4.6-release:

setenv CVS_LOCAL_BRANCH_NUM 63000
cvs rtag -b -r RELENG_4_7 RELENG_4_LCG src

And this is what I get -- shouldn't that be something like 1.229.63000?

cvs status UPDATING
===
File: UPDATING  Status: Up-to-date

   Working revision:1.229
   Repository revision: 1.229   /cvs/src/UPDATING,v
   Sticky Tag:  RELENG_4_LCG (branch: 1.229.4)
   Sticky Date: (none)
   Sticky Options:  (none)




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message