[PATCH 1 of 3] test-bzr: use a fixed commit time

Matt Harbison mharbison72 at gmail.com
Fri Jul 6 02:11:33 UTC 2018


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1530817649 14400
#      Thu Jul 05 15:07:29 2018 -0400
# Node ID 3ec161a15ecfe089dacecee2a192162fe6e741d4
# Parent  600d8d9b8551088ee78e8005646d2dedd7a8d0c2
test-bzr: use a fixed commit time

This will help stabilize the hashes when converting to a Mercurial repo.

diff --git a/tests/test-convert-bzr-merges.t b/tests/test-convert-bzr-merges.t
--- a/tests/test-convert-bzr-merges.t
+++ b/tests/test-convert-bzr-merges.t
@@ -14,30 +14,30 @@ test multiple merges at once
   $ cd source
   $ echo content > file
   $ bzr add -q file
-  $ bzr commit -q -m 'Initial add'
+  $ bzr commit -q -m 'Initial add' '--commit-time=2009-10-10 08:00:00 +0100'
   $ cd ..
   $ bzr branch -q source source-branch1
   $ cd source-branch1
   $ echo morecontent >> file
   $ echo evenmorecontent > file-branch1
   $ bzr add -q file-branch1
-  $ bzr commit -q -m 'Added branch1 file'
+  $ bzr commit -q -m 'Added branch1 file' '--commit-time=2009-10-10 08:00:01 +0100'
   $ cd ../source
   $ sleep 1
   $ echo content > file-parent
   $ bzr add -q file-parent
-  $ bzr commit -q -m 'Added parent file'
+  $ bzr commit -q -m 'Added parent file' '--commit-time=2009-10-10 08:00:02 +0100'
   $ cd ..
   $ bzr branch -q source source-branch2
   $ cd source-branch2
   $ echo somecontent > file-branch2
   $ bzr add -q file-branch2
-  $ bzr commit -q -m 'Added brach2 file'
+  $ bzr commit -q -m 'Added brach2 file' '--commit-time=2009-10-10 08:00:03 +0100'
   $ sleep 1
   $ cd ../source
   $ bzr merge -q ../source-branch1
   $ bzr merge -q --force ../source-branch2
-  $ bzr commit -q -m 'Merged branches'
+  $ bzr commit -q -m 'Merged branches' '--commit-time=2009-10-10 08:00:04 +0100'
   $ cd ..
   $ hg convert --datesort source source-hg
   initializing destination source-hg repository


More information about the Mercurial-devel mailing list