|
List Info
Thread: CVS issues
|
|
| CVS issues |
  United States |
2007-03-29 08:11:36 |
Hi! Is there any way to tell CVS to just undo everything I
did
yesterday? I want to roll back all the commits, untag
everything I
did, and undo the branches I made. I've gotten things very
messed up
because of CVSs weird sticky issues -- I was trying to do
development
on both 4.7 and 5 at the same time (I thought if I had
completely
different CVS checkouts, in different roots, it would keep
track of
which tag was proper, but it doesn't).
Also, is there any way to delete a file from head, but not
from the
various branches?
Thanks,
Ricky
The information transmitted in this electronic communication
is intended only for the person or entity to whom it is
addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this
information by persons or entities other than the intended
recipient is prohibited. If you received this information in
error, please contact the Compliance HelpLine at
800-856-1983 and properly dispose of this information.
|
|
| Re: CVS issues |
  United States |
2007-03-29 12:21:47 |
On Mar 29, 2007, at 6:11 AM, Richard Morse wrote:
> Is there any way to tell CVS to just undo everything I
did yesterday?
yes, but it's a lot of work.
> I want to roll back all the commits, untag everything I
did, and
> undo the branches I made.
all possible, assuming either myself or killes had 1/2 hour
or more
to waste doing this for you.
i know the docs can be daunting, and CVS can seem arcane,
but as we
always say at my day job "it's easier to ask for
permission than
forgiveness". ;) i.e. i would have much rather spent
10 minutes
answering your questions than 3 or 5 times that much effort
undoing
your mistakes.
> I've gotten things very messed up because of CVSs weird
sticky
> issues -- I was trying to do development on both 4.7
and 5 at the
> same time
shouldn't be a problem, i do it all the time.
> (I thought if I had completely different CVS checkouts,
in
> different roots, it would keep track of which tag was
proper, but
> it doesn't).
i don't know what CVS client you're using, and some of them
might be
stupider than others. however, using the CLI, if you
checkout like so:
mkdir drupal-5
cd drupal-5
cvs -d[blah-blah] co -r DRUPAL-5 contributions/modules/foo
cd ..
mkdir drupal-4-7
cd drupal-4-7
cvs -d[blah-blah] co -r DRUPAL-4-7
contributions/modules/foo
cd ..
mkdir drupal-HEAD
cd drupal-HEAD
cvs -d[blah-blah] co contributions/modules/foo
(where "[blah-blah]" is really
":pserver:..." -- i assume everyone's
familiar with this part -- or, you can just set that in your
CVSROOT
environment variable).
each copy of foo will have a sticky tag that remembers what
branch
it's from (or, in the case of drupal-HEAD, no sticky tag at
all,
which means it's sticky to HEAD). assuming all future cvs
commands
don't specify "-r", you should never have any
problems with this. if
you're in one of these workspaces and you do a "cvs
update -r
something" or "cvs update -A", you just undid
your sticky tag, so
don't do that unless you're sure you know what you're
doing.
if you're using some GUI, you're at the mercy of the foolish
GUI
writer, who might think they know how to use CVS better than
you do.
i've heard of CVS GUIs that add all sorts of extra garbage
to the
underlying CVS commands that get spit out, which is one of
the
reasons i never use them at all. so, it's possible your GUI
"remembered" the last checkout or update command
you typed into the
box, and keeps appending the "-r" all the time,
regardless of what
directory you're in, thereby undoing the entire
functionality of
sticky tags. personally, i'd rather just learn the tool and
then
have complete control over what's going on.
> Also, is there any way to delete a file from head, but
not from the
> various branches?
sure. assuming the file exists in the repository and is
properly
added to the other branches, you just do this:
mkdir HEAD
cd HEAD
cvs -d[blah-blah] co contributions/modules/foo
cd contributions/modules/foo
rm file-for-branches.txt
cvs rm file-for-branches.txt
cvs commit -m "file-for-branches.txt shouldn't be in
HEAD"
for all it's faults on renaming files, cvs is actually smart
about
the fact that removing a file is an operation specific to a
given
branch. so, once it's been branched, you have to
independently
remove it from any/all branches where you don't want it
anymore.
so, back to your "how do i undo all of this?"
question -- i guess the
next step is finding the appropriate bribe to appease killes
or
myself. ;) perhaps you should take that part of the
discussion off-
line... ;)
-derek (dww)
p.s. yes, yes, it's possible to use another "-d
[local-directory]"
command later along the command line to checkout stuff in
more fancy
ways that avoids all the "mkdir" and
"cd" parts of my instructions
above. but that's more confusing and i'm trying to keep
this advice
as simple as possible.
|
|
| Re: CVS issues |
  United States |
2007-03-29 12:29:28 |
On Mar 29, 2007, at 1:21 PM, Derek Wright wrote:
>
> On Mar 29, 2007, at 6:11 AM, Richard Morse wrote:
>
>> Is there any way to tell CVS to just undo
everything I did yesterday?
>
> yes, but it's a lot of work.
Oh well; I'll figure out how to fix this some other way
then; I was
hoping there was an easy "cvs rollback" command at
the client...
>> (I thought if I had completely different CVS
checkouts, in
>> different roots, it would keep track of which tag
was proper, but
>> it doesn't).
>
> i don't know what CVS client you're using, and some of
them might
> be stupider than others. however, using the CLI, if
you checkout
> like so:
>
> mkdir drupal-5
> cd drupal-5
> cvs -d[blah-blah] co -r DRUPAL-5
contributions/modules/foo
> cd ..
>
> mkdir drupal-4-7
> cd drupal-4-7
> cvs -d[blah-blah] co -r DRUPAL-4-7
contributions/modules/foo
> cd ..
The annoying this is that this is what I did, but then it
commited
stuff in the drupal-5 directory to the 4-7 tag. Until I
have more
practice, I'm going to just keep wiping out my local copy
whenever I
need to change branches.
>> Also, is there any way to delete a file from head,
but not from
>> the various branches?
>
> sure. assuming the file exists in the repository and
is properly
> added to the other branches, you just do this:
>
> mkdir HEAD
> cd HEAD
> cvs -d[blah-blah] co contributions/modules/foo
> cd contributions/modules/foo
> rm file-for-branches.txt
> cvs rm file-for-branches.txt
> cvs commit -m "file-for-branches.txt shouldn't be
in HEAD"
Thanks -- this is very useful!
Ricky
The information transmitted in this electronic communication
is intended only for the person or entity to whom it is
addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this
information by persons or entities other than the intended
recipient is prohibited. If you received this information in
error, please contact the Compliance HelpLine at
800-856-1983 and properly dispose of this information.
|
|
[1-3]
|
|