You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jö Fahlke <jo...@jorrit.de> on 2011/11/07 22:34:53 UTC
Creating commits with empty changesets
Hi!
Is there any way to do a commit with and empty changeset, but non-empty commit
message?
I made a typo in a commit message. Unfortunately the typo isn't just
cosmetic, since it is right in a revision number referencing another commit.
Even more unfortunately, changing the commit message after having commited
isn't really an option (it's not important enough to change history).
My next best idea was to make another commit right after the faulty one, with
an empty changeset and a commit message explaining the previous error. But
svn silently ignores my attempts to this end.
I'm using the commandline client from Debian:
svn, version 1.6.12 (r955767)
compiled May 31 2011, 19:23:20
Thanks,
Jö.
--
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884
Of all the things I've lost, I miss my mind the most.
-- Ozzy Osbourne
Re: Creating commits with empty changesets
Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Tue, Nov 8, 2011 at 4:47 AM, Jö Fahlke <jo...@jorrit.de> wrote:
> Am Tue, 8. Nov 2011, 09:05:39 +0000 schrieb Giulio Troccoli:
>> I really don't understand why you can't use
>>
>> svn pe svn:log <filename>
>>
>> This doesn't change history, the commit you did doesn't change.
>> You're only correcting a mistake in the message.
>
> * Because the server does not allow it.
>
> * Because it creates problems for people who already updated to the faulty
> commit (e.g. with git-svn).
You didn't mention git-svn. While it's a useful tool, I've gone a few
rounds with such users when they were using a CVS->Subversion planning
a migration, and a Subverson->git for their own work, and they threw a
wobbly when I re-arranged things in the old CVS repository to make the
long-term move cleaner. (Re-arranged material to avoid name conflicts
and get material *out* of the migration tree that didn't need to be
there.)
Boy, did they throw a fit. Long term synchronization via the git-svn
toolkit is fragile and should *not* be relied as canonical historical
information.
Re: Creating commits with empty changesets
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Ulrich Eckhardt wrote on Tue, Nov 08, 2011 at 13:27:46 +0100:
> Am 08.11.2011 12:53, schrieb Daniel Shahaf:
> >Regarding empty revisions, even if Subversion prevents them in the UI
> >I won't be entirely surprised to discover that a program written to our
> >lower-level public APIs can create such revisions nonetheless.
>
> As you proved yourself, it can be done with the client API.
I proved that the client API allows committing revisions that make no-op
changes to >=1 files. I was asking here about revisions that touch zero
files.
> Also,
> svnadmin allows creating empty revisions during loading in order to
> preserve the revisions numbers after svndumpfilter.
Good point, that means means the svn_fs_* API allows creating empty
revisions. Thanks.
Re: Creating commits with empty changesets
Posted by Ulrich Eckhardt <ul...@dominolaser.com>.
Am 08.11.2011 12:53, schrieb Daniel Shahaf:
> Regarding empty revisions, even if Subversion prevents them in the UI
> I won't be entirely surprised to discover that a program written to our
> lower-level public APIs can create such revisions nonetheless.
As you proved yourself, it can be done with the client API. Also,
svnadmin allows creating empty revisions during loading in order to
preserve the revisions numbers after svndumpfilter.
Uli
**************************************************************************************
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at http://www.dominolaser.com
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
Re: Creating commits with empty changesets
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Jö Fahlke wrote on Tue, Nov 08, 2011 at 12:47:43 +0100:
> Am Tue, 8. Nov 2011, 12:53:47 +0200 schrieb Daniel Shahaf:
> > How does git-svn deal with a revision that contains only no-op text
> > mods and no prop mods (such as the one you created in your
> > COPYING's history)?
>
> You get a revision with no changes in file content compared to the previous
> revision and it's own log message.
>
> In fact, I tried to get a revision with empty changeset into the subversion
> repository with git-svn[1]. But when committing my local changes to svn the
> empty revision was omitted (and removed from the git HEAD as well).
Thanks for the info.
Regarding empty revisions, even if Subversion prevents them in the UI
I won't be entirely surprised to discover that a program written to our
lower-level public APIs can create such revisions nonetheless.
Re: Creating commits with empty changesets
Posted by Jö Fahlke <jo...@jorrit.de>.
Am Tue, 8. Nov 2011, 12:53:47 +0200 schrieb Daniel Shahaf:
> How does git-svn deal with a revision that contains only no-op text
> mods and no prop mods (such as the one you created in your
> COPYING's history)?
You get a revision with no changes in file content compared to the previous
revision and it's own log message.
In fact, I tried to get a revision with empty changeset into the subversion
repository with git-svn[1]. But when committing my local changes to svn the
empty revision was omitted (and removed from the git HEAD as well).
Bye,
Jö.
[1] You can create such revisions with --allow-empty in git.
--
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884
If God had intended Man to Smoke, He would have set him on Fire.
-- fortune
Re: Creating commits with empty changesets
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
On Tuesday, November 08, 2011 10:47 AM, "Jö Fahlke" <jo...@jorrit.de> wrote:
> Am Tue, 8. Nov 2011, 09:05:39 +0000 schrieb Giulio Troccoli:
> > I really don't understand why you can't use
> >
> > svn pe svn:log <filename>
>
> * Because it creates problems for people who already updated to the faulty
> commit (e.g. with git-svn).
How does git-svn deal with a revision that contains only no-op text
mods and no prop mods (such as the one you created in your
COPYING's history)?
Re: Creating commits with empty changesets
Posted by Jö Fahlke <jo...@jorrit.de>.
Am Tue, 8. Nov 2011, 09:05:39 +0000 schrieb Giulio Troccoli:
> I really don't understand why you can't use
>
> svn pe svn:log <filename>
>
> This doesn't change history, the commit you did doesn't change.
> You're only correcting a mistake in the message.
* Because the server does not allow it.
* Because it creates problems for people who already updated to the faulty
commit (e.g. with git-svn).
Jö.
--
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884
featured product: Debian GNU/Linux - http://www.debian.org
Re: Creating commits with empty changesets
Posted by Giulio Troccoli <gi...@mediatelgroup.co.uk>.
On 07/11/11 21:34, Jö Fahlke wrote:
> Hi!
>
> Is there any way to do a commit with and empty changeset, but non-empty commit
> message?
>
> I made a typo in a commit message. Unfortunately the typo isn't just
> cosmetic, since it is right in a revision number referencing another commit.
> Even more unfortunately, changing the commit message after having commited
> isn't really an option (it's not important enough to change history).
>
> My next best idea was to make another commit right after the faulty one, with
> an empty changeset and a commit message explaining the previous error. But
> svn silently ignores my attempts to this end.
>
> I'm using the commandline client from Debian:
> svn, version 1.6.12 (r955767)
> compiled May 31 2011, 19:23:20
>
> Thanks,
> Jö.
>
I really don't understand why you can't use
svn pe svn:log <filename>
This doesn't change history, the commit you did doesn't change. You're
only correcting a mistake in the message.
Re: Creating commits with empty changesets
Posted by Jö Fahlke <jo...@jorrit.de>.
Am Mon, 7. Nov 2011, 23:57:59 +0200 schrieb Daniel Shahaf:
> Assuming you have a versioned file called 'iota',
>
> % cp iota iota2
> % echo >> iota
> % svn ci iota
> (editor pops up)
> (shell out from editor)
> % cp iota2 iota
> % exit
> (back to editor)
> (enter commit message)
> (exit editor)
That appears to have worked. Although svn seem to kind of remember that the
file 'iota' ('COPYING' in my case) appears to have changed (e.g. with "svn log
COPYING"). This is both an advantage and a disadvantage of this technique: a
disadvantage because files that haven't actually changed are listed as
changed, which is creepy. An advantage, because if you take this into account
you can use all the files that were touched in the faulty commit for 'iota',
and the corrected commit message will appear when you run "svn log" for
them[1].
Thanks a lot,
Jö.
[1] Unfortunately, I noticed this only after arbitrarily choosing 'COPYING'...
--
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884
In the beginning the Universe was created. This has made a lot of
people very angry and been widely regarded as a bad move.
-- Douglas Adams
Re: Creating commits with empty changesets
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Assuming you have a versioned file called 'iota',
% cp iota iota2
% echo >> iota
% svn ci iota
(editor pops up)
(shell out from editor)
% cp iota2 iota
% exit
(back to editor)
(enter commit message)
(exit editor)
Jö Fahlke wrote on Mon, Nov 07, 2011 at 22:34:53 +0100:
> Hi!
>
> Is there any way to do a commit with and empty changeset, but non-empty commit
> message?
>
> I made a typo in a commit message. Unfortunately the typo isn't just
> cosmetic, since it is right in a revision number referencing another commit.
> Even more unfortunately, changing the commit message after having commited
> isn't really an option (it's not important enough to change history).
>
> My next best idea was to make another commit right after the faulty one, with
> an empty changeset and a commit message explaining the previous error. But
> svn silently ignores my attempts to this end.
>
> I'm using the commandline client from Debian:
> svn, version 1.6.12 (r955767)
> compiled May 31 2011, 19:23:20
>
> Thanks,
> Jö.
>
> --
> Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
> Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
> Tel: +49 6221 54 8890 Fax: +49 6221 54 8884
>
> Of all the things I've lost, I miss my mind the most.
> -- Ozzy Osbourne