Source

hg-importfs / test-importfs.t

Diff from to

test-importfs.t

   $ echo "c4" > d1/d3/f4
   $ echo "c5" > d1/d3/f5
 
-Provoke an error by using the rev option without the branch option:
-
-  $ hg importfs -r 1 r d1
-  abort: you specified a revision without giving a branch name
-  [255]
-
 Perform the first import (creates a new repository):
 
   $ hg importfs r d1
   4 files updated, 0 files merged, 2 files removed, 0 files unresolved
   adding d3/f13
 
+Create an anonymous branch:
+
+  $ echo "c14" > d1/d3/f14
+  $ hg importfs -r t2 -m "Creating an anonymous branch." r d1
+  2 files updated, 0 files merged, 5 files removed, 0 files unresolved
+  b1
+  adding d2/f10
+  removing d2/f7
+  adding d3/f11
+  adding d3/f13
+  adding d3/f14
+  removing d3/f4
+  adding d3/f9
+  created new head
+
+Create a second anonymous branch:
+
+  $ echo "c15" > d1/d3/f15
+  $ hg importfs -r t1 -m "Creating a second anonymous branch." r d1
+  2 files updated, 0 files merged, 5 files removed, 0 files unresolved
+  default
+  adding d2/f10
+  adding d3/f11
+  adding d3/f13
+  adding d3/f14
+  adding d3/f15
+  removing d3/f4
+  removing d3/f5
+  adding d3/f9
+  created new head
+
+Check the new heads:
+
+  $ hg -R r heads --template "changeset: {rev}\nbranch: {branches}\nparent: {parents}\nsummary: {desc}\n\n"
+  changeset: 13
+  branch: 
+  parent: 1:????????????  (glob)
+  summary: Creating a second anonymous branch.
+  
+  changeset: 12
+  branch: b1
+  parent: 3:????????????  (glob)
+  summary: Creating an anonymous branch.
+  
+  changeset: 11
+  branch: b1
+  parent: 9:????????????  (glob)
+  summary: importfs commit.
+  
+  changeset: 10
+  branch: b2
+  parent: 
+  summary: Creating branch b2
+  
+  changeset: 5
+  branch: 
+  parent: 2:????????????  (glob)
+  summary: importfs commit.
+