Guest User

Untitled

a guest
May 20th, 2018
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. Create test repository:
  2.  
  3. $ hg init repo
  4. $ cd repo
  5. $ hg init foo
  6. $ cd foo
  7. $ hg init bar
  8. $ cd bar
  9. $ cd ..
  10. $ echo 'bar = bar' > .hgsub
  11. $ cd ..
  12. $ echo 'foo = foo' > .hgsub
  13. $ hg add -S .hgsub
  14. $ hg add -S foo/.hgsub
  15. !submatch foo, subpath foo
  16. $ hg -v commit -m "subrepos" -S
  17. committing subrepository foo
  18. committing subrepository foo\bar
  19. .hgsub
  20. .hgsubstate
  21. .hgsub
  22. .hgsubstate
  23. committed changeset 0:1dd824fba4e7
  24.  
  25. $ echo r > r
  26. $ cd foo
  27. $ echo f > f
  28. $ cd bar
  29. $ echo b > b
  30. $ mkdir y
  31. $ touch x y/z
  32. $ cd ../..
  33. $ hg -v add -S
  34. adding r
  35. adding foo\f
  36. adding foo\bar\b
  37. adding foo\bar\x
  38. adding foo\bar\y\z
  39. $ echo r1 > r1
  40. $ mkdir level
  41. $ touch level/level2 top2
  42. $ cd foo
  43. $ echo f2 > f2
  44. $ cd bar
  45. $ echo b1 > b1
  46. $ touch x1 y/z2
  47. $ cd ../..
  48. $ echo hg -v add **/*2 -S
  49. hg -v add foo/f2 level/level2 -S
  50. $ hg -v add **/*2 -S
  51. adding level\level2
  52. adding foo\f2
Add Comment
Please, Sign In to add comment