I keep trying to attach this file to ticket #94 in trac, but it gives me
a server error.

New patches:

[darcs: factor parsing from process invocation in DarcsSourceWorkingDir._getUpstreamChangesets
Kevin Turner <[EMAIL PROTECTED]>**20070106015250] {
hunk ./vcpx/repository/darcs/source.py 268
-        from datetime import datetime
-        from time import strptime
-        from sha import new
-        from vcpx.changes import Changeset
-
hunk ./vcpx/repository/darcs/source.py 278
+        return self._parseDarcsPull(output)
+
+
+    def _parseDarcsPull(self, output):
+        """Process 'darcs pull' output to Changesets.
+        """
+        from datetime import datetime
+        from time import strptime
+        from sha import new
+        from vcpx.changes import Changeset
+
}

[darcs: add tests.darcs.DarcsPullParser
Kevin Turner <[EMAIL PROTECTED]>**20070106024434] {
hunk ./vcpx/tests/darcs.py 11
-from vcpx.repository.darcs.source import changesets_from_darcschanges
+from vcpx.repository.darcs.source import changesets_from_darcschanges, \
+     DarcsSourceWorkingDir
hunk ./vcpx/tests/darcs.py 547
+
+
+class DarcsPullParser(TestCase):
+    def test_parsePull(self):
+        from os.path import split, join
+        filename = join(split(__file__)[0], 'data', 'darcs-pull.log')
+        output = file(filename)
+
+        class FauxRepository(object):
+            name = 'foo'
+        dswd = DarcsSourceWorkingDir(FauxRepository())
+        results = list(dswd._parseDarcsPull(output))
+
+        from vcpx.changes import Changeset
+        from datetime import datetime
+        from vcpx.tzinfo import UTC
+        expected_changesets = [
+            Changeset('Monotone add is no longer recursive by default '
+                      '(as of 2006-11-02).',
+                      datetime(2006,12,12,05,30,20, tzinfo=UTC),
+                      '[EMAIL PROTECTED]',
+                      'Use add --recursive when adding subtrees.'),
+            Changeset('Fix ticket #87',
+                      datetime(2006,12,14,23,45,04, tzinfo=UTC),
+                      'Edgar Alves <[EMAIL PROTECTED]>\n',
+                      ''),
+            Changeset("Don't assume the timestamp in darcs log is exactly "
+                      "28 chars long",
+                      datetime(2006,11,17,20,26,28, tzinfo=UTC),
+                      '[EMAIL PROTECTED]',
+                      ''),
+            Changeset('darcs: factor parsing from process invocation in DarcsSourceWorkingDir._getUpstreamChangesets',
+                      datetime(2007, 1, 6, 1,52,50, tzinfo=UTC),
+                      'Kevin Turner <[EMAIL PROTECTED]>\n',
+                      ''),
+            ]
+
+        self.failUnlessEqual(len(expected_changesets), len(results))
+
+        for expected, result in zip(expected_changesets, results):
+            self.failUnlessEqual(expected, result, "%s != %s" % (expected, result))
+
+
+
addfile ./vcpx/tests/data/darcs-pull.log
hunk ./vcpx/tests/data/darcs-pull.log 1
+Pulling from "../not-tailor"...
+Would pull the following changes:
+Tue Dec 12 05:30:20 UTC 2006  [EMAIL PROTECTED]
+  * Monotone add is no longer recursive by default (as of 2006-11-02).
+  Use add --recursive when adding subtrees.
+
+Thu Dec 14 23:45:04 UTC 2006  Edgar Alves <[EMAIL PROTECTED]>
+  * Fix ticket #87
+
+Fri Nov 17 20:26:28 UTC 2006  [EMAIL PROTECTED]
+  * Don't assume the timestamp in darcs log is exactly 28 chars long
+
+Mon Dec 11 21:07:48 UTC 2006  [EMAIL PROTECTED]
+  tagged Version 0.9.27
+
+Sat Jan  6 01:52:50 UTC 2007  Kevin Turner <[EMAIL PROTECTED]>
+  * darcs: factor parsing from process invocation in DarcsSourceWorkingDir._getUpstreamChangesets
+
+Making no changes:  this is a dry run.
}

[DarcsSourceWorkingDir._parseDarcsPull: don't include the newline as part of 'author'
Kevin Turner <[EMAIL PROTECTED]>**20070106025717
 
 also tests to check the change.darcs_hash.
] {
hunk ./vcpx/repository/darcs/source.py 315
-                author = pieces.pop()
+                author = pieces.pop()[:-1]
hunk ./vcpx/tests/darcs.py 552
-        filename = join(split(__file__)[0], 'data', 'darcs-pull.log')
-        output = file(filename)
+        logfilename = join(split(__file__)[0], 'data', 'darcs-pull.log')
+        output = file(logfilename)
+
+        hashfilename = join(split(__file__)[0], 'data', 'darcs-pull.hashes')
+        hashes = file(hashfilename)
hunk ./vcpx/tests/darcs.py 570
-                      '[EMAIL PROTECTED]',
+                      '[EMAIL PROTECTED]',
hunk ./vcpx/tests/darcs.py 574
-                      'Edgar Alves <[EMAIL PROTECTED]>\n',
+                      'Edgar Alves <[EMAIL PROTECTED]>',
hunk ./vcpx/tests/darcs.py 579
-                      '[EMAIL PROTECTED]',
+                      '[EMAIL PROTECTED]',
hunk ./vcpx/tests/darcs.py 583
-                      'Kevin Turner <[EMAIL PROTECTED]>\n',
+                      'Kevin Turner <[EMAIL PROTECTED]>',
hunk ./vcpx/tests/darcs.py 586
+        for changeset, expected_hash in zip(expected_changesets, hashes):
+            changeset.darcs_hash = expected_hash.strip()
hunk ./vcpx/tests/darcs.py 592
-            self.failUnlessEqual(expected, result, "%s != %s" % (expected, result))
-
-
+            self.failUnlessEqual(expected, result,
+                                 "%s != %s" % (expected, result))
+            self.failUnlessEqual(expected.darcs_hash, result.darcs_hash,
+                                 'hash failed for %s\n %s !=\n %s' %
+                                 (result, expected.darcs_hash,
+                                  result.darcs_hash))
addfile ./vcpx/tests/data/darcs-pull.hashes
hunk ./vcpx/tests/data/darcs-pull.hashes 1
-
+20061212053020-8115f-273363665fc6719aa7b769b7b54a4e7900c1b252.gz
+20061214234504-b53b2-192e6c1043fdb8a8b569b8996256aa7050fbe8b8.gz
+20061117202628-97f81-28bb52da1a60d829d5d448a89c0582df31067129.gz
+20070106015250-04611-f0045c5a16b0bc01ce082c0b18a445287d267a0d.gz
}

Context:

[TAG Version 0.9.27
[EMAIL PROTECTED] 
[Don't assume the timestamp in darcs log is exactly 28 chars long
[EMAIL PROTECTED] 
[Fix ticket #87
Edgar Alves <[EMAIL PROTECTED]>**20061214234504] 
[Monotone add is no longer recursive by default (as of 2006-11-02).
[EMAIL PROTECTED]
 Use add --recursive when adding subtrees.
] 
[Drop 'cmp' keyword to [].sort() method for compatibility with Python 2.3.x
[EMAIL PROTECTED] 
[Bump version number
[EMAIL PROTECTED] 
[hg: make findcmd call compatible with 0.9.1 and 0.9.2.
Brendan Cully <[EMAIL PROTECTED]>**20061211205849] 
[Import needed exceptions, and reorder imports
[EMAIL PROTECTED] 
[Accept "no changes" as a valid Monotone diff.
[EMAIL PROTECTED] 
[allways call cvs with -f and cvsps with --norc option to disable ~/.cvsrc
[EMAIL PROTECTED]
     Disabling .cvsrc leads to more predictable behavior and avoids strange
     errors if .cvsrc contains -q option as default.
] 
[fix typo
[EMAIL PROTECTED] 
[verify rename exit status
[EMAIL PROTECTED] 
[update keygen support and remove obsolete keyfile handling.
[EMAIL PROTECTED] 
[Break an endless walk in hg backend
Aurelien Jacobs <[EMAIL PROTECTED]>**20061012220807] 
[(Re)fix damned CVS bootstrap step
[EMAIL PROTECTED] 
[Pass None as input when no passphrase is given (see ticket #80)
[EMAIL PROTECTED] 
[M-x whitespace-cleanup
[EMAIL PROTECTED] 
[Fix cut'n'paste error, see ticket #80
[EMAIL PROTECTED] 
[Fix CVS bootstrap
[EMAIL PROTECTED]
 Do not exit the loop over the changeset at the first not applied
 changeset, but rather keep looping over all the changesets.
] 
[More informative exception
[EMAIL PROTECTED] 
[A little easier configuration
[EMAIL PROTECTED]
 It's now possible to specify just 'kind:' to implicitly mean
 'kind:projectname' for the source and target repositories.
 When there's no need of further information like when using darcs as
 target, the relative section may be omitted completely.
] 
[Fix ticket #75, at least with DisjunctWorkingDirectories
[EMAIL PROTECTED]
 While fixing it with shared basedirs is a tricky business, with disjunct
 basedirs it's very simple: first replay the changeset on the target, then
 execute rsync to copy updated files.
] 
[Fix ticket #75, at least with DisjunctWorkingDirectories
[EMAIL PROTECTED]
 While fixing it with shared basedirs is a tricky business, with disjunct
 basedirs it's very simple: first replay the changeset on the target, then
 execute rsync to copy updated files.
] 
[Test for ticket #75
[EMAIL PROTECTED] 
[Use a different rootdir, otherwise the test imports the repo itself
[EMAIL PROTECTED] 
[Fix typo in variable name
[EMAIL PROTECTED] 
[Rename a few ivars to lower case
[EMAIL PROTECTED] 
[Document class vars
[EMAIL PROTECTED] 
[Separate the changeset from the message with a blank line
[EMAIL PROTECTED] 
[Fix the conflict case with HG
[EMAIL PROTECTED]
 Do not return a list of tuples from _applyChangeset(), but rather a flat list.
] 
[New propset-date option on the Subversion repositories
[EMAIL PROTECTED] 
[Fix the option name: it's use-propset, not use-svn-propset
[EMAIL PROTECTED] 
[Update multiple files at same CVS revision
[EMAIL PROTECTED]
 When applying a CVS changeset, instead of updating a file at a time at
 its new revision, group them by revision and execute fewer updates.
] 
[enable logging of all mtn output
R.Ghetta <[EMAIL PROTECTED]>**20060901051018] 
[Emit an info message upon synthetic adds/removes on directories
[EMAIL PROTECTED] 
[Check for errors while setting up the test case
[EMAIL PROTECTED] 
[New --debug option for tests, to show external commands
[EMAIL PROTECTED] 
[Fix typo in test name
[EMAIL PROTECTED] 
[New test for reappeared directory
[EMAIL PROTECTED] 
[Better way to check if a CVS directory is empty
[EMAIL PROTECTED]
 Old way considered empty a directory containing just the metadir
 "CVS", but this was not correct, because the DualWorkingDir may
 contain two different metadirs, the source and the target system
 ones. The right way is looking at CVS/Entries.
] 
[Add a test case for ticket #74.
Adeodato Simo <[EMAIL PROTECTED]>**20060824162516] 
[Allow FixedBugs.run_tailor to get a function as argument.
Adeodato Simo <[EMAIL PROTECTED]>**20060824160543
 
 The function is intended to make various assertions against the just
 created project, and it receives (project, vcs) as arguments.
] 
[Factor out the cvs command used to build the test source repository
[EMAIL PROTECTED] 
[M-x whitespace-cleanup
[EMAIL PROTECTED] 
[Fix #71: annihilate "add A; remove A" in a single darcs patch
[EMAIL PROTECTED]
 This requires a fix in darcs 1.0.8 for its issue185. I proposed one
 (attached to the ticket #71), time will tell...
] 
[Fix a typo
[EMAIL PROTECTED] 
[Use recursive drop for monotone
[EMAIL PROTECTED]
 Tailor seems to expect that dropping a non-empty directory will
 succeed; by all indications it expects this drop to be recursive.
 Therefore, use "mtn drop --recursive" instead of "mtn drop".
] 
[TAG Version 0.9.26
[EMAIL PROTECTED] 
Patch bundle hash:
27b71c18869fca1b6d20813bf385590645db8c6b
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor

Reply via email to