You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Steinar Bang <sb...@dod.no> on 2006/04/25 08:38:03 UTC

Moving a file add to a particular revision?

I forgot to add a file when I checked in a big change containing a lot
of file.

I added it two revisions later, when I discovered it, and I added it
with the same commit message as the revision I wish it was added in
(habit from CVS).

Is there a way to move it to revision 93 when it was actually added on
revision 95?

Thanx!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Fabian Cenedese <Ce...@indel.ch>:

> If you still want to have all additions in one revision you can
> remove all files again (rev 96) and then add them again together
> with the missing file (rev 97). So you can record rev 97 as the one
> where the new files were added. Still, shouldn't matter if it's 97
> or 95...

That's one possibility.  It would be quite a bit of work, and would
leave the overall revision history messier, but version 97 would at
least have a complete changeset.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Fabian Cenedese <Ce...@indel.ch>.
At 12:53 25.04.2006 +0200, Ryan Schmidt wrote:
>On Apr 25, 2006, at 10:38, Steinar Bang wrote:
>
>>I forgot to add a file when I checked in a big change containing a lot
>>of file.
>>
>>I added it two revisions later, when I discovered it, and I added it
>>with the same commit message as the revision I wish it was added in
>>(habit from CVS).
>>
>>Is there a way to move it to revision 93 when it was actually added on
>>revision 95?
>
>No, that doesn't make sense because in Subversion, the repository  
>revision is merely "the number of changes which have occurred in the  
>repository." In revision 93, you changed some files. In revision 95,  
>you added a file. And that's fine. Anyone who happened to get  
>revision 93 will have something that's incomplete, and so they should  
>simply update their working copy to get revision 95 in which the  
>missing file is now present.

If you still want to have all additions in one revision you can remove
all files again (rev 96) and then add them again together with the
missing file (rev 97). So you can record rev 97 as the one where
the new files were added. Still, shouldn't matter if it's 97 or 95...

bye  Fabi



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Steinar Bang wrote:
>>>>>> "Nico Kadel-Garcia" <nk...@comcast.net>:
>
>> In short, no. In long, you could rebuild the repository from a dump
>> to revision 92, then add the files on top and recreate revision 93
>> with everything in place, then do revision 94. But it's not trivial
>> to merge changes.
>
> Hm... that's one option that would do it.
>
> But it would be a problem with a large repository, and would require
> all others to refrain from committing during the process, wouldn't it?

Well, you can first generate a mirror of the repository with hot-backup.py 
and work with the mirror: when you're ready to go, turn off access to the 
repository for 10 minutes in an announced downtime and swap in the mirror, 
apply that last few changes from the previously active repository, then open 
access back up.

> I guess what I will have to do in this, and future cases when I mess
> up, is to do what I did when I messed up in CVS: live with it, and try
> not to mess up in the future...:-)

Heh. You have my sympathies, sir. 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Danny MacMillan <fl...@users.sourceforge.net>.
Steinar Bang wrote:
>>>>>>"Nico Kadel-Garcia" <nk...@comcast.net>:
> 
> 
>>In short, no. In long, you could rebuild the repository from a dump
>>to revision 92, then add the files on top and recreate revision 93
>>with everything in place, then do revision 94. But it's not trivial
>>to merge changes.
> 
> 
> Hm... that's one option that would do it.
> 
> But it would be a problem with a large repository, and would require
> all others to refrain from committing during the process, wouldn't it?
> 
> I guess what I will have to do in this, and future cases when I mess
> up, is to do what I did when I messed up in CVS: live with it, and try
> not to mess up in the future...:-)

If you are concerned about doing this a lot, what you might do is create
a personal branch for working on the feature you're implementing.  You
can play more fast and loose with the stuff in your personal branch
because it's yours.  You can make as many commits as necessary to the
branch in order to make all the physical changes required by the single
logical change.  Once you're happy everything on your branch is working
correctly, you can merge it into trunk (or wherever) with a commit
message describing the logical change.  That gives you a single
changeset semantically described by a single commit message:  Zen
perfection.

Whether this will work depends on how soon you realize you omitted
something.  If you check in a revision and immediately slap your
forehead thinking, "D'oh!", this will work.  If you wait for another
user or developer to figure it out and notify you that there's a
problem, this won't help a bit.

-- 
Danny MacMillan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Steinar Bang <sb...@dod.no>.
>>>>> "Nico Kadel-Garcia" <nk...@comcast.net>:

> In short, no. In long, you could rebuild the repository from a dump
> to revision 92, then add the files on top and recreate revision 93
> with everything in place, then do revision 94. But it's not trivial
> to merge changes.

Hm... that's one option that would do it.

But it would be a problem with a large repository, and would require
all others to refrain from committing during the process, wouldn't it?

I guess what I will have to do in this, and future cases when I mess
up, is to do what I did when I messed up in CVS: live with it, and try
not to mess up in the future...:-)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Steinar Bang wrote:
> I forgot to add a file when I checked in a big change containing a lot
> of file.
>
> I added it two revisions later, when I discovered it, and I added it
> with the same commit message as the revision I wish it was added in
> (habit from CVS).
>
> Is there a way to move it to revision 93 when it was actually added on
> revision 95?
>
> Thanx!

In short, no. In long, you could rebuild the repository from a dump to 
revision 92, then add the files on top and recreate revision 93 with 
everything in place, then do revision 94. But it's not trivial to merge 
changes. 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Markus Henschel <ma...@gmx.de>.
Steinar Bang wrote:
>> and so they should simply update their working copy to get revision
>> 95 in which the missing file is now present.
> 
> But they might not know that they would have to go to revision 95.
> The log message for 95 wouldn't be available on one of the files that
> was touched in 93, would it?
> 

Well, right but even if you changed an existing revision how would they 
know that something changed then? They had to update their working 
copies anyway. When changes in the repository are so critical that every 
user has to get them immediately they must be contacted.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Steinar Bang <sb...@dod.no>.
>>>>> Ryan Schmidt <su...@ryandesign.com>:

> No, that doesn't make sense because in Subversion, the repository
> revision is merely "the number of changes which have occurred in the
> repository."  In revision 93, you changed some files. In revision
> 95, you added a file. And that's fine. Anyone who happened to get
> revision 93 will have something that's incomplete,

Yes.  So I was hoping there was some svnadmin or other tool option,
that would let me bypass the normal checkin procedure and add another
file addition to an existing version.

> and so they should simply update their working copy to get revision
> 95 in which the missing file is now present.

But they might not know that they would have to go to revision 95.
The log message for 95 wouldn't be available on one of the files that
was touched in 93, would it?

Thanx for the reply!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Moving a file add to a particular revision?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 25, 2006, at 10:38, Steinar Bang wrote:

> I forgot to add a file when I checked in a big change containing a lot
> of file.
>
> I added it two revisions later, when I discovered it, and I added it
> with the same commit message as the revision I wish it was added in
> (habit from CVS).
>
> Is there a way to move it to revision 93 when it was actually added on
> revision 95?

No, that doesn't make sense because in Subversion, the repository  
revision is merely "the number of changes which have occurred in the  
repository." In revision 93, you changed some files. In revision 95,  
you added a file. And that's fine. Anyone who happened to get  
revision 93 will have something that's incomplete, and so they should  
simply update their working copy to get revision 95 in which the  
missing file is now present.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org