]> thyrsus.com Git - rcs-fast-import.git/log
rcs-fast-import.git
13 years agoFix importing of branches into RCS
Mike Fleetwood [Sun, 1 Sep 2013 11:34:47 +0000 (12:34 +0100)]
Fix importing of branches into RCS

RCS requires the parent revision to be locked to checkin a new revision.
When there is only a single branch everything works, but when jumping to
a different branch `ci' fails reporting the parent revision on this
branch isn't locked.

Remember the previous revision, which is locked in RCS, for every
checked in file.  If the parent of the revision being checked in is not
the previously checked in revision then unlock the locked revision and
relock the parent revision.

Test case:

$ cat test-04-branches.fastexp
commit refs/heads/master
mark :1
committer Joe Bloggs <joe.bloggs@example.com> 999091736 +0100
data 13
Add file.txt

M 644 inline file.txt
data 51
Contents of file.txt, changeset 1/3, branch master

commit refs/heads/b1
mark :2
committer Joe Bloggs <joe.bloggs@example.com> 999098479 +0100
data 29
Update file.txt on branch b1

from :1
M 644 inline file.txt
data 47
Contents of file.txt, changeset 2/3, branch b1

commit refs/heads/master
mark :3
committer Joe Bloggs <joe.bloggs@example.com> 999098479 +0100
data 33
Update file.txt on branch master

from :1
M 644 inline file.txt
data 51
Contents of file.txt, changeset 3/3, branch master

$ rcs-fast-import -v -v -v < test-04-branches.fastexp
rcs-fast-import: repository fast import creates
/tmp/test/.rs2845
rcs-fast-import:......(0.00 sec) done.
commit refs/heads/master
rcs-fast-import:    :1 M file.txt
rcs-fast-import: linking ../.rs2845/inline-156562380 to file.txt
Assigning 1.1 to file.txt
rcs-fast-import: executing 'ci -l1.1 -d'Wed 29 Aug 2001 14:28:56 +0100'
-m'Committer: Joe Bloggs <joe.bloggs@example.com>
Committer-Date: Wed 29 Aug 2001 14:28:56 +0100
Mark: :1

Add file.txt
' file.txt RCS/file.txt,v' modify
RCS/file.txt,v  <--  file.txt
initial revision: 1.1
done
rcs-fast-import: removing file.txt
commit refs/heads/b1
rcs-fast-import:    :2 M file.txt
rcs-fast-import: linking ../.rs2845/inline-156562924 to file.txt
Assigning 1.1.1.1 to file.txt
rcs-fast-import: executing 'ci -l1.1.1.1 -d'Wed 29 Aug 2001 16:21:19
+0100' -m'Committer: Joe Bloggs <joe.bloggs@example.com>
Committer-Date: Wed 29 Aug 2001 16:21:19 +0100
Mark: :2
Parents: :1

Update file.txt on branch b1
' file.txt RCS/file.txt,v' modify
RCS/file.txt,v  <--  file.txt
new revision: 1.1.1.1; previous revision: 1.1
done
rcs-fast-import: removing file.txt
rcs-fast-import: executing 'rcs -N'refs/heads/b1':1.1.1 RCS/file.txt,v'
RCS file: RCS/file.txt,v
done
commit refs/heads/master
rcs-fast-import:    :3 M file.txt
rcs-fast-import: linking ../.rs2845/inline-156563340 to file.txt
Assigning 1.2 to file.txt
rcs-fast-import: executing 'ci -l1.2 -d'Wed 29 Aug 2001 16:21:19 +0100'
-m'Committer: Joe Bloggs <joe.bloggs@example.com>
Committer-Date: Wed 29 Aug 2001 16:21:19 +0100
Mark: :3
Parents: :1

Update file.txt on branch master
' file.txt RCS/file.txt,v' modify
RCS/file.txt,v  <--  file.txt
ci: RCS/file.txt,v: no lock set by mike for revision 1.1
cleaning up......(0.00 sec) done.
rcs-fast-import: cleaning up
/tmp/test/.rs2845......(0.00 sec)
done.
rcs-fast-import: child returned 1.

13 years agoFix shell quoting issues with the commit messages
Mike Fleetwood [Fri, 30 Aug 2013 21:35:20 +0000 (22:35 +0100)]
Fix shell quoting issues with the commit messages

The commit message was subject to shell double quote expansion because
it was passed as a parameter to `ci' and external commands are executed
via a shell.  This could cause commit messages to be modified and to
even fail the import.  Single quote the commit message instead.

Test case:

$ cat test-03-comment-quoting.fastexp
commit refs/heads/master
mark :1
committer Joe Bloggs <joe.bloggs@example.com> 998655365 +0100
data 84
Commit message containing shell double quote special characters (`) ($HOME) and (')

M 644 inline file.txt
data 21
Contents of file.txt

$ rcs-fast-export -v -v -v < test-03-comment-quoting.fastexp
rcs-fast-import: repository fast import creates
/tmp/test/.rs24387
rcs-fast-import:......(0.00 sec) done.
commit refs/heads/master
rcs-fast-import:    :1 M file.txt
rcs-fast-import: linking ../.rs24387/inline-152187820 to file.txt
Assigning 1.1 to file.txt
rcs-fast-import: executing 'ci -l1.1 -d'Fri 24 Aug 2001 13:16:05 +0100'
-m"Committer: Joe Bloggs <joe.bloggs@example.com>
Committer-Date: Fri 24 Aug 2001 13:16:05 +0100
Mark: :1

Commit message containing shell double quote special characters (`) ($HOME) and (')
" file.txt RCS/file.txt,v' modify
/bin/sh: -c: line 4: unexpected EOF while looking for matching ``'
/bin/sh: -c: line 6: syntax error: unexpected end of file
cleaning up......(0.00 sec) done.
rcs-fast-import: cleaning up
/tmp/test/.rs24387......(0.00 sec)
done.
rcs-fast-import: child returned 1.

13 years agoFix importing of inline data
Mike Fleetwood [Thu, 29 Aug 2013 22:43:25 +0000 (23:43 +0100)]
Fix importing of inline data

Import of inline data was failing because the temporary file containing
the inline data was written to .../.rs<PID>/inline-<OBJID> but was being
accessed from the current working directory .../temp-import-<PID> using
just the file name without a path.  Save the full path to the inline
data file, rather than just the file name.

Test case:

$ cat test-01-inline-data.fastexp
commit refs/heads/master
mark :1
committer Joe Bloggs <joe.bloggs@example.com> 998655365 +0100
data 13
Add file.txt

M 644 inline file.txt
data 21
Contents of file.txt

$ rcs-fast-import -v -v -v < test-01-inline-data.fastexp
rcs-fast-import: repository fast import creates /tmp/test/.rs16719
rcs-fast-import:......(0.00 sec) done.
commit refs/heads/master
rcs-fast-import:    :1 M file.txt
rcs-fast-import: linking inline-164709420 to file.txt
cleaning up......(0.00 sec) done.
rcs-fast-import: cleaning up /tmp/test/.rs16719......(0.00 sec) done.
rcs-fast-import: refusing to step on file.txt: OSError(2, 'No such file or directory').

13 years agoExit after -V.
Eric S. Raymond [Tue, 3 Sep 2013 18:18:42 +0000 (14:18 -0400)]
Exit after -V.

13 years agopylint cleanup.
Eric S. Raymond [Wed, 5 Dec 2012 22:12:58 +0000 (17:12 -0500)]
pylint cleanup.

13 years agoFreshmeat name change.
Eric S. Raymond [Wed, 5 Dec 2012 21:56:11 +0000 (16:56 -0500)]
Freshmeat name change.

13 years agoTypo fix.
Eric S. Raymond [Wed, 5 Dec 2012 21:52:52 +0000 (16:52 -0500)]
Typo fix.

15 years agoBe explicit about releasing to freshmeat.
Eric S. Raymond [Mon, 29 Nov 2010 02:42:16 +0000 (21:42 -0500)]
Be explicit about releasing to freshmeat.

15 years agopychecker cleanup.
Eric S. Raymond [Thu, 25 Nov 2010 04:06:40 +0000 (23:06 -0500)]
pychecker cleanup.

15 years agoAdd a NEWS file.
Eric S. Raymond [Thu, 25 Nov 2010 04:01:26 +0000 (23:01 -0500)]
Add a NEWS file.

15 years agoExplain the point.
Eric S. Raymond [Thu, 25 Nov 2010 03:57:50 +0000 (22:57 -0500)]
Explain the point.

15 years agoFix bugs caught by pychecker.
Eric S. Raymond [Sun, 21 Nov 2010 15:26:04 +0000 (10:26 -0500)]
Fix bugs caught by pychecker.

15 years agoFix handling of Passthrough events.
Eric S. Raymond [Tue, 16 Nov 2010 19:14:56 +0000 (14:14 -0500)]
Fix handling of Passthrough events.

15 years agoTranslate a little more.
Eric S. Raymond [Tue, 16 Nov 2010 01:30:02 +0000 (20:30 -0500)]
Translate a little more.

15 years agoPreserve merge and extension-property metadata.
Eric S. Raymond [Mon, 15 Nov 2010 19:02:43 +0000 (14:02 -0500)]
Preserve merge and extension-property metadata.

15 years agoTypo fix and doc update.
Eric S. Raymond [Mon, 15 Nov 2010 18:51:23 +0000 (13:51 -0500)]
Typo fix and doc update.

15 years agoTrack a change in the reposugeon version.
Eric S. Raymond [Sun, 14 Nov 2010 23:10:03 +0000 (18:10 -0500)]
Track a change in the reposugeon version.

15 years agoHandle resets with arguments.
Eric S. Raymond [Sun, 14 Nov 2010 06:21:51 +0000 (01:21 -0500)]
Handle resets with arguments.

15 years agoUpdate docs and comments.
Eric S. Raymond [Sun, 14 Nov 2010 06:05:01 +0000 (01:05 -0500)]
Update docs and comments.

15 years agoRemoved the dryrun option.
Eric S. Raymond [Sun, 14 Nov 2010 06:02:19 +0000 (01:02 -0500)]
Removed the dryrun option.

15 years agoUpdate documentation.
Eric S. Raymond [Sun, 14 Nov 2010 05:59:31 +0000 (00:59 -0500)]
Update documentation.

15 years agoWrite tags. Still have to do lightweight tags from resets.
Eric S. Raymond [Sun, 14 Nov 2010 05:36:46 +0000 (00:36 -0500)]
Write tags.  Still have to do lightweight tags from resets.

15 years agoComment fix.
Eric S. Raymond [Sun, 14 Nov 2010 04:44:44 +0000 (23:44 -0500)]
Comment fix.

15 years agoRCS *and* SCCS ids, not that we support SCCS yet.
Eric S. Raymond [Sun, 14 Nov 2010 04:44:15 +0000 (23:44 -0500)]
RCS *and* SCCS ids, not that we support SCCS yet.

15 years agoID generation is fully factored out.
Eric S. Raymond [Sun, 14 Nov 2010 04:35:03 +0000 (23:35 -0500)]
ID generation is fully factored out.

15 years agoFactor out semantics of RCS revisions and branches.
Eric S. Raymond [Sun, 14 Nov 2010 04:12:45 +0000 (23:12 -0500)]
Factor out semantics of RCS revisions and branches.

15 years agoInstrumentation for branch debugging.
Eric S. Raymond [Sun, 14 Nov 2010 03:47:02 +0000 (22:47 -0500)]
Instrumentation for branch debugging.

15 years agoLooking further back in ancestry works.
Eric S. Raymond [Sun, 14 Nov 2010 02:59:28 +0000 (21:59 -0500)]
Looking further back in ancestry works.

15 years agoThis is almost right, but we have to be wlling to look further down ancestry.
Eric S. Raymond [Sun, 14 Nov 2010 02:17:39 +0000 (21:17 -0500)]
This is almost right, but we have to be wlling to look further down ancestry.

15 years agoSanity-check modes more carefully.
Eric S. Raymond [Sat, 13 Nov 2010 21:34:25 +0000 (16:34 -0500)]
Sanity-check modes more carefully.

15 years agoPrevious tempfile name was dangerous.
Eric S. Raymond [Sat, 13 Nov 2010 21:29:11 +0000 (16:29 -0500)]
Previous tempfile name was dangerous.

15 years agoYet more refactoring.
Eric S. Raymond [Sat, 13 Nov 2010 21:24:09 +0000 (16:24 -0500)]
Yet more refactoring.

15 years agoShove yet more stuff to parent class.
Eric S. Raymond [Sat, 13 Nov 2010 21:15:00 +0000 (16:15 -0500)]
Shove yet more stuff to parent class.

15 years agoStill more code pushed to parent class.
Eric S. Raymond [Sat, 13 Nov 2010 20:56:17 +0000 (15:56 -0500)]
Still more code pushed to parent class.

15 years agoMove more code into parent class.
Eric S. Raymond [Sat, 13 Nov 2010 20:44:48 +0000 (15:44 -0500)]
Move more code into parent class.

15 years agoRefactor and simplify.
Eric S. Raymond [Sat, 13 Nov 2010 20:28:55 +0000 (15:28 -0500)]
Refactor and simplify.

15 years agoFunction name change.
Eric S. Raymond [Sat, 13 Nov 2010 19:34:44 +0000 (14:34 -0500)]
Function name change.

15 years agoSet the roundtrip flag on the right object.
Eric S. Raymond [Sat, 13 Nov 2010 16:15:29 +0000 (11:15 -0500)]
Set the roundtrip flag on the right object.

15 years agoDocumentation update.
Eric S. Raymond [Sat, 13 Nov 2010 15:20:10 +0000 (10:20 -0500)]
Documentation update.

15 years agoNo longer scribbles on $PWD.
Eric S. Raymond [Sat, 13 Nov 2010 15:16:46 +0000 (10:16 -0500)]
No longer scribbles on $PWD.

15 years agoNow seems to do deletes correctly.
Eric S. Raymond [Sat, 13 Nov 2010 14:54:09 +0000 (09:54 -0500)]
Now seems to do deletes correctly.

15 years agoRefactoring almost works - need better way to create null file for delete.
Eric S. Raymond [Sat, 13 Nov 2010 14:43:27 +0000 (09:43 -0500)]
Refactoring almost works - need better way to create null file for delete.

15 years agoOK, successful creation of copy with no history.
Eric S. Raymond [Sat, 13 Nov 2010 07:34:58 +0000 (02:34 -0500)]
OK, successful creation of copy with no history.

15 years agoAnother step towards a working copy op.
Eric S. Raymond [Sat, 13 Nov 2010 07:22:23 +0000 (02:22 -0500)]
Another step towards a working copy op.

15 years agoRemove an asymmetry.
Eric S. Raymond [Fri, 12 Nov 2010 23:13:33 +0000 (18:13 -0500)]
Remove an asymmetry.

15 years agoGeneralize copy operation.
Eric S. Raymond [Fri, 12 Nov 2010 23:10:33 +0000 (18:10 -0500)]
Generalize copy operation.

15 years agoBug fix.
Eric S. Raymond [Fri, 12 Nov 2010 23:03:22 +0000 (18:03 -0500)]
Bug fix.

15 years agoImproved tag and branch resolution - handles forwards.
Eric S. Raymond [Fri, 12 Nov 2010 20:10:39 +0000 (15:10 -0500)]
Improved tag and branch resolution - handles forwards.

15 years agoCheckpoint. 32% translated.
Eric S. Raymond [Fri, 12 Nov 2010 15:56:38 +0000 (10:56 -0500)]
Checkpoint. 32% translated.

15 years ago11% translated.
Eric S. Raymond [Fri, 12 Nov 2010 04:24:57 +0000 (23:24 -0500)]
11% translated.

15 years agoGrab the Ruby exporter, we'll take a shot at tranlating it.
Eric S. Raymond [Fri, 12 Nov 2010 02:53:07 +0000 (21:53 -0500)]
Grab the Ruby exporter, we'll take a shot at tranlating it.

15 years agoDisable journaling until we need it.
Eric S. Raymond [Fri, 12 Nov 2010 02:21:19 +0000 (21:21 -0500)]
Disable journaling until we need it.

15 years agoJournal actions to a secret file.
Eric S. Raymond [Fri, 12 Nov 2010 01:48:26 +0000 (20:48 -0500)]
Journal actions to a secret file.

15 years agoUpdate documentation.
Eric S. Raymond [Thu, 11 Nov 2010 21:23:17 +0000 (16:23 -0500)]
Update documentation.

15 years agoFix storage of annotated tags.
Eric S. Raymond [Thu, 11 Nov 2010 20:57:29 +0000 (15:57 -0500)]
Fix storage of annotated tags.

15 years agoHandle renames better.
Eric S. Raymond [Thu, 11 Nov 2010 20:55:38 +0000 (15:55 -0500)]
Handle renames better.

15 years agoStorte deleted files ans empty with a Deleted state.
Eric S. Raymond [Thu, 11 Nov 2010 20:16:42 +0000 (15:16 -0500)]
Storte deleted files ans empty with a Deleted state.

15 years agoWe now store amnnotated tags in a round-trippable form.
Eric S. Raymond [Thu, 11 Nov 2010 19:35:13 +0000 (14:35 -0500)]
We now store amnnotated tags in a round-trippable form.

15 years agoDocumentation fix.
Eric S. Raymond [Thu, 11 Nov 2010 19:07:07 +0000 (14:07 -0500)]
Documentation fix.

15 years agoBetter handling of copies.
Eric S. Raymond [Thu, 11 Nov 2010 17:51:46 +0000 (12:51 -0500)]
Better handling of copies.

15 years agoComment and documentation fixes.
Eric S. Raymond [Thu, 11 Nov 2010 17:33:32 +0000 (12:33 -0500)]
Comment and documentation fixes.

15 years agoStore branches and lightweight tags.
Eric S. Raymond [Thu, 11 Nov 2010 17:31:24 +0000 (12:31 -0500)]
Store branches and lightweight tags.

15 years agoSince we preserve attribution in comment, simplify some logic.
Eric S. Raymond [Thu, 11 Nov 2010 16:56:32 +0000 (11:56 -0500)]
Since we preserve attribution in comment, simplify some logic.

15 years agoImplement preservation of committer and author metadata.
Eric S. Raymond [Thu, 11 Nov 2010 16:45:35 +0000 (11:45 -0500)]
Implement preservation of committer and author metadata.

15 years agoSafety measure.
Eric S. Raymond [Thu, 11 Nov 2010 15:57:34 +0000 (10:57 -0500)]
Safety measure.

15 years agoGive RCS masters the canonical ,v suffix.
Eric S. Raymond [Thu, 11 Nov 2010 15:35:44 +0000 (10:35 -0500)]
Give RCS masters the canonical ,v suffix.

15 years agoEnable the twirling-baton prompt.
Eric S. Raymond [Thu, 11 Nov 2010 15:29:56 +0000 (10:29 -0500)]
Enable the twirling-baton prompt.

15 years agoAdd documentation and metadata files.
Eric S. Raymond [Thu, 11 Nov 2010 15:05:07 +0000 (10:05 -0500)]
Add documentation and metadata files.

15 years agoCheckout options implemented.
Eric S. Raymond [Thu, 11 Nov 2010 14:25:48 +0000 (09:25 -0500)]
Checkout options implemented.

15 years agoMake the code as little cleaner and quieter.
Eric S. Raymond [Thu, 11 Nov 2010 14:11:19 +0000 (09:11 -0500)]
Make the code as little cleaner and quieter.

15 years agoTags are working.
Eric S. Raymond [Thu, 11 Nov 2010 14:05:27 +0000 (09:05 -0500)]
Tags are working.

15 years agoThis looks like we get correct checkins.
Eric S. Raymond [Thu, 11 Nov 2010 13:28:45 +0000 (08:28 -0500)]
This looks like we get correct checkins.

15 years agoRuns to completion.
Eric S. Raymond [Thu, 11 Nov 2010 12:55:34 +0000 (07:55 -0500)]
Runs to completion.

15 years agoA step forward.
Eric S. Raymond [Thu, 11 Nov 2010 12:43:27 +0000 (07:43 -0500)]
A step forward.

15 years agoNote some todos.
Eric S. Raymond [Thu, 11 Nov 2010 05:06:10 +0000 (00:06 -0500)]
Note some todos.

15 years agoTypo fix.
Eric S. Raymond [Thu, 11 Nov 2010 05:04:30 +0000 (00:04 -0500)]
Typo fix.

15 years agoThis is a large improvement.
Eric S. Raymond [Thu, 11 Nov 2010 03:36:28 +0000 (22:36 -0500)]
This is a large improvement.

15 years agoRefactoring step.
Eric S. Raymond [Thu, 11 Nov 2010 03:24:57 +0000 (22:24 -0500)]
Refactoring step.

15 years agoMore removal of unused code.
Eric S. Raymond [Thu, 11 Nov 2010 02:37:49 +0000 (21:37 -0500)]
More removal of unused code.

15 years agoSlightly improved logic, but still buggy.
Eric S. Raymond [Wed, 10 Nov 2010 23:27:44 +0000 (18:27 -0500)]
Slightly improved logic, but still buggy.

15 years agoWarning about lost metadata.
Eric S. Raymond [Wed, 10 Nov 2010 21:56:12 +0000 (16:56 -0500)]
Warning about lost metadata.

15 years agoAdd author and date metadata.
Eric S. Raymond [Wed, 10 Nov 2010 21:23:44 +0000 (16:23 -0500)]
Add author and date metadata.

15 years agoNow seems to be issuing reasonable-looking commands.
Eric S. Raymond [Wed, 10 Nov 2010 21:03:23 +0000 (16:03 -0500)]
Now seems to be issuing reasonable-looking commands.

15 years agoCheckpoint before changing API.
Eric S. Raymond [Wed, 10 Nov 2010 20:05:44 +0000 (15:05 -0500)]
Checkpoint before changing API.

15 years agoClass refactoring.
Eric S. Raymond [Wed, 10 Nov 2010 19:03:32 +0000 (14:03 -0500)]
Class refactoring.

15 years agoRuns to completion in dryrun mode.
Eric S. Raymond [Wed, 10 Nov 2010 18:41:33 +0000 (13:41 -0500)]
Runs to completion in dryrun mode.

15 years agoThis code parses an import stream from stdin and dos nothing.
Eric S. Raymond [Wed, 10 Nov 2010 11:40:25 +0000 (06:40 -0500)]
This code parses an import stream from stdin and dos nothing.

It's the deserialization code from reposurgeon with everything
unnecessary stripped out.